After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766522 - DND broken with assertion 'GDK_IS_DEVICE (device)' failed
DND broken with assertion 'GDK_IS_DEVICE (device)' failed
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.20.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-05-16 15:37 UTC by Gerald Nunn
Modified: 2016-05-18 11:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gerald Nunn 2016-05-16 15:37:43 UTC
The DND functionality in my application Terminix has stopped working between Arch Linux packages GTK gtk3-3.20.3-4 (working) and gtk3-3.20.4-1 (fails). When I attempt to drag and drop a terminal by dragging the titlebar, under 3.20.4-1 I get the following errors in the console and no drag occurs:

(terminix:2932): Gdk-CRITICAL **: gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed

(terminix:2932): Gdk-CRITICAL **: gdk_device_get_associated_device: assertion 'GDK_IS_DEVICE (device)' failed

If I run Terminix under gdb and break on criticals and fatal (i.e. G_DEBUG=fatal_criticals gdb ./terminix) I see the following backtrace when it fails:

Thread 1 "terminix" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff6c357eb in g_logv () from /usr/lib/libglib-2.0.so.0
(gdb) bt
  • #0 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #1 g_log
    from /usr/lib/libglib-2.0.so.0
  • #2 gdk_device_get_source
    from /usr/lib/libgdk-3.so.0
  • #3 ??
    from /usr/lib/libgtk-3.so.0
  • #4 ??
    from /usr/lib/libgtk-3.so.0
  • #5 ??
    from /usr/lib/libgtk-3.so.0
  • #6 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #7 ??
    from /usr/lib/libgobject-2.0.so.0
  • #8 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #9 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #10 ??
    from /usr/lib/libgtk-3.so.0
  • #11 ??
    from /usr/lib/libgtk-3.so.0
  • #12 gtk_main_do_event
    from /usr/lib/libgtk-3.so.0
  • #13 ??
    from /usr/lib/libgdk-3.so.0
  • #14 ??
    from /usr/lib/libgdk-3.so.0
  • #15 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #16 ??
    from /usr/lib/libglib-2.0.so.0
  • #17 g_main_context_iteration
    from /usr/lib/libglib-2.0.so.0
  • #18 g_application_run
    from /usr/lib/libgio-2.0.so.0
  • #19 gio.Application.Application.run(immutable(char)[][])
    at ../../../.dub/packages/gtk-d-3.3.1/src/gio/Application.d line 889
  • #20 D main
    at source/app.d line 89

This same scenario works fine in gtk3-3.20.3-4.
Comment 1 Gerald Nunn 2016-05-16 19:41:47 UTC
I suspect this might be a duplicate of https://bugzilla.gnome.org/show_bug.cgi?id=766442
Comment 2 Carlos Garnacho 2016-05-17 18:08:11 UTC
I am not sure this is a duplicate of bug #766442. I attached a patch there, would be great if you tried it though. It'd be great too if you could get a backtrace with more debugging symbols, having all gtk/glib symbols missing in the one you pasted doesn't help a lot.
Comment 3 Gerald Nunn 2016-05-17 19:05:52 UTC
I downloaded GTK 3-20.4 and compiled it with debug information, with your patch from the other bug installed I still get the error. Here's the backtrace from gdb, hopefully with the debug info it is more useful.

(terminix:16908): Gdk-CRITICAL **: gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed

Thread 1 "terminix" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff6c357eb in g_logv () from /usr/lib/libglib-2.0.so.0
(gdb) bt
  • #0 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #1 g_log
    from /usr/lib/libglib-2.0.so.0
  • #2 gdk_device_get_source
    at gdkdevice.c line 823
  • #3 gtk_drag_begin_internal
    at gtkdnd.c line 2220
  • #4 gtk_drag_source_event_cb
    at gtkdragsource.c line 95
  • #5 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 86
  • #6 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #7 ??
    from /usr/lib/libgobject-2.0.so.0
  • #8 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #9 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #10 gtk_widget_event_internal
    at gtkwidget.c line 7703
  • #11 propagate_event_up
    at gtkmain.c line 2545
  • #12 propagate_event
    at gtkmain.c line 2647
  • #13 gtk_main_do_event
    at gtkmain.c line 1878
  • #14 _gdk_event_emit
    at gdkevents.c line 73
  • #15 gdk_event_source_dispatch
    at gdkeventsource.c line 367
  • #16 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #17 ??
    from /usr/lib/libglib-2.0.so.0
  • #18 g_main_context_iteration
    from /usr/lib/libglib-2.0.so.0
  • #19 g_application_run
    from /usr/lib/libgio-2.0.so.0
  • #20 gio.Application.Application.run(immutable(char)[][])
    at ../../../.dub/packages/gtk-d-3.3.1/src/gio/Application.d line 889
  • #21 D main
    at source/app.d line 89

Comment 4 Carlos Garnacho 2016-05-18 11:05:50 UTC
This turned out to be fixed only in master, the fix has been cherry picked to gtk-3-20:

https://git.gnome.org/browse/gtk+/commit/?id=e006f3ca98990f6e3c8da58b49d7feba8403bb47