crashes when USB input device is disconnected

Bug #474954 reported by bcrowell
68
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
High
Unassigned

Bug Description

I sometimes use Inkscape with a Wacom Bamboo USB drawing tablet. If I unplug the tablet from the USB port while Inkscape is running, it crashes about 30 seconds later.

Revision history for this message
bcrowell (launchpadcrowell07) wrote :

The error message was:

The program 'inkscape' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDevice, invalid or uninitialized input device'.
  (Details: serial 507108 error_code 146 request_code 140 minor_code 30)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

This is with Inkscape 0.46 (Apr 8 2009), on Ubuntu Jaunty, x64.

su_v (suv-lp)
tags: added: tablet
tags: added: crash
su_v (suv-lp)
Changed in inkscape:
importance: Undecided → High
Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Ubuntu 9.10, Inkscape 0.47+dev rev. 9147, with almost the same error:

---
The program 'inkscape' received an X Window System error.
This probably reflects a bug in the program.
The error was 'XI_BadDevice (invalid Device parameter)'.
  (Details: serial 109694 error_code 151 request_code 147 minor_code 13)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Program exited with code 01.
(gdb) bt
No stack.
----

You don't need to wait 30 seconds. Just select another application and go back to Inkscape.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :

Not reproduced on Vista, Inkcape 0.47.
Linux (or X) only?

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

related (or duplicate?):

Bug #518234 “crash when moving objects”: Inkscape crashes when the mouse is plugged into a defective USB port.
<https://bugs.launchpad.net/inkscape/+bug/518234>

Revision history for this message
TimMadden (timmadden) wrote :

I have this bug. On Ubuntu 10.10 using Inkscape from the repo. version 0.48.0-1ubuntu1

Happens when i click hold and drag with the mouse. my workaround has been to just not do that. instead, i change the x y coordinates on the tool bar, but it is a pain.

let me know if you need info from me.

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

Related (or new duplicate):

Bug #818543 “inkscape crash when USB mouse is disconnected”
<https://bugs.launchpad.net/inkscape/+bug/818543>

Revision history for this message
jazzynico (jazzynico) wrote :

Backtrace with Inkscape revision 10523, Ubuntu 10.10 (with breakpoint on _XError):

--
Breakpoint 1, 0x0109b536 in _XError () from /usr/lib/libX11.so.6
(gdb) bt
#0 0x0109b536 in _XError () from /usr/lib/libX11.so.6
#1 0x0109815a in ?? () from /usr/lib/libX11.so.6
#2 0x0109889c in _XReply () from /usr/lib/libX11.so.6
#3 0x0221702b in XGrabDevice () from /usr/lib/libXi.so.6
#4 0x0199d749 in _gdk_input_grab_pointer (window=0xa5e5230, native_window=0x8aaba28, owner_events=0, event_mask=2110212,
    confine_to=0x0, time=64203805) at /build/buildd/gtk+2.0-2.22.0/gdk/x11/gdkinput-xfree.c:353
#5 0x0198b68b in _gdk_windowing_pointer_grab (window=0xa5e5230, native=0x8aaba28, owner_events=0, event_mask=2110212, confine_to=
    0x0, cursor=0x0, time=64203805) at /build/buildd/gtk+2.0-2.22.0/gdk/x11/gdkmain-x11.c:201
#6 0x0196acc9 in IA__gdk_pointer_grab (window=0xa5e5230, owner_events=0, event_mask=772, confine_to=0x0, cursor=0x0,
    time=64203805) at /build/buildd/gtk+2.0-2.22.0/gdk/gdkwindow.c:10329
#7 0x081dc6fa in sp_canvas_item_grab (item=0x9d6c920, event_mask=3844, cursor=0x0, etime=64203805) at display/sp-canvas.cpp:556
#8 0x085b2f3a in sp_select_context_root_handler (event_context=0x9d6a238, event=0xa612f78) at select-context.cpp:509
#9 0x0808fb97 in sp_event_context_virtual_root_handler (event_context=0x9d6a238, event=0xa612f78) at event-context.cpp:965
#10 0x0854a5c7 in sp_desktop_root_handler (event=0xa612f78, desktop=0x904adb0) at desktop-events.cpp:71
#11 0x0825d8a8 in sp_marshal_BOOLEAN__POINTER (closure=0x9dd6328, return_value=0xbfffeb6c, n_param_values=2, param_values=
    0xa5c6ef0, invocation_hint=0xbfffea00, marshal_data=0x854a590) at helper/sp-marshal.cpp:122
#12 0x01cba412 in g_closure_invoke (closure=0x9dd6328, return_value=0xbfffeb6c, n_param_values=2, param_values=0xa5c6ef0,
    invocation_hint=0xbfffea00) at /build/buildd/glib2.0-2.26.1/gobject/gclosure.c:766
#13 0x01cd0b85 in signal_emit_unlocked_R (node=<value optimised out>, detail=<value optimised out>, instance=0x9d6c920,
    emission_return=0xbfffeb6c, instance_and_params=0xa5c6ef0) at /build/buildd/glib2.0-2.26.1/gobject/gsignal.c:3252
#14 0x01cd1e2b in g_signal_emit_valist (instance=0x9d6c920, signal_id=197, detail=0, var_args=0xbfffebd0 "\004\354\377\277蒩\b)")
    at /build/buildd/glib2.0-2.26.1/gobject/gsignal.c:2993
#15 0x01cd2452 in g_signal_emit (instance=0x9d6c920, signal_id=197, detail=0)

Revision history for this message
Andrzej (ndrwrdck) wrote :

JazzyNico, thank you for the backtrace. Bug #818543 indeed looks like a duplicate of this one.

jazzynico (jazzynico)
summary: - crashes when USB drawing tablet is disconnected
+ crashes when USB input device is disconnected
Revision history for this message
su_v (suv-lp) wrote :

Related: undocking of laptops while Inkscape is running
Bug #887287 in Inkscape: “XI_BadDevice - Crash after undocking Lenovo laptop”
<https://bugs.launchpad.net/inkscape/+bug/887287>

Revision history for this message
whlm (mail-gw) wrote :

This bug is still relevant. On Linux Mint 17.1 with Inkscape 0.91 r (Feb 12 2015) I can reproduce this bug with a Wacom Intuos 3.

Revision history for this message
Hachmann (marenhachmann) wrote :

Just happened to me, too, with a Huion 610 Pro using digimend kernel wacom drivers on LM 17.3 with Inkscape 0.91.

Revision history for this message
Gwyn Ciesla (limburgher) wrote :

Reproduced on Fedora 27, GNOME 3, XORG.

https://bugzilla.redhat.com/show_bug.cgi?id=1538324

Revision history for this message
Guillaume ! (guillaume1936) wrote :

reproduced on debian inkscape=0.92.1-1 ; wacom intuos pro

Revision history for this message
Kapis (capiscuas) wrote :

I've got the same error with inkscape 0.92.4 stable branch with flatpak
It happens only when I am using external mouse and I unplug it and start clicking with the mouse pad afterwards. If I run inkscape without external mouse no problem, or if I don't unplug the external mouse and start using the mousepad no problem neither.

Console with --sync parameter:
This probably reflects a bug in the program.
The error was 'XI_BadDevice (invalid Device parameter)'.
  (Details: serial 117984 error_code 129 request_code 131 minor_code 13)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the —sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Revision history for this message
boussad (picks) wrote :

There are several ways to find what the problem is. The best is to go into event viewer (type eventvwr in search). Event viewer (local) and look for the critical errors listed in the last day, week, etc. Then go to the windows log>application tab. Finally the windows Logs>system tabs.

You want to look for critical errors (they have red in the left column ).

see: https:https://sarkariresult.onl/ , https://pnrstatus.vip/ & https://192168ll.onl/

Revision history for this message
d2weber (d2weber) wrote :

I also experienced a crash and got this Message in the logs after removing my USB mouse: `20:20:28 inkscape: The error was 'XI_BadDevice (invalid Device parameter)'.`

I am using Inkscape 0.92.5 (2060ec1f9f, 2020-04-08) on Ubuntu 20.04 (Kernel: 5.13.0-44)

Revision history for this message
sobbialex (sobbialex) wrote :

The error you're encountering when using Inkscape with a Wacom Bamboo USB drawing tablet and unplugging the tablet is due to Inkscape trying to access the input device (the tablet) that is no longer available. This type of error can occur when a program is not properly handling the removal of a connected device.

To prevent this crash, you can follow these steps:

Save Your Work: Before unplugging the tablet, make sure to save your work in Inkscape to avoid any data loss in case the application crashes.

Exit Inkscape: Close Inkscape before unplugging your Wacom tablet. This can help prevent the crash as the application won't be attempting to access the tablet.

Reconnect the Tablet: After you've unplugged and re-plugged the Wacom tablet, you can open Inkscape again. This should allow Inkscape to recognize the tablet as a valid input device without crashing.

Update Inkscape: It's important to note that you are using a very old version of Inkscape (0.46, released in 2009). You should consider updating to a newer version of Inkscape, as many issues and bugs have been fixed in subsequent releases. Newer versions are more likely to provide better support for modern hardware.

Upgrade Your Operating System: Ubuntu Jaunty is also an old version of Ubuntu (released in 2009) and is no longer supported. Consider upgrading your operating system to a more recent version to benefit from improved compatibility and security.

If you continue to experience issues after following these steps, consider checking the Inkscape community forums or bug reports to see if there are specific workarounds or patches for your version of Inkscape. However, upgrading to a newer Inkscape version and a more recent operating system is the best long-term solution for improved compatibility and stability. Solution by https://alzaabiautocare.com/

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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