GNOME Bugzilla – Bug 138341
Gimp crashes when I use a Wacom Graphics tablet
Last modified: 2011-02-04 16:16:32 UTC
Gimp running on Windows 2000 Pro 512 meg RAM on AMD 2000+ XP Wacom Graphics tablet - driver version 4.78-6 Run Gimp. Load or Create an image. Move cursor into image window using graphics tablet instead of mouse. Error screen shows with the following messages: (gimp-2.0.exe:300): Gdk-WARNING ++: losing last reference to undestroyed window (gimp-2.0.exe:300): Glib-GObject-CRITICAL **: file gobject.c: line 1320 (g-object_ref): assertion 'object-> ref_count > 0' failed (gimp-2.0.exe:300): Glib-GObject-CRITICAL **: file gobject.c: line 1338 (g-object_ref): assertion 'object-> ref_count > 0' failed (gimp-2.0.exe:300): Glib-GObject-CRITICAL **: file gobject.c: line 1338 (g-object_ref): assertion 'object-> ref_count > 0' failed The program then halts... if I close any window, including the error window, the whole program dies and all windows disappear. The OS remains stable, however.
Looks like a reference counter problem in the win32 GDK port. I will reassign the bug report to gtk+. It has originally been reported against GIMP-2.0.0.
The same error messages have been reported in bug #138155. So perhaps they are not related to the tablet problem at all.
See http://groups.yahoo.com/group/gimpwin-users/message/11945 for a workaround.
*** Bug 138241 has been marked as a duplicate of this bug. ***
*** Bug 138155 has been marked as a duplicate of this bug. ***
*** Bug 138426 has been marked as a duplicate of this bug. ***
If the tablet support in gdk/win32 really has bitrotted this badly (and not just doesn't work well), I think it should be disabled by default, and enabled only when asked for with a command-line switch (or environment variable). (Currently it's the other way around, the --ignore-wintab switch turns tablet support off.)
Created attachment 26325 [details] [review] Suggested patch.
*** Bug 141479 has been marked as a duplicate of this bug. ***
*** Bug 141612 has been marked as a duplicate of this bug. ***
*** Bug 142148 has been marked as a duplicate of this bug. ***
*** Bug 136244 has been marked as a duplicate of this bug. ***
Created attachment 27620 [details] [review] Patch for Wintab bugs in Win32 port of GTK+ This problem occurs for me as well. I have made an attempt to correct this and other severe tablet problems in the Win32 port of GTK+. The problem described above is a reference counting problem in gdk/win32/gdkevents-win32.c, it does event->any.window = window; without increasing the reference count on the window. Additionally, in gdk/win32/gdkinput-win32.c, buffer storage is not allocated for event->button.axes and event->motion.axes before calling gdk_input_translate_coordinates (compare with the x11 version), and there is an unsigned int wraparound problem in the code that detects missing button clicks/releases, which causes an endless stream of press/release events that in turn causes jerky motion when drawing. There are also some problems when assigning max values to the gdkdev axes at init, it assigns to min instead (copy/paste error?). I was also forced to change the output range of the GDK_AXIS_PRESSURE axis to [0.0, 1.0] since Gimp 2.0 seemed to expect that. I have made a patch for all these problems. It is one big patch because all of the fixes are required to get a usable tablet. If you do not like this, I could file separate bug reports and create separate patches. The patch is made against the GTK+ sources in gtk+-2.2.4-20040124.zip from http://www.gimp.org/~tml/gimp/win32/ . I have only tested it on my system which is Windows XP SP1 using a Wacom Graphire 3 USB tablet with the 4.78-6 driver, compiling with the MinGW compiler in a Cygwin shell. With the patch my tablet is usable in Gimp 2.0, with pressure support. There are some remaining issues, but they may be caused by bugs in Gimp and not GTK+ and need to be investigated further. I have not tested the patch against GTK+ 2.4.1 other than testing that it applies cleanly, but not compiled it. However, no changes seem to have been made to the relevant portions of the source files mentioned above so hopefully it should still work (knock on wood). Apply in gtk+-2.x.y/ with the command patch -p1 < gdk-wintab.patch
Thank you very much for looking into this! Patch applied to HEAD and gtk-2-4. (Not applied to gtk-2-2 branch, as there won't be any more GTK+ 2.2 releases, and I doubt I will do any more snapshot builds of it either.)
Thanks :). With this problem resolved, Gimp 2.0 has a whole expressive dimension. You see, as one said "drawing with a mouse is like painting with a soap". Thanks. Open-source is truly the best development model. Eduardo
*** Bug 142838 has been marked as a duplicate of this bug. ***
*** Bug 143083 has been marked as a duplicate of this bug. ***
Is there a binary anywhere with this patch included?
No.
*** Bug 143766 has been marked as a duplicate of this bug. ***
*** Bug 141598 has been marked as a duplicate of this bug. ***
*** Bug 144966 has been marked as a duplicate of this bug. ***
*** Bug 130204 has been marked as a duplicate of this bug. ***
*** Bug 81663 has been marked as a duplicate of this bug. ***
*** Bug 145617 has been marked as a duplicate of this bug. ***