rpms/qt/F-10 0256-fix-recursive-backingstore-sync-crash.diff, NONE, 1.1 qt.spec, 1.213, 1.214

Than Ngo than at fedoraproject.org
Mon Nov 10 13:15:28 UTC 2008


Author: than

Update of /cvs/extras/rpms/qt/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22234

Modified Files:
	qt.spec 
Added Files:
	0256-fix-recursive-backingstore-sync-crash.diff 
Log Message:
apply 0256-fix-recursive-backingstore-sync-crash.diff


0256-fix-recursive-backingstore-sync-crash.diff:

--- NEW FILE 0256-fix-recursive-backingstore-sync-crash.diff ---
qt-bugs@ issue : N227209
Trolltech task ID : none yet
bugs.kde.org number : 174065
applied: yes
author: Szymon Tomasz Stefanek <s.stefanek at gmail.com>

This patch fixes a crash deep inside the qt painting engine.

The toplevel shared painter is instantiated by the topmost window
which "owns" the backingstore buffer. The topmost window then recursively
asks the children to paint themselves with the shared painter.
With certain widget hierarchies it turns out that the topmost window
may be asked to paint itself deep inside the recursive painting stack:
a sort of "hierarchy-looping recursion".
The window will do the job and then happily destroy the shared
painter leaving the outer stack frames with a dangling pointer.

This patch stops the "looping recursion" when it's triggered
with a shared painter already active. The bug doesn't seem to
be present in qt 4.5 snapshots, but in the meantime we need this fix.


Index: src/gui/painting/qbackingstore.cpp
===================================================================
--- src/gui/painting/qbackingstore.cpp	(revision 879741)
+++ src/gui/painting/qbackingstore.cpp	(working copy)
@@ -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


Index: qt.spec
===================================================================
RCS file: /cvs/extras/rpms/qt/F-10/qt.spec,v
retrieving revision 1.213
retrieving revision 1.214
diff -u -r1.213 -r1.214
--- qt.spec	6 Nov 2008 13:36:05 -0000	1.213
+++ qt.spec	10 Nov 2008 13:14:58 -0000	1.214
@@ -9,7 +9,7 @@
 Name:    qt4
 %endif
 Version: 4.4.3
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 # GPLv2 exceptions(see GPL_EXCEPTIONS*.txt)
 License: GPLv3 with exceptions or GPLv2 with exceptions
@@ -46,6 +46,7 @@
 %{?qt_copy:Source2: qt-copy-patches-%{qt_copy}svn.tar.bz2}
 %{?qt_copy:Provides: qt-copy = %{qt_copy}}
 %{?qt_copy:Provides: qt4-copy = %{qt_copy}}
+Patch100: 0256-fix-recursive-backingstore-sync-crash.diff
 
 Source11: qt4.sh
 Source12: qt4.csh
@@ -287,6 +288,8 @@
 %patch9 -p1 -b .qgtkstyle
 %patch10 -p1 -b .im
 
+%patch100 -p0
+
 # drop -fexceptions from $RPM_OPT_FLAGS
 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
 
@@ -733,6 +736,9 @@
 
 
 %changelog
+* Mon Nov 10 2008 Than Ngo <than at redhat.com> 4.4.3-3
+- apply 0256-fix-recursive-backingstore-sync-crash.diff 
+
 * Thu Nov 06 2008 Than Ngo <than at redhat.com> 4.4.3-2
 - bz#468814, immodule selection behavior is unpredictable without QT_IM_MODULE,
   patch from Peng Wu




More information about the fedora-extras-commits mailing list