qapplication_x11.cpp: Change in event-loop behaviour causes crashes.

Waldo Bastian bastian at kde.org
Tue Jul 30 19:26:41 BST 2002


On Tuesday 30 July 2002 12:27 am, qt-bugs at trolltech.com wrote:
> On Thursday, 25 Jul 2002 17:03, Waldo Bastian wrote:
> > A recent change (Qt 3.0.5?) in the event loop handling makes that events
> > are being processed in the popup-event loop after the popup has been
> > closed. This causes numerous crashes.
>
> Actually, this change didn't go into 3.0.5, it was made shortly after 3.0.5
> was released.

I am happy to hear that.

> > However, with the recent changes to the event loop both these events are
> > now handled from the event-loop of the popupmenu instead of returning to
> > the main event loop first. This results in the crashes that these methods
> > were supposed to prevent.
> >
> > The attached patch fixes the problem.
>
> Do you have a small example of the problem?  I can't reproduce this crash
> at all.

Attached is a patch for the popup example. Selecting "Remove me" from the menu 
on the "Fancy Button" causes invalid reads. The example is too simple to 
actually crash but if you run it with valgrind you will see the problem.

The "Remove me" action on the "Simple Button" does not cause any problems.

Cheers,
Waldo
-- 
bastian at kde.org  |   SuSE Labs KDE Developer  |  bastian at suse.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: popup.patch
Type: text/x-diff
Size: 2530 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20020730/757e9e21/attachment.patch>


More information about the kde-core-devel mailing list