GNOME Bugzilla – Bug 440473
gimp crashes if a paint tool is dragged across the image
Last modified: 2007-06-11 07:39:28 UTC
Steps to reproduce: 1. open image 2. drag tool across the image 3. crash Stack trace: % gdb /opt/local/bin/gimp-2.3 GNU gdb 5.3-20030128 (Apple version gdb-282) (Fri Jun 13 03:33:07 GMT 2003) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-darwin". Reading symbols for shared libraries ..................................... done (gdb) b gdk_x_error Breakpoint 1 at 0x67014: file gtkclist.c, line 6329. (gdb) r --display=:0 --sync Starting program: /opt/local/bin/gimp-2.3 --display=:0 --sync Reading symbols for shared libraries ++++++++++++++++++++++++++++++++..................................................... done This is a development version of GIMP. Debug messages may appear here. Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Breakpoint 1, gdk_x_error (display=0x1e1ca80, error=0xbfffe680) at gdkmain-x11.c:614 614 if (error->error_code) (gdb) c Continuing. Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries .+ done Reading symbols for shared libraries .+ done Reading symbols for shared libraries .+ done dbus-launch failed to autolaunch D-Bus session: Autolaunch error: X11 initialization failed. Reading symbols for shared libraries .+ done Reading symbols for shared libraries .... done Reading symbols for shared libraries . done Breakpoint 1, gdk_x_error (display=0x1e1ca80, error=0xbfffeab0) at gdkmain-x11.c:614 614 if (error->error_code) (gdb) bt
+ Trace 135536
Other information: if you zoom in to 800% and use a brush that's only 1x1 pixel and just stipple one pixel at a time, there's no problem, but the moment you try to drag it, it just dies i first noticed this from a gimp i compiled may 5th, but it's present in the one from may 20th
Looks like a bug in the X server. I doubt that there's much we can do.
What's the version of GTK+? What X server are you using?
gtk+ 0.21 from svn head XFree86 Version 4.2.1 / X Window System
Gdk-ERROR **: The program 'gimp' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 14355 error_code 3 request_code 39 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) aborting... i only get that crash when dragging the tool across an image in gimp in the gtk-demo drawing area sample, mtpaint and rgbpaint, i can drag
There is no such such version as gtk+ 0.21.
Oh and could you please explain what you mean when you say "dragging the tool across an image"?
[shadesofgray:xorg/lib/libX11] root# pkg-config --version gtk+-2.0 0.21 [shadesofgray:xorg/lib/libX11] root# take the cursor with a drawing tool, such as the brush, left click, hold it down, drag it *crash*
oops, i don't know how to use pkg-config 2.11.0
2.11.0 is an unstable development release of gtk+. Please report problems with unstable gtk+ releases to the gtk+ developers. I'll leave it up to you to reassign the bug report or to try a stable gtk+ release and report back.
svn trunk head (5/22) of gimp built against the gtk+ 2.10.12 tarball % gdb /tmp/bin/gimp-2.3 GNU gdb 5.3-20030128 (Apple version gdb-282) (Fri Jun 13 03:33:07 GMT 2003) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-darwin". Reading symbols for shared libraries ..................................... done (gdb) b gdk_x_error Breakpoint 1 at 0x605b4: file gtkclist.c, line 7505. (gdb) r --display=:0 --sync Starting program: /private/tmp/bin/gimp-2.3 --display=:0 --sync Reading symbols for shared libraries ++++++++++++++++++++++++++++++++................................................... done This is a development version of GIMP. Debug messages may appear here. Reading symbols for shared libraries . done (gimp-2.3:5349): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks", Reading symbols for shared libraries . done Breakpoint 1, gdk_x_error (display=0x2053a90, error=0xbfffe680) at gdkmain-x11.c:614 614 if (error->error_code) (gdb) c Continuing. Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done dyld: /tmp/lib/gimp/2.0/plug-ins/uri version mismatch for library: /opt/local/lib/libgtk-x11-2.0.0.dylib (compatibility version of user: 1101.0.0 greater than library's version: 1001.0.0) (gimp-2.3:5349): LibGimpBase-WARNING **: gimp-2.3: wire_read(): error dyld: /tmp/lib/gimp/2.0/plug-ins/svg version mismatch for library: /opt/local/lib/libgdk_pixbuf-2.0.0.dylib (compatibility version of user: 1101.0.0 greater than library's version: 1001.0.0) (gimp-2.3:5349): LibGimpBase-WARNING **: gimp-2.3: wire_read(): error dyld: /tmp/lib/gimp/2.0/plug-ins/poppler version mismatch for library: /opt/local/lib/libgdk-x11-2.0.0.dylib (compatibility version of user: 1101.0.0 greater than library's version: 1001.0.0) (gimp-2.3:5349): LibGimpBase-WARNING **: gimp-2.3: wire_read(): error dyld: /tmp/lib/gimp/2.0/plug-ins/helpbrowser version mismatch for library: /opt/local/lib/libgtk-x11-2.0.0.dylib (compatibility version of user: 1101.0.0 greater than library's version: 1001.0.0) (gimp-2.3:5349): LibGimpBase-WARNING **: gimp-2.3: wire_read(): error Reading symbols for shared libraries .+ done Reading symbols for shared libraries .+ done Reading symbols for shared libraries .+ done dbus-launch failed to autolaunch D-Bus session: Autolaunch error: X11 initialization failed. Reading symbols for shared libraries . done Breakpoint 1, gdk_x_error (display=0x2053a90, error=0xbfffeab0) at gdkmain-x11.c:614 614 if (error->error_code) (gdb) bt
+ Trace 135803
Continuing. The program 'gimp-2.3' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 30313 error_code 3 request_code 39 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) (script-fu:5373): LibGimpBase-WARNING **: script-fu: wire_read(): error Program exited with code 01. (gdb)
What were you doing when it crashed? As Sven asked in comment #6, what do you mean by "dragging the tool across an image"? What tool? Does it happen with all tools?
it's explained in comment #7 things like selection tools and the measurement tool can be used with no problem, but if it's a drawing tool (ink, eraser, pencil, etc), it crashes
The code in question is only run for paint tools. But I still don't see anything wrong with that code and it seems to work for everyone else. So this is likely a problem specific to your X server.
It could also be something related to the CPU or compiler, although other Mac users do not seem to have the same problem.
Passing the wrong window to XGetMotionEvents() is unlikely a compiler problem. This code (gdk_device_get_history) is being called from a motion event handler and we are using the window field from the GdkEventMotion struct. That should be a valid X window. If it isn't, that's most likely a bug in GDK or the X server. I strongly suggest that the user checks if this is a known problem with the X server and whether a fixed version is available. Closing as NOTGNOME because there's no indication that this is a problem in GIMP.
*** This bug has been marked as a duplicate of 445376 ***