GNOME Bugzilla – Bug 164272
crash with the ink tool used with a graphic tablet
Last modified: 2008-01-15 12:45:34 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)
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.
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.
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.
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.
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.
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.
+ Trace 54609
Thread 16384 (LWP 25352)
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.
The time value that appears in the stack trace is exactly 0x80000000, so that seems like a very reasonable idea.
In any case, shouldn't be NEEDINFO any more.
Actually the time shown in the stack trace is 0x7FFFFFFE (which is even more striking, of course).
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...
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;
If someone had set the milestone to 2.2, the fix would have been in 2.2.4...
The "fix" is actually pretty much bogus and should be reviewed before it is backported.
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.
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.
Created attachment 39036 [details] [review] backport to gimp-2-2 The first patch was missing a change, please use this one.
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.
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.
Having this bug set to NEEDINFO will most probably cause it to miss another 2.2 release. Reopening...
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...
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.
*** Bug 300353 has been marked as a duplicate of this bug. ***