[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    qt-copy
From:       Szymon Stefanek <pragma () kvirc ! net>
Date:       2008-11-04 21:41:40
Message-ID: 1225834900.549909.24198.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 880178 by stefanek:

Fix and patch for the recursive backingstore sync crash
deep in the qt painting code. Certain widget hierarchies
caused the painting recursion to "loop back" to the toplevel
widget which in turn caused the shared painter to be destroyed
and the outer frames to be left with a dangling pointer
on the stack.

BUG: 174065
CCMAIL: Thomas McGuire <mcguire@kde.org>
CCMAIL: Szymon Tomasz Stefanek <s.stefanek@gmail.com>



 A             patches/0256-fix-recursive-backingstore-sync-crash.diff  
 M  +1 -1      patches/README  
 M  +5 -1      src/gui/painting/qbackingstore.cpp  


--- trunk/qt-copy/patches/README #880177:880178
@@ -1,5 +1,5 @@
 Please assign the numbers incrementally, and don't reuse them. The next one:
-#0256
+#0257
 
 This directory contains patches for Qt that haven't been accepted by TrollTech
 yet. All patches in this directory itself shouldn't make qt-copy incompatible
--- trunk/qt-copy/src/gui/painting/qbackingstore.cpp #880177:880178
@@ -987,8 +987,12 @@
             return;
         }
 
-        if (tlw->updatesEnabled()) {
+        // With certain widget hierarchies we may end up being called recursively
+        // on the same toplevel. This is likely to explode once the painter is released
+        // in the code below (since there is no reference counting). Avoid it.
+        bool alreadyPainting = tlwExtra->sharedPainter && tlwExtra->sharedPainter->isActive();
 
+        if (tlw->updatesEnabled() && !alreadyPainting) {
             // hw: XXX the toClean region is not correct if !dirtyWidgets.isEmpty()
 
             // Pre render config
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic