Crash on using calligraphy tracing tool with wacom tablet

Bug #284546 reported by Vladimir Savic
86
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
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)

Revision history for this message
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.

Revision history for this message
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?

Revision history for this message
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)
Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
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?

Revision history for this message
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.

Revision history for this message
ScislaC (scislac) wrote :

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

Revision history for this message
Vladimir Savic (vladimir-firefly-savic) wrote :

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
Revision history for this message
Johan Engelen (johanengelen) wrote :

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

Revision history for this message
Vladimir Savic (vladimir-firefly-savic) wrote :

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

Revision history for this message
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

Revision history for this message
laborator (thomas-j-schrader) wrote :
Revision history for this message
laborator (thomas-j-schrader) wrote :
Revision history for this message
laborator (thomas-j-schrader) wrote :

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

Cheers

laborator

su_v (suv-lp)
summary: - SVN, rev.19997: Crash on using calligraphy tracing tool with wacom
- tablet
+ Crash on using calligraphy tracing tool with wacom tablet
Revision history for this message
Vladimir Savic (vladimir-firefly-savic) wrote :

Still crashing on 0.48-pre!

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

Revision history for this message
PomPrint Designs (pomprintdesigns) wrote :

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

Revision history for this message
August E. Brunsman IV (lucidcarbon) wrote :

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.

Revision history for this message
Johan Engelen (johanengelen) wrote : debug patch

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

Revision history for this message
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

Revision history for this message
Vladimir Savic (vladimir-firefly-savic) wrote :

Unnecessary note :) - Reconfirmed on Ubuntu 12.10!

su_v (suv-lp)
tags: added: calligraphy
Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
Guilherme Brondani Torri (guitorri) wrote :

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.

Revision history for this message
Guilherme Brondani Torri (guitorri) wrote :

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

Revision history for this message
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?

Revision history for this message
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 ()

Revision history for this message
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.

Revision history for this message
su_v (suv-lp) wrote :

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

Revision history for this message
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 ()

Revision history for this message
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

Revision history for this message
boussad (picks) wrote :

I am not running an upgraded copy, I did a clean OS install using media created with Microsoft's Media Creation Tool shortly after the necessary upgrade to activate. I removed the default driver for my tablet that Windows installs using device manager, then installed a fresh copy of the Win 10 driver after reboot. I then restored my backed-up preferences.
see : https://pnrstatus.vip/ , https://textnow.vip/ , https://downloader.vip/vpn/

Revision history for this message
Marcia (marcia-avramo) wrote :

Hi. I'm learning Inkscape and doing some exercises.
I have the same error the Beizer tool has crashed some many times in this file i was working on, so many lines i have to do.
I am using
Windows 10
Inkscape 0.92.4
Graphic tablet Genius MousePen 8x6

Whole computer slow down and dont run Ctr+Alt+Sup

i send you the screenshot of the error. The file I was working in, is only 214 kb

After 15 minutes the program run and i could close the file.

Thanks

Revision history for this message
HISOL99 (harald-karlsen) wrote :

I am using a new fresh installation of Inkscape 1.1.1 with Wacom Intuos S pen tablet (Bluetooth). Newest Wacom Driver 6.3.44-1 (Windows 10, latest update, Swedish language).

Open a new document in Inkscape.

Problem: Creating bezier art in new Inkscape 1.1.1. Within a minute I receive the error "Inkscape encountered an internal error and will close. New document C:\Users\...\New document\1.2021_09_29_23_58_21.0.svg ... Close." I can't figure out if it is the Wacom pen tablet settings for pressure, or if it is something in the bezier settings? Maybe a memory overflow bug triggering a communication error between mouse and pen for the tablet? I am lifting the pen, moving it on the tablet, changing between mouse and pen. Could the Wacom Intuos pen in Inkscape Wacom Intuos interfere with my Logitech MX Master 2S (also installed the latest Logitech drivers)?

Environment:

Inkscape 1.1.1 (3bf5ae0d25, 2021-09-20)

    GLib version: 2.70.0
    GTK version: 3.24.30
    glibmm version: 2.66.1
    gtkmm version: 3.24.5
    libxml2 version: 2.9.12
    libxslt version: 1.1.34
    Cairo version: 1.17.4
    Pango version: 1.48.10
    HarfBuzz version: 2.9.1
    Poppler version: 21.08.0

    OS version: Windows 10 2009

Kind regards,
Harald

Revision history for this message
Kabir Singh (kabir07) wrote :

Few things to try:

1. Make sure you have the latest video drivers
2. Make sure you have the latest Wacom driver.

Kabir,
From: https://www.indiantrain.in/

Revision history for this message
HISOL99 (harald-karlsen) wrote : Re: [Bug 284546] Re: Crash on using calligraphy tracing tool with wacom tablet

Thanks Kabir,

I have the latest Nvidia-drivers and the latest Wacom drivers.

Kind regards,

Harald Karlsen.

Den 2021-10-02 kl. 23:35, skrev Kabir Singh:
> Few things to try:
>
> 1. Make sure you have the latest video drivers
> 2. Make sure you have the latest Wacom driver.
>
> Kabir,
> From: https://www.indiantrain.in/
>

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.