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 164272 - crash with the ink tool used with a graphic tablet
crash with the ink tool used with a graphic tablet
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
2.2.x
Other Linux
: Normal critical
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
: 300353 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-01-16 19:45 UTC by Xavier Benderitter
Modified: 2008-01-15 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Gimp Ink tool option dialog (25.68 KB, image/png)
2005-01-17 20:42 UTC, Xavier Benderitter
  Details
backport to gimp-2-2 (3.84 KB, patch)
2005-03-21 21:57 UTC, Sven Neumann
none Details | Review
backport to gimp-2-2 (4.05 KB, patch)
2005-03-21 22:04 UTC, Sven Neumann
none Details | Review

Description Xavier Benderitter 2005-01-16 19:45:46 UTC
The gimp crashed when I use the feather tool with the stylus of my graphic tablet

message in the console:

(script-fu:2653): LibGimpBase-WARNING **: script-fu: wire_read(): error
Erreur de segmentation (Segmentation fault)
Comment 1 weskaggs 2005-01-16 19:54:39 UTC
Sorry, but there is no "feather tool".  If you could explain more clearly which
tool you were using, and what you were doing when it crashed, that would be very
helpful.
Comment 2 Xavier Benderitter 2005-01-16 21:08:04 UTC
For me, the feather tool is the ink tool, the ink drawing tool "Dessiner à
l'encre" in french. Well, when I use this tool with the stylus of my tablet
graphic (with linuxwacom-0.6.6) the gimp crash with a 'Segmentation fault'. The
Gimp version 2.0.6 or older don't crash with this tool.

Excuse my very bad english.  
Comment 3 weskaggs 2005-01-16 21:20:51 UTC
That's okay.  Please tell us:
1) What Linux distro you use?
2) What kind of tablet?
3) Does it crash when you begin to draw on the image, or at some other time?

The most useful thing you can do is give us a stack trace.  Please do this:
1) Run "gdb gimp"
2) At the prompt, type "run"
3) Make it crash
4) At the prompt, type "where"
5) Copy the result, and paste it into this bug report.

Comment 4 Xavier Benderitter 2005-01-17 10:50:20 UTC
I use a Debian 3.1
The tablet is a wacom graphire 3 usb (with linuxwacom-0.6.6)
The gimp crash when I begin to draw at the first click of the stylus on the
graphic tablet.

I try to have more informations with gdb but X crash before i can enter the
command "where". That's all that I can obtain.
My output message in the console:

  (gdb) run
  Starting program: /usr/local/bin/gimp-2.2
  [Thread debugging using libthread_db enabled]
  [New Thread 16384 (LWP 2275)]

  Program received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 16384 (LWP 2275)]
  0x08250033 in blob_fill (b=0x8ee0500, present=0x8eb77e0) at gimpink-blob.c:  
      
  544
  544           if(! (present[i1+1]&EDGE_LEFT))

I try to redirect the output to another virtual console but it doesn't work.
Comment 5 weskaggs 2005-01-17 17:56:33 UTC
Do you mean that the X server crashes (goes away) or freezes?

Please do this, if you can:  Start gimp, switch to the Ink Tool, but before
trying to use it, make a screenshot of the Tool Options dialog, and attach it to
this bug report.  

Also, here is a way to get a stack trace using a virtual console (I think this
will work):
1) Start gimp normally
2) In a terminal, type "ps aux | grep gimp"
3) In the output, you will see a line that looks like:

bill     11231 24.4  2.6 27100 20764 pts/6   S    09:12   0:02 gimp-2.2

The second number (11231 here) is the pid -- make a note of it.
4) Switch to a virtual console, and run gdb --pid=XXX, where XXX is replaced by
the pid number.  This causes gdb to attach to the gimp process.
5) Type "set logging gdb.out", to cause output to be logged to the file gdb.out.
6) At the prompt, type 'c' (which means continue) until there is no response.
7) Switch back to the X virtual console, and run GIMP until it crashes.
8) Switch to the virtual console, and type "where".
9) Type "quit".  If you are lucky, the file gdb.out will contain the desired
stack trace.
Comment 6 Xavier Benderitter 2005-01-17 20:42:03 UTC
Created attachment 36141 [details]
Gimp Ink tool option dialog

Hi ! 
Its very cool, I learn a lot of things with this bug report :o).

In fact the gimp freezes (when i used gdb) it doesn't crash.

The output of gdb.out:

Continuing.

Program received signal SIGSEGV, Segmentation fault.

Thread 16384 (LWP 25352)

  • #0 blob_fill
    at gimpink-blob.c line 544
  • #1 blob_ellipse
  • #2 ink_pen_ellipse
  • #3 gimp_ink_motion
    at gimpink.c line 313
  • #4 gimp_paint_core_paint
    at gimppaintcore.c line 258
  • #5 gimp_paint_core_real_interpolate
    at gimppaintcore.c line 217
  • #6 gimp_paint_core_interpolate
    at gimppaintcore.c line 466
  • #7 gimp_paint_tool_motion
    at gimppainttool.c line 548
  • #8 gimp_tool_motion
    at gimptool.c line 419
  • #9 gimp_display_shell_canvas_tool_events
    at gimpdisplayshell-callbacks.c line 1114
  • #10 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #11 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #15 gtk_widget_send_expose
    from /usr/lib/libgtk-x11-2.0.so.0
  • #16 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #17 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #18 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #19 g_main_depth
    from /usr/lib/libglib-2.0.so.0
  • #20 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #21 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #22 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #23 app_run
    at app_procs.c line 375
  • #24 main
    at main.c line 473

Comment 7 Sven Neumann 2005-01-18 01:07:59 UTC
I wonder if that's the crash that I fixed lately in the HEAD branch:

2005-01-03  Sven Neumann  <sven@gimp.org>

        * app/paint/gimpink.[ch]: handle event time as guint32. That's the
        type we deal with here and it avoids a crash that occured when
        autoscrolling with the Ink tool.

I haven't backported this to the stable branch yet, perhaps I should.
Comment 8 weskaggs 2005-01-18 22:09:09 UTC
The time value that appears in the stack trace is exactly 0x80000000, so that
seems like a very reasonable idea.
Comment 9 weskaggs 2005-01-19 17:50:51 UTC
In any case, shouldn't be NEEDINFO any more.
Comment 10 weskaggs 2005-01-19 19:50:00 UTC
Actually the time shown in the stack trace is 0x7FFFFFFE (which is even more
striking, of course).
Comment 11 popolon 2005-02-02 23:05:54 UTC
I have near the same configuration
Wacom volito
Xorg 6.8.1
linuxwacom-0.6.6
I'v the same crash with gimp-2.2.3, but not with today cvs version.
the guint32 was corrected in CVS, before 2.2.3 release:
http://cvs.gnome.org/viewcvs/gimp/app/paint/gimpink.c?r1=1.144&r2=1.145
but was not backported in 2.2.3 src...
Comment 12 popolon 2005-02-23 14:02:29 UTC
The correction hasn't be backported in stable before 2.2.4 release, then the
crash is always present in 2.2.4

in gimp_ink_motion:

      gdouble  lasttime, thistime;
Comment 13 Sven Neumann 2005-02-23 17:31:02 UTC
If someone had set the milestone to 2.2, the fix would have been in 2.2.4...
Comment 14 Sven Neumann 2005-02-23 17:43:20 UTC
The "fix" is actually pretty much bogus and should be reviewed before it is
backported.
Comment 15 Sven Neumann 2005-03-21 21:52:21 UTC
I reviewed the changes in the HEAD branch and I think that we now have a proper
fix. It would need some testing though before it goes into a stable release.

2005-03-21  Sven Neumann  <sven@gimp.org>

	* app/paint/gimpink.c: changed time-smoother code to use guint32
	time values externally, guint64 internally. Proper fix for bug
	#164272.
Comment 16 Sven Neumann 2005-03-21 21:57:57 UTC
Created attachment 39035 [details] [review]
backport to gimp-2-2

This patch is a backport of the changes in HEAD to the gimp-2-2 branch. If you
can, please test this and report back.
Comment 17 Sven Neumann 2005-03-21 22:04:18 UTC
Created attachment 39036 [details] [review]
backport to gimp-2-2

The first patch was missing a change, please use this one.
Comment 18 weskaggs 2005-03-22 18:16:27 UTC
Setting to NEEDINFO since there is nothing more that can be done with this bug
report until feedback is provided.  No intention to put pressure on anybody,
just bookkeeping.
Comment 19 popolon 2005-03-22 21:37:37 UTC
This fix the crash, as if guint32 is used instead of gdouble.

I m' not sure about the precision change and if it's really related but, I've
this with this patch (as before):

http://popolon.free.fr/Precision_ink.png

In black, ink tool
In red, paintbrush tool.

There is like a random size increase effect with the ink tool. I don't tried
recent CVS version to see if there is this effect.


Comment 20 Sven Neumann 2005-03-23 18:10:20 UTC
Having this bug set to NEEDINFO will most probably cause it to miss another 2.2
release. Reopening...
Comment 21 Sven Neumann 2005-03-23 18:14:12 UTC
The image that is shown in comment #19 doesn't look like we found a satisfying
fix. I guess I will have to pull my tablet out of the dust and give it a try
myself...
Comment 22 Sven Neumann 2005-04-09 12:42:41 UTC
I've tried the Ink tool with my Wacom now, both in HEAD and in 2.2 branch with
the changes applied and it seems to work nicely for me. I've thus applied the
change to the 2.2 branch:

2005-04-09  Sven Neumann  <sven@gimp.org>

	* app/paint/gimpink.c: merged changes to the time-smoother code
	from the HEAD branch. Fixes bug #164272.
Comment 23 weskaggs 2005-04-12 18:06:08 UTC
*** Bug 300353 has been marked as a duplicate of this bug. ***