Crash on using calligraphy tracing tool with wacom tablet

Bug #284546 reported by Vladimir Savic on 2008-10-16
84
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Unassigned

Bug Description

I've browsed existing reports, but haven't find the one that fits perfectly. If this is duplicate, it's my bad.

A trace that's at the end of this report was collected after trying calligraphy trace tool using wacom graphire 3 tablet. All tablet specific tool options were on (pressure sensitivity and tilt - which my graphire doesn't have, but hay... :). Sometimes I get the crash at first try, other times a bit later, but eventually it does happens.

Promised gdb backtrace:

terminate called after throwing an instance of 'Geom::ContinuityError'
  what(): lib2geom exception: Non-contiguous path (2geom/path.cpp:353)

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7f589755c700 (LWP 13284)]
0x00007f588f1a35c5 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007f588f1a35c5 in raise () from /lib64/libc.so.6
#1 0x00007f588f1a4bb3 in abort () from /lib64/libc.so.6
#2 0x00007f588f9ff1d4 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib64/libstdc++.so.6
#3 0x00007f588f9fd5f6 in ?? () from /usr/lib64/libstdc++.so.6
#4 0x00007f588f9fd623 in std::terminate () from /usr/lib64/libstdc++.so.6
#5 0x00007f588f9fd70a in __cxa_throw () from /usr/lib64/libstdc++.so.6
#6 0x00000000009fa377 in Geom::Path::do_append (this=<value optimized out>, c=<value optimized out>) at 2geom/path.cpp:353
#7 0x0000000000775702 in SPCurve::lineto (this=<value optimized out>, p=<value optimized out>) at ./2geom/path.h:570
#8 0x0000000000530e86 in draw_temporary_box (dc=0xfba7e0) at dyna-draw-context.cpp:1231
#9 0x0000000000530f75 in fit_and_split (dc=0xfba7e0, release=0) at dyna-draw-context.cpp:1217
#10 0x00000000005335a7 in sp_dyna_draw_context_root_handler (event_context=0xfba7e0, event=0x5c68f10) at dyna-draw-context.cpp:740
#11 0x0000000000537c92 in sp_event_context_root_handler (event_context=0x33e4, event=0x33e4) at event-context.cpp:892
#12 0x00000000005170b7 in sp_desktop_root_handler (event=0x5c68f10, desktop=0x144ac00) at desktop-events.cpp:66
#13 0x00000000007a62d0 in sp_marshal_BOOLEAN__POINTER (closure=0x2474c50, return_value=0x7fff9f5b04d0, n_param_values=<value optimized out>,
    param_values=0x7fff9f5b02d0, invocation_hint=<value optimized out>, marshal_data=0x517070) at helper/sp-marshal.cpp:352
#14 0x00007f5894ef320d in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#15 0x00007f5894f0708c in ?? () from /usr/lib64/libgobject-2.0.so.0
#16 0x00007f5894f08392 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#17 0x00007f5895e0cff5 in gtk_signal_emit () from /usr/lib64/libgtk-x11-2.0.so.0
#18 0x0000000000780a80 in emit_event (canvas=<value optimized out>, event=<value optimized out>) at display/sp-canvas.cpp:1335
#19 0x0000000000783cd1 in sp_canvas_motion (widget=0x242b000, event=0x50ce400) at display/sp-canvas.cpp:1591
#20 0x00007f5895da9998 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#21 0x00007f5894ef320d in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#22 0x00007f5894f06d6d in ?? () from /usr/lib64/libgobject-2.0.so.0
#23 0x00007f5894f08392 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#24 0x00007f5894f08a53 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#25 0x00007f5895ebea8e in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#26 0x00007f5895da2513 in gtk_propagate_event () from /usr/lib64/libgtk-x11-2.0.so.0
#27 0x00007f5895da355b in gtk_main_do_event () from /usr/lib64/libgtk-x11-2.0.so.0
#28 0x00007f5895a032ac in ?? () from /usr/lib64/libgdk-x11-2.0.so.0
#29 0x00007f589381893a in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#30 0x00007f589381c040 in ?? () from /usr/lib64/libglib-2.0.so.0
#31 0x00007f589381c50d in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#32 0x00007f5895da3977 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#33 0x00000000004520f9 in sp_main_gui (argc=1, argv=0x7fff9f5b10e8) at main.cpp:850
#34 0x000000000045255d in main (argc=1, argv=0x7fff9f5b10e8) at main.cpp:660
(gdb)

Preben S (prsodk) wrote :

Same happens for me. From rev 0.46 to 0.46devel SVN 19994.
Using XP and Intuos 2 with new drivers (same when using old drivers).
Using roll mouse - no problem.

If I am moving tablet mouse/pen while clicking and keep moving until the click has been released, it does not happen (at least not so much).
This is too difficult to control. Using Visual Studio's Spy tool can slow down the input rate from the tablet, making it easier to control.

So if the tablet coordinates comes in duplo (or maybe just too close or reversed), we have the problem.

Preben S (prsodk) wrote :

I have tried to uncomment the "THROW_CONTINUITYERROR();" at line 353 in 2geom/path.cpp and the bug is gone without any bad any side effects.

Couldn't this assertion be removed from the source?

Preben S (prsodk) wrote :

Maybe it was too much to say the bug is gone, as there is an underlying bug.
When the "THROW" is commented out then, where the medicine would kill the patient before, now it will just stop drawing, until the (calligraphic) stroke is restarted.
In order to continue the tracing as intended, it may be necessary to delete the last segment and the reselect previous segment.

nightrow (jb-benoit) on 2009-05-11
Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
goto (gotolaunchpad) wrote :

Why does this bug get a high priority, but the ones mentioning that Wacoms don't work at all only get a medium priority?

nightrow (jb-benoit) wrote :

In my understanding, any crash is labelled as high. Unwanted behavior/misbehavior are labelled medium, when small anyonnances are labelled low.

ScislaC (scislac) wrote :

Is this still an issue with the 0.47 pre-releases? Please test and report back.

Well, I can't tell exactly if it's happening in prerelease tarballs, but it does happen in svn (updated daily).
I still get the same error. I've even changed distribution since original report. It used to be OpenSUSE and now it's gentoo. Backtrace differes a bit in verbosity, but inkscape still breaks at the same line etc.

vlada@savichome ~ $ gdb inkscape
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...
(gdb) run
Starting program: /usr/local/bin/inkscape
[Thread debugging using libthread_db enabled]
[New Thread 0x7f94b0079790 (LWP 12352)]
terminate called after throwing an instance of 'Geom::ContinuityError'
  what(): lib2geom exception: Non-contiguous path (2geom/path.cpp:355)

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7f94b0079790 (LWP 12352)]
0x00007f94a8959645 in raise () from /lib/libc.so.6

tags: added: crash tablet
Johan Engelen (johanengelen) wrote :

I think the problem is that NaN or another invalid point results from the fitting procedure in the draw tool.

Is there any chance to decide future of this bug prior to 0.47? If it can't be done - ok then. But I'd like to hear that.

Thanks for attention,
Vlada

laborator (thomas-j-schrader) wrote :

erroneously posted to Bug #169006 before -> moved here

Hi everybody,

So guide tracing in 0.47 still crashes. Sometimes it works nicely over 10 or 20 strokes before crashing but then it always crashes at the very beginning of the next stroke holding ctrl and when the pen touches the tablet. I would *really* appreciate that functionality working more or less.

(Forgive me but this is IMHO a somewhat experimental or at least alternative artistic feature, so for me it would be fine loosing one stroke from time to time. But it *is* a problem for me when my work just crashes for a minor reason ... it should be more forgiving and just catch the error instead of crashing until you find a better solution.)

OS1: Mac OS X 10.6.2, XQuartz 2.3.4 (xorg-server 1.4.2-apple45)

OS2: Windows 7

Hardware: Mac Mini core duo 1.66, 2007 with Wacom Intuos 4 small on USB, driver 6.6.1-2

diagnostic files follow from Mac OS X

laborator (thomas-j-schrader) wrote :
laborator (thomas-j-schrader) wrote :
laborator (thomas-j-schrader) wrote :

hope you can patch this. It's a great app.

Cheers

laborator

su_v (suv-lp) on 2010-03-15
summary: - SVN, rev.19997: Crash on using calligraphy tracing tool with wacom
- tablet
+ Crash on using calligraphy tracing tool with wacom tablet

Still crashing on 0.48-pre!

Hardware is all new (wacom tablet upgraded also). Not sure if that matters, but...

Still crashes on 0.48 stable version with Wacom Bamboo Pen and also Wacom Bamboo Pen & Touch using Ubuntustudio 10.04 64 Bit version.

Crashing on Windows 7 32-bit, Wacom tablet, and 0.48.

August@Brahma /cygdrive/c/Program Files/Inkscape
$ gdb inkscape.exe
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(no debugging symbols found)
(gdb) run
Starting program: /cygdrive/c/Program Files/Inkscape/inkscape.exe
[New thread 2960.0xdb8]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New thread 2960.0xe08]
[New thread 2960.0x1474]
[New thread 2960.0x1470]
[New thread 2960.0x20c]
[New thread 2960.0x1364]
warning: Invalid parameter passed to C runtime function.

warning: Invalid parameter passed to C runtime function.

RegistryTool: Could not set the value 'C:\Program Files\Inkscape\inkscape.exe'

Emergency save activated!

Emergency save document locations:
  C:\cygwin\home\August\New document 1.2010_11_02_23_46_04.0.svg
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at www.inkscape.org
with a detailed description of the steps leading to the crash, so we can fix it.

Program exited with code 03.

Because I cannot make it crash, I need your help. Can you apply this
patch, and see what messages you get on the terminal? You should be
looking for something like "point1[0] not finite".

=== modified file src/dyna-draw-context.cpp
--- src/dyna-draw-context.cpp 2011-06-23 16:38:51 +0000
+++ src/dyna-draw-context.cpp 2011-08-18 20:01:00 +0000
@@ -1250,6 +1250,15 @@
  {
      dc->currentcurve->reset();

+ for (gint i = dc->npoints-1; i >= 0; i--) {
+ if (!dc->point1[i].isFinite()) {
+ g_message("point1[%d] not finite",i);
+ }
+ if (!dc->point2[i].isFinite()) {
+ g_message("point2[%d] not finite",i);
+ }
+ }
+
      dc->currentcurve->moveto(dc->point2[dc->npoints-1]);
      for (gint i = dc->npoints-2; i >= 0; i--) {
          dc->currentcurve->lineto(dc->point2[i]);

Thanks,
   Johan

Preben S (prsodk) wrote :

With r 10556 on XP (devlib r 24), I cannot crash it anymore with the calligraphic tool.

I did not even apply the patch.

When it happened before, I found with help of spy tool intercepting the message queue, that it occurred when Inkscape received identical coordinates two times in a row.

Maybe this has been corrected (as I asked Tor Lillqvist to do) in the newer gtk version. I can't find the e-mail I sent him, so this is just as I remember it.

Regards
Preben

Unnecessary note :) - Reconfirmed on Ubuntu 12.10!

su_v (suv-lp) on 2013-01-14
tags: added: calligraphy
Changed in inkscape:
status: Confirmed → Triaged

Still crashing.

Inkscape 0.48.2 r9819
Mac OSX 10.8.4
Tableb Wacom Bamboo Pen & Touch

I only crashes with the Ctrl + stylus input. I doesn't crash if Ctrl + trackpad input.

Same setup as above, I applied the patch from comment #17 into the stable inkscape-0.48.4.tar.gz (the same used with Homebrew, haven't managed to compile the latest from bzr yet.).
Here are the debug messages:
===
~/build/inkscape-0.48.4/src $ ~/local/inkscapesrc/bin/inkscape
Fontconfig warning: FcPattern object fontfeatures does not accept value True
Fontconfig warning: FcPattern object fontfeatures does not accept value True
** Message: point1[0] not finite
** Message: point2[0] not finite
** Message: point1[1] not finite
** Message: point2[1] not finite
** Message: point1[0] not finite
** Message: point2[0] not finite
libc++abi.dylib: terminate called throwing an exception

Emergency save activated!

Emergency save document locations:
  /Users/guilherme/New document 1.2013_08_18_19_59_48.0.svg
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at www.inkscape.org
with a detailed description of the steps leading to the crash, so we can fix it.
inkscape: Fatal IO error 35 (Resource temporarily unavailable) on X server /tmp/launch-fmeoHy/org.macosforge.xquartz:0.
===

I am not familiar with the code, any suggestion what to do next?
Regards, Guilherme

ScislaC (scislac) wrote :

Is anyone able to reproduce this with trunk? If so, would you be willing to apply the patch that Johan provided above, recompile, and test again?

alejandro purgue (apurgue) wrote :

The problem as I see it running OSX 10.8.5 is triggered whenever the pressure sensitivity is enabled. Before that the pen could be used to create calligraphic lines. Here is a trace:

NU gdb 6.3.50-20050815 (Apple version gdb-1824) (Wed Feb 6 22:51:23 UTC 2013)
Copyright 2004 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 "x86_64-apple-darwin"...Reading symbols for shared libraries ........ done

(gdb) run inkscape
Starting program: /Applications/Inkscape.app/Contents/MacOS/Inkscape inkscape
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
Warning: AppleCollationOrder setting not found, using AppleLocale.
Setting Language: .UTF-8

(process:50639): Gtk-WARNING **: Locale not supported by C library.
 Using the fallback 'C' locale.
/Users/alejandro/.inkscape-etc/gtkrc:56: Clearlooks configuration option "menuitemstyle" is not supported and will be ignored.
/Users/alejandro/.inkscape-etc/gtkrc:57: Clearlooks configuration option "listviewitemstyle" is not supported and will be ignored.
/Users/alejandro/.inkscape-etc/gtkrc:58: Clearlooks configuration option "progressbarstyle" is not supported and will be ignored.

(inkscape-bin:50639): Gtk-WARNING **: Could not find the icon 'object-visible'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
 http://icon-theme.freedesktop.org/releases
libc++abi.dylib: terminate called throwing an exception

Emergency save activated!

Emergency save document locations:
  /Users/alejandro/New document 1.2013_12_02_13_44_55.0.svg
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at www.inkscape.org
with a detailed description of the steps leading to the crash, so we can fix it.

Program received signal SIGINT, Interrupt.
0x95b937ce in mach_msg_trap ()
(gdb) bt
#0 0x95b937ce in mach_msg_trap ()
#1 0x95b92cac in mach_msg ()
#2 0x97094f79 in __CFRunLoopServiceMachPort ()
#3 0x9709a95f in __CFRunLoopRun ()
#4 0x9709a01a in CFRunLoopRunSpecific ()
#5 0x97099e8b in CFRunLoopRunInMode ()
#6 0x91606f5a in RunCurrentEventLoopInMode ()
#7 0x91606cc9 in ReceiveNextEventCommon ()
#8 0x9176c1ad in _AcquireNextEvent ()
#9 0x9175af6a in RunApplicationEventLoop ()
#10 0x00002b9e in main ()

su_v (suv-lp) wrote :

@alejandro - based on the console messages you are using the latest official package for Mac OS X: Inkscape 0.48.2. The crash has been confirmed for that version already.

@ScislaC - yes, latest trunk still crashes, same backtrace (attached is a backtrace from debug build r12833 with latest GTK+/X11 2.24.22 on OS X 10.7.5). I'll recompile with Johan's patch to get more console output about the issue once I figured out where that file / code section was moved to.

su_v (suv-lp) wrote :

Attaching new version of diff to get more detailed console output from comment #17 (updated to current trunk r12833).

su_v (suv-lp) wrote :

Attaching new backtrace created with r12833+diff (on OS X 10.7.5, GTK+/X11 2.24.22).

Additional console messages right before the crash occurs:

** Message: point1[0] not finite
** Message: point2[0] not finite
** Message: point1[1] not finite
** Message: point2[1] not finite
** Message: point1[0] not finite
** Message: point2[0] not finite
terminate called throwing an exception
Program received signal SIGABRT, Aborted.
0x00007fff8f2d8ce2 in __pthread_kill ()

Lucian (lucian-j) wrote :

This happens reliably for me on 0.91. If I hold down control with the calligraphy tool selected, Inkscape crashes immediately as soon as the pen touches the tablet (Wacom Bamboo CTL-471) Running on MacOS 10.10.3

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers