inkscape crash (X error) when USB mouse is disconnected

Bug #818543 reported by Andrzej
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
High
Unassigned
inkscape (Ubuntu)
New
Undecided
Unassigned

Bug Description

Inkscape 0.49-dev r10505 compiled on Ubuntu 11.04, 32bit. Nvidia graphics card with a Nouveau driver. Gnome session with Compiz running.

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 8220076 error_code 149 request_code 141 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.)

The error occurred after a lmb click on the window.

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

Do you have any extended input devices (tablet) connected?

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

Possibly related to bug #474954 (see comment #5)?

Changed in inkscape:
importance: Undecided → High
Revision history for this message
Andrzej (ndrwrdck) wrote :

No tablet but I did have a regular USB mouse connected. I have disconnected it (together with power supply cable for my laptop) 10~20 minutes before the crash.

Revision history for this message
Andrzej (ndrwrdck) wrote :

Ok, happens every time when:
1. Inkscape is started with USB mouse plugged in
2. Mouse is disconnected
3. User clicks on the Inkscape window using a touchpad button.

My xinput devices:

$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Sony Sony IR Receiver id=10 [slave pointer (2)]
⎜ ↳ PS/2 Mouse id=13 [slave pointer (2)]
⎜ ↳ Mouseemu virtual mouse id=16 [slave pointer (2)]
⎜ ↳ AlpsPS/2 ALPS GlidePoint id=14 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
    ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
    ↳ Sony Vaio Keys id=6 [slave keyboard (3)]
    ↳ Video Bus id=7 [slave keyboard (3)]
    ↳ Power Button id=8 [slave keyboard (3)]
    ↳ UVC Camera (05ca:18ba) id=9 [slave keyboard (3)]
    ↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
    ↳ Mouseemu virtual keyboard id=15 [slave keyboard (3)]

I'm now trying to catch a backtrace but for some reason I can't get it just yet (no core dump, no bt in gdb, breakpoint on X11Error doesn't catch anything).

This might be similar to:
https://bugzilla.mozilla.org/show_bug.cgi?id=576933

Revision history for this message
Andrzej (ndrwrdck) wrote :
Download full text (3.8 KiB)

backtrace:

Breakpoint 3, 0xb6fc3f66 in _XError () from /usr/lib/i386-linux-gnu/libX11.so.6
(gdb) bt
#0 0xb6fc3f66 in _XError () from /usr/lib/i386-linux-gnu/libX11.so.6
#1 0xb6fc10ea in ?? () from /usr/lib/i386-linux-gnu/libX11.so.6
#2 0xb6fc1ca5 in _XReply () from /usr/lib/i386-linux-gnu/libX11.so.6
#3 0xb651bc8b in XGrabDevice () from /usr/lib/i386-linux-gnu/libXi.so.6
#4 0xb73aa931 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#5 0xb7397c63 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#6 0xb7378d41 in gdk_pointer_grab () from /usr/lib/libgdk-x11-2.0.so.0
#7 0x081de10a in sp_canvas_item_grab (item=0x9d1a120, event_mask=3844,
    cursor=0x0, etime=1266439) at display/sp-canvas.cpp:556
#8 0x0858705c in sp_select_context_root_handler (event_context=0x9d17a20,
    event=0xa599940) at select-context.cpp:509
#9 0x0808dea7 in sp_event_context_virtual_root_handler (
    event_context=0x9d17a20, event=0xa599940) at event-context.cpp:965
#10 0x08518357 in sp_desktop_root_handler (event=0xa599940, desktop=0x8fe9db0)
    at desktop-events.cpp:71
#11 0x08248418 in sp_marshal_BOOLEAN__POINTER (closure=0x9d78778,
    return_value=0xbfffef1c, n_param_values=2, param_values=0xa5a80c8,
    invocation_hint=0xbfffedd0, marshal_data=0x0) at helper/sp-marshal.cpp:124
#12 0xb6d76372 in g_closure_invoke ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#13 0xb6d89048 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#14 0xb6d918d7 in g_signal_emit_valist ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#15 0xb6d91cc2 in g_signal_emit ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#16 0x081dcf85 in emit_event (canvas=0xbfffefb4, event=0xa5980f8)
    at display/sp-canvas.cpp:1376
#17 0xb7595a04 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#18 0xb6d74cc7 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#19 0xb6d76372 in g_closure_invoke ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#20 0xb6d88e45 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#21 0xb6d918d7 in g_signal_emit_valist ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#22 0xb6d91cc2 in g_signal_emit ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#23 0xb76ca836 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#24 0xb7593b8d in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#25 0xb75941af in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#26 0xb738fa0a in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#27 0xb6cc4aa8 in g_main_context_dispatch ()
   from /lib/i386-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#28 0xb6cc5270 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#29 0xb6cc592b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#30 0xb7592c39 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#31 0xb7bae357 in Gtk::Main::run_impl() () from /usr/lib/libgtkmm-2.4.so.1
#32 0xb7baed42 in Gtk::Main::run() () from /usr/lib/libgtkmm-2.4.so.1
#33 0x08083183 in sp_main_gui (argc=1, argv=0xbffff7a4) at main.cpp:978
#34 0x08084900 in main (argc=2, argv=0xbffff7a4) at main.cpp:709

(gdb) frame 7
#7 0x081de10a in sp_canvas_item_...

Read more...

su_v (suv-lp)
summary: - inkscape crash on xwindows error
+ inkscape crash when USB mouse is disconnected
Revision history for this message
su_v (suv-lp) wrote : Re: inkscape crash when USB mouse is disconnected

> happens every time when:
> 1. Inkscape is started with USB mouse plugged in
> 2. Mouse is disconnected
> 3. User clicks on the Inkscape window using a touchpad button.

Seems like a duplicate of bug #474954 “crashes when USB drawing tablet is disconnected” to me. See also the latest comments in the other duplicate report (broken / flaky USB ports (hardware) triggering the same issue without explicitly disconnecting the USB mouse)

Thx for the backtrace!

summary: - inkscape crash when USB mouse is disconnected
+ inkscape crash (X error) when USB mouse is disconnected
Revision history for this message
Andrzej (ndrwrdck) wrote :

I agree that all these 3 bugs look like the same issue. This is actually very common error in GTK, I've just checked that gimp 2.6.11 from Ubuntu 11.04 is affected as well.

Still, it might be better to ask original reporters if they can produce a backtrace of their bugs.

For reference, this is how I made it:

(make sure mouse or tablet is plugged in)
$ gdb inkscape
$ break _XError
(answer 'y')
$ run --sync
(unplug the mouse/tablet or wait for a USB fault)
(click on the window with some other pointer)
(this should trip the breakpoint)
$ bt

Revision history for this message
jazzynico (jazzynico) wrote :

I confirm that unplugging a tablet gives the same back-trace (see bug #474954, comment 7).

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.