gtk+-2 module hunt for crasher

Zbigniew Luszpinski zbiggy at o2.pl
Sun Jan 2 14:47:51 CET 2011


Hello,

if you wonder why firefox/seamonkey/thunderbird/gimp or other gtk 
application suddenly crash and exits without reason this is post for you.
Some of you probably associate this with moving mouse. Right.
The bug I found appears in such occasions:
1. In firefox you grab tab and move it to other place on tab bar.
( setting nglayout.enable_drag_images to false workarounds this)
2. Drag and drop bookmarks in firefox menu.
3. You grab a picture on web page and move it somewhere.
(e.g. enter lunar-linux.org site, grab and drag Lunar logo sitting in left 
upper corner)
If you run firefox from the console you will see X error after crash.

The source of all these problems is gtk library not applications.
proof of concept:
1. run gtk-demo
2. Double click Icon View->Editing and Drag-and-Drop
3. Now you see 4 colours. Grab and drag one of these to make gtk-demo 
application crash.

The fix (commited to moonbase - no date change so you have to lin it 
manually):
  # Fixes drag and drop crash
  bad_flags -O3 &&
  bad_flags -O2 &&
  CFLAGS=" -O1 $CFLAGS" &&
  CXXFLAGS=$CFLAGS &&

Yes. -O2 and upper are responsible for broken DnD in gtk apps. -O1 is 
fine. Here is task for someone who would like to hunt for the gtk crasher 
flag: Find out which of flags the -O2 parameter adds is responsible for 
DnD crash. I will start looking in spare time so sooner or later I will 
find it - you may be first as I'm very busy and have no much time for 
Lunar developing. Use gtk-demo DnD for testing. Enjoy. When we find the 
bad flag it will be reported to gtk devel team.

Here is info what flags -O2 parameter adds after -O1:
http://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/Optimize-
Options.html#Optimize-Options

have a nice day,
Zbigniew Luszpinski


More information about the Lunar mailing list