After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 138341 - Gimp crashes when I use a Wacom Graphics tablet
Gimp crashes when I use a Wacom Graphics tablet
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.2.x
Other Windows
: Normal major
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
: 81663 130204 136244 138155 138241 138426 141479 141612 142148 142838 143083 143766 144966 145617 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-03-28 15:51 UTC by Peter Loft
Modified: 2011-02-04 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Suggested patch. (2.55 KB, patch)
2004-04-04 21:33 UTC, Tor Lillqvist
none Details | Review
Patch for Wintab bugs in Win32 port of GTK+ (4.31 KB, patch)
2004-05-11 18:38 UTC, Robert Ögren
none Details | Review

Description Peter Loft 2004-03-28 15:51:28 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.
Comment 1 Sven Neumann 2004-03-28 15:58:46 UTC
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.
Comment 2 Sven Neumann 2004-03-28 16:00:59 UTC
The same error messages have been reported in bug #138155. So perhaps they are
not related to the tablet problem at all.
Comment 3 Sven Neumann 2004-03-28 16:25:25 UTC
See http://groups.yahoo.com/group/gimpwin-users/message/11945 for a workaround.
Comment 4 Sven Neumann 2004-03-28 16:25:54 UTC
*** Bug 138241 has been marked as a duplicate of this bug. ***
Comment 5 Sven Neumann 2004-03-28 19:03:36 UTC
*** Bug 138155 has been marked as a duplicate of this bug. ***
Comment 6 Sven Neumann 2004-03-29 16:31:26 UTC
*** Bug 138426 has been marked as a duplicate of this bug. ***
Comment 7 Tor Lillqvist 2004-04-04 21:21:36 UTC
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.)
Comment 8 Tor Lillqvist 2004-04-04 21:33:28 UTC
Created attachment 26325 [details] [review]
Suggested patch.
Comment 9 Sven Neumann 2004-04-30 10:15:21 UTC
*** Bug 141479 has been marked as a duplicate of this bug. ***
Comment 10 Sven Neumann 2004-05-02 09:47:04 UTC
*** Bug 141612 has been marked as a duplicate of this bug. ***
Comment 11 Hans Breuer 2004-05-09 12:29:30 UTC
*** Bug 142148 has been marked as a duplicate of this bug. ***
Comment 12 Hans Breuer 2004-05-09 13:21:35 UTC
*** Bug 136244 has been marked as a duplicate of this bug. ***
Comment 13 Robert Ögren 2004-05-11 18:38:17 UTC
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
Comment 14 Tor Lillqvist 2004-05-12 23:38:25 UTC
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.)
Comment 15 Eduardo Teixeira 2004-05-13 21:24:53 UTC
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
Comment 16 Henrik Brix Andersen 2004-05-20 13:54:52 UTC
*** Bug 142838 has been marked as a duplicate of this bug. ***
Comment 17 Sven Neumann 2004-05-24 16:55:35 UTC
*** Bug 143083 has been marked as a duplicate of this bug. ***
Comment 18 Tim Lockwood 2004-05-25 13:19:40 UTC
Is there a binary anywhere with this patch included?
Comment 19 Tor Lillqvist 2004-05-25 13:39:49 UTC
No.
Comment 20 Sven Neumann 2004-06-05 16:36:17 UTC
*** Bug 143766 has been marked as a duplicate of this bug. ***
Comment 21 Sven Neumann 2004-06-07 09:31:34 UTC
*** Bug 141598 has been marked as a duplicate of this bug. ***
Comment 22 Sven Neumann 2004-06-28 11:04:10 UTC
*** Bug 144966 has been marked as a duplicate of this bug. ***
Comment 23 Tor Lillqvist 2004-07-08 10:28:45 UTC
*** Bug 130204 has been marked as a duplicate of this bug. ***
Comment 24 Tor Lillqvist 2004-07-08 13:32:53 UTC
*** Bug 81663 has been marked as a duplicate of this bug. ***
Comment 25 Sven Neumann 2004-07-09 14:05:39 UTC
*** Bug 145617 has been marked as a duplicate of this bug. ***