GNOME Bugzilla – Bug 91041
Crash when wacom's right button is pressed.
Last modified: 2011-02-04 16:11:59 UTC
Pressing the button that acts as the right button on the wacom intuos2 over any image causes a segmentation fault. -Steps to reproduce: 1. Open gimp. 2. Create a new image or open an existing one. 3. Position the cursor over the image. 4. Press wacom's "right" button. -Results: Gimp draws the menu (sometimes only an empty rectangle), crashes and blocks any access to the desktop (gnome 2.0.1). I can move the pointer over the screen but nothing happens when I press it or press any keys. I have to switch to text mode to kill gimp and gain access to the desktop again. -Expected results: The image menu should have appeared and gimp should have continued working. -Additional builds and platforms: The same happened with 1.3.6 and a cvs version. -Additional information: Error messages (captured with "2>" redirection): (gimp-1.3:22030): Gtk-WARNING **: Unable to locate theme engine in module_path: "thinice", gimp-1.3: tool-safe-mode init called gimp-1.3: tool_plug_in_path: /home/roger/.gimp-1.3/tool-plug-ins:/usr/local/lib/gimp/1.3/tool-plug-ins gimp-1.3: reading datafiles directory '/usr/local/lib/gimp/1.3/tool-plug-ins' gimp-1.3: loading tool /usr/local/lib/gimp/1.3/tool-plug-ins/libgimpbrushselecttool.so (tool-safe-mode:22032): LibGimpTool-WARNING **: /usr/local/lib/gimp/1.3/tool-plug-ins/libgimpbrushselecttool.so: undefined symbol: selection_options_new gimp-1.3: tool-safe-mode init done gimp-1.3: run called extension_plugin_helper gimp-1.3: Could not open module /usr/local/lib/gimp/1.3/plugin-modules/libiwarp.so! gimp-1.3: time for the evil loop gimp-1.3: fatal error: Segmentation fault (script-fu:22034): LibGimpBase-WARNING **: script-fu: wire_read(): error (plugin-helper:22033): LibGimpBase-WARNING **: plugin-helper: wire_read(): error
The gimp didn't block the desktop this time, I managed to get an stack trace: (gimp-1.3:23763): Gtk-WARNING **: No s'ha trobat el motor de tema al module_path: "thinice", using MMX: yes (gimp-1.3:23763): Gimp-Widgets-WARNING **: gimpitemfactory.c:933: bad translation for menupath: <Toolbox>/Xtns/Script-Fu (gimp-1.3:23763): Gimp-Widgets-WARNING **: gimpitemfactory.c:933: bad translation for menupath: <Toolbox>/Xtns/Script-Fu/Console... (gimp-1.3:23763): Gimp-Widgets-WARNING **: gimpitemfactory.c:933: bad translation for menupath: <Toolbox>/Xtns/Script-Fu/Server... gimp-1.3: tool-safe-mode init called gimp-1.3: tool_plug_in_path: /home/roger/.gimp-1.3/tool-plug-ins:/usr/local/lib/gimp/1.3/tool-plug-ins gimp-1.3: reading datafiles directory '/usr/local/lib/gimp/1.3/tool-plug-ins' gimp-1.3: loading tool /usr/local/lib/gimp/1.3/tool-plug-ins/libgimpbrushselecttool.so (tool-safe-mode:23916): LibGimpTool-WARNING **: /usr/local/lib/gimp/1.3/tool-plug-ins/libgimpbrushselecttool.so: undefined symbol: selection_options_new gimp-1.3: tool-safe-mode init done gimp-1.3: run called extension_plugin_helper gimp-1.3: Could not open module /usr/local/lib/gimp/1.3/plugin-modules/libiwarp.so! gimp-1.3: time for the evil loop gimp-1.3: fatal error: Violación de segmento gimp-1.3 (pid:23763): [E]xit, [H]alt, show [S]tack trace or [P]roceed: S
+ Trace 26362
This is most probably not at all Wacom-related. You simply haven't deleted your old GIMP-1.3 installation when you upgraded to 1.3.7. There's an old tool plug-in in your plug-in path which is not compatible with 1.3.7. Delete it and everything should be fine.
I tried uninstalling the gimp as you suggested and manually deleting /usr/local/lib/gimp/1.3 and /usr/local/share/gimp/1.3. After installing it again I have the same problem (I tried rebuilding it too). I've noticed that if I choose "Disable" mode on the "Input Devices" tab, gimp doesn't crash when I press the right button (my ps/2 mouse always worked fine too). If I choose "Window" mode gimp crashes as soon as I press the tablet on the canvas, and if "Screen" is selected I've got what I explained already. PS: I have 1.2 installed, can I have conflicts with that version too?
Are you getting this problem with all tools? I was guessing that the brush-select tool is crashing on you but it shouldn't be there any longer if you deleted your old gimp-1.3 installation. Please note that we haven't yet put any effort into XInput support in GIMP-1.3. The problem you atre reporting might actually be a GIMP problem or it could be a GTK+ bug. We'll have to investigate further. Perhaps I should pull my Wacom out of the dust and try it with GIMP-1.3.
Yes, the poblem appears with any tool. I haven't had this kind of problem with any gtk2 application, but none of them make use of xinput. For instance the popup menus of gimp's dock windows work fine with the tablet. Let me know if I can do more tests.
I can reproduce this with the debian package of the GIMP 1.3.8, with my wacom Graphire 2 USB. If I use my normal mouse instead of the Graphire mouse, everything works fine. I'm currently checking whether the CVS version has the same problem and if so, I'll try to fix it. I'll send a patch if I have one.
errr, it seems to be a bug in gtk/glib. I only see GIMP's main loop in the backtrace. Besides, I seem to have a little different trace:
+ Trace 27703
So this seems to be two bugs.
Well, this is the situation I get here, one that cannot possibly happen: (gdb) frame 0
+ Trace 27708
135 gdk_region_rectangle (GdkRectangle *rectangle) 136 { 137 GdkRegion *temp; (gdb) l 142,150 142 temp = g_new (GdkRegion, 1); 143 temp->rects = g_new (GdkRegionBox, 1); 144 145 temp->numRects = 1; 146 temp->extents.x1 = temp->rects[0].x1 = rectangle->x; 147 temp->extents.y1 = temp->rects[0].y1 = rectangle->y; 148 temp->extents.x2 = temp->rects[0].x2 = rectangle->x + rectangle->width; 149 temp->extents.y2 = temp->rects[0].y2 = rectangle->y + rectangle->height; 150 temp->size = 1; (gdb) p *temp 3 = {size = 0, numRects = 0, rects = 0x76, extents = {x1 = 0, y1 = 0, x2 = 118, y2 = 32}} (gdb) p *rectangle 4 = {x = 0, y = 0, width = 118, height = 2} Any ideas?
Is this possibly related to that antique Bug #10498, in turn related to GTK Bug #32617? The underlying cause to that was asymmetry in how GDK maps X Input Device events to GDK equivalents; it is not exactly the same as the mapping of X Core events to the same GDK equivalents. In the 1.2 GDK, it seemed necessary for GDK to override the applications request mask in order to enforce a PRESS/RELEASE symmetry; hence, an application got the other event of the pair even if it didn't expect it. Could this *still* be possibly true in GDK 2.0 (I note that #32617 is still open...)
For my reference: This is Debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=172415
Has anyone tried a Wacom tablet with GIMP/GTK2.2 yet? Apparently bug #32617 was fixed recently, so if that is directly related to this bug then this can be resolved.
I can reproduce the problem with a serial Wacom Intuos tablet using the stylus in screen mode (other configuration were not yet tested). I'm running GIMP from CVS (basically 1.3.11) and GTK+-2.0 from debian testing (gtk+-2.0.6). The crash occurs in gdk_window_end_paint() and it looks like a ref-counting problem with respect to GDK drawables. So its most definitely not a GIMP bug. Most probably this has been already been fixed in a newer version of GTK+. I will try to upgrade this machine to GTK+-2.2 later today.
Bug #98308 might be a duplicate of this one.
*** Bug 99901 has been marked as a duplicate of this bug. ***
Can you debug the problem Sven? There is nothing here that is useful for reproduction or debugging, unless I wanted to haul out my Wacom, and compile GIMP-1.3 and hope that the problem happened for me.
It happens all the time so you shouldn't have a problem to reproduce it ;-) I have reassigned the bug report since I was hoping you had an idea (or better, already fixed the problem). Since that is not the case, I'll try if I can hunt it down...
It really looks like memory corruption to me; I'd have to say it's as likely to be the GIMP as GTK+,but I'll leave it open on GTK+ for now.
Just as a heads up in case nobody has tried it yet, this does still happen with GTK 2.2.1.
Same as bug 106210, which has been fixed (thanks to Larry Ewing) in CVS since 2.2.1. *** This bug has been marked as a duplicate of 106210 ***