Bug 1538324 - Inkscape crashes when a pointing device is remove from the system
Summary: Inkscape crashes when a pointing device is remove from the system
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: inkscape
Version: 30
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-24 20:02 UTC by Matt Hirsch
Modified: 2020-05-26 17:55 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-26 17:55:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 474954 0 None None None 2018-01-24 23:13:02 UTC

Description Matt Hirsch 2018-01-24 20:02:03 UTC
Description of problem:

If inkscape is opened and a mouse is used to interact with it, and then the mouse is unplugged from the system, on future pointer interaction inkscape still tries to refer to the now removed mouse, leading to an X crash.


Version-Release number of selected component (if applicable):
inkscape-0.92.2-1.fc27.x86_64, but I have noticed this in earlier versions.

How reproducible:
always

Steps to Reproduce:
1. Plug a USB mouse into the system.
2. Start inkscape.
3. Click on the inkscape window using the USB mouse from step 1.
4. Remove the USB mouse.
5. Click on the inkscape window using a different pointing device, e.g. a laptop trackpad.

Actual results:
Inkscape crashes with this error message:

(inkscape:15471): Gdk-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 16876282 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.)



Expected results:
Normal operation.

Additional info:
I haven't tested this with two different mice but presumably the same problem wold occur. I haven't tried this with Wayland. I am using an Xorg desktop, and running gnome3.

Comment 1 Gwyn Ciesla 2018-01-24 22:36:31 UTC
I can't reproduce this on f27/GNOME3/Wayland, reassigning.

Comment 2 Matt Hirsch 2018-01-24 22:42:52 UTC
This is a great way to ensure that the bug never gets addressed. It is extremely unlikely that this is an Xorg bug. It's either in inkscape or gtk. But since inkscape is the *only* application with this problem, my guess is it has something to do with an inkscape specific use pattern.

Comment 3 Matt Hirsch 2018-01-24 22:49:31 UTC
Here's a backtrace from the crash. I only installed debuginfo for inkscape, and I don't know this code at all. But why is sp_canvas_item_grab called with a null pointer for the GdkCursor argument?

(gdb) bt
#0  0x00007ffff4aa17b1 in _g_log_abort () at /lib64/libglib-2.0.so.0
#1  0x00007ffff4aa27ec in g_log_default_handler () at /lib64/libglib-2.0.so.0
#2  0x00007ffff4aa2a7d in g_logv () at /lib64/libglib-2.0.so.0
#3  0x00007ffff4aa2bef in g_log () at /lib64/libglib-2.0.so.0
#4  0x00007fffeff851fa in gdk_x_error () at /lib64/libgdk-x11-2.0.so.0
#5  0x00007ffff4403e3a in _XError () at /lib64/libX11.so.6
#6  0x00007ffff4400d6b in handle_error () at /lib64/libX11.so.6
#7  0x00007ffff4401f14 in _XReply () at /lib64/libX11.so.6
#8  0x00007fffe802d5a6 in XGrabDevice () at /lib64/libXi.so.6
#9  0x00007fffeff9ba59 in _gdk_input_grab_pointer () at /lib64/libgdk-x11-2.0.so.0
#10 0x00007fffeff85468 in _gdk_windowing_pointer_grab () at /lib64/libgdk-x11-2.0.so.0
#11 0x00007fffeff63512 in gdk_pointer_grab () at /lib64/libgdk-x11-2.0.so.0
#12 0x00007ffff6f8d1aa in sp_canvas_item_grab(SPCanvasItem*, unsigned int, _GdkCursor*, unsigned int) (item=0x55555772f560, event_mask=3844, event_mask@entry=3852, cursor=cursor@entry=0x0, etime=45668464)
    at /usr/src/debug/inkscape-0.92.2-1.fc27.x86_64/src/display/sp-canvas.cpp:627
#13 0x00007ffff71f3105 in Inkscape::UI::Tools::SelectTool::root_handler(_GdkEvent*) (this=0x5555572b8300, event=0x555559071d20)
    at /usr/src/debug/inkscape-0.92.2-1.fc27.x86_64/src/ui/tools/select-tool.cpp:523
#14 0x00007ffff7208328 in Inkscape::UI::Tools::sp_event_context_virtual_root_handler(Inkscape::UI::Tools::ToolBase*, _GdkEvent*) (event_context=<optimized out>, event=0x555559071d20)
    at /usr/src/debug/inkscape-0.92.2-1.fc27.x86_64/src/ui/tools/tool-base.cpp:1000
#15 0x00007ffff74f9497 in sp_desktop_root_handler(SPCanvasItem*, _GdkEvent*, SPDesktop*) (event=<optimized out>, desktop=0x555556533c00)
    at /usr/src/debug/inkscape-0.92.2-1.fc27.x86_64/src/desktop-events.cpp:83
#16 0x00007ffff7069173 in sp_marshal_BOOLEAN__POINTER(GClosure*, GValue*, guint, GValue const*, gpointer, gpointer) (closure=0x555555b98320, return_value=0x7fffffffd2d0, n_param_values=<optimized out>, param_values=0x7fffffffd1a0, invocation_hint=<optimized out>, marshal_data=<optimized out>)
    at /usr/src/debug/inkscape-0.92.2-1.fc27.x86_64/src/helper/sp-marshal.cpp:119
#17 0x00007ffff5d2273d in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#18 0x00007ffff5d354de in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#19 0x00007ffff5d3d69f in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#20 0x00007ffff5d3e66f in g_signal_emit () at /lib64/libgobject-2.0.so.0
#21 0x00007ffff6f8deca in SPCanvas::emitEvent(_GdkEvent*) (this=<optimized out>, event=<optimized out>) at /usr/src/debug/inkscape-0.92.2-1.fc27.x86_64/src/display/sp-canvas.cpp:1277
#22 0x00007ffff08e567d in _gtk_marshal_BOOLEAN__BOXED () at /lib64/libgtk-x11-2.0.so.0
#23 0x00007ffff5d2273d in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#24 0x00007ffff5d34f30 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#25 0x00007ffff5d3d69f in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#26 0x00007ffff5d3e66f in g_signal_emit () at /lib64/libgobject-2.0.so.0
#27 0x00007ffff0a1483c in gtk_widget_event_internal () at /lib64/libgtk-x11-2.0.so.0
#28 0x00007ffff08e341c in gtk_propagate_event () at /lib64/libgtk-x11-2.0.so.0
#29 0x00007ffff08e383b in gtk_main_do_event () at /lib64/libgtk-x11-2.0.so.0
#30 0x00007fffeff7cf4c in gdk_event_dispatch () at /lib64/libgdk-x11-2.0.so.0
#31 0x00007ffff4a9bbb7 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#32 0x00007ffff4a9bf60 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#33 0x00007ffff4a9c272 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#34 0x00007ffff08e2827 in gtk_main () at /lib64/libgtk-x11-2.0.so.0
#35 0x000055555555eba3 in sp_main_gui(int, char const**) (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/inkscape-0.92.2-1.fc27.x86_64/src/main.cpp:1158
#36 0x00007fffee0d100a in __libc_start_main () at /lib64/libc.so.6
#37 0x000055555555abda in _start ()

Comment 4 Gwyn Ciesla 2018-01-24 23:13:02 UTC
Looks like this has been reported upstream. Linking.

Comment 5 Gwyn Ciesla 2018-01-24 23:13:46 UTC
Reported 8 years ago...:(

Comment 6 Olivier Fourdan 2018-02-05 09:54:51 UTC
An XError denotes a bug in the client, not in the Xserver, and the backtrace in comment 3 points rather toward inkspcae than gtk+, so moving back to inkscape.

Comment 7 Ben Cotton 2019-10-31 20:28:55 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Ben Cotton 2019-11-27 19:58:37 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Matt Hirsch 2019-11-27 20:12:42 UTC
Still exists in F30

Comment 10 Ben Cotton 2020-04-30 20:41:06 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Ben Cotton 2020-05-26 17:55:46 UTC
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.