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 696756 - x11: gdk_device_get_source : assertion `GDK_IS_DEVICE(source)` failed
x11: gdk_device_get_source : assertion `GDK_IS_DEVICE(source)` failed
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GdkDevice
3.8.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
Carlos Garnacho
: 690838 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-03-28 09:06 UTC by LE GARREC Vincent
Modified: 2013-09-16 10:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for X11 (1.23 KB, patch)
2013-06-18 12:34 UTC, Carlos Garcia Campos
committed Details | Review
Patch for win32 (394 bytes, patch)
2013-06-19 21:25 UTC, LE GARREC Vincent
committed Details | Review

Description LE GARREC Vincent 2013-03-28 09:06:36 UTC
The probleme comes from the function gdk_device_virtual_ungrab (#4 from the bt). It calls _gdk_display_device_grab_update with the third argument NULL.
Following the stack, the program arrives in the "gdkwindow.c", in the function send_crossing_event (#9). Of course, source_device = NULL.
I have the warning when gdk_device_get_source is call.


The bt is the following :

Program received signal SIGTRAP, Trace/breakpoint trap.
0x023f1972 in g_logv (log_domain=0xdeeeb7 "Gdk", 
    log_level=G_LOG_LEVEL_CRITICAL, 
    format=0x2474f58 "%s: assertion `%s' failed", args=0x22ecfc "ìó\336")
    at gmessages.c:969
(gdb) warning: BTMMHOOK 28.03.2013 09:19:39 Thread<04A0> Hook DLL loaded

969	gmessages.c: No such file or directory.
bt
  • #0 g_logv
    at gmessages.c line 969
  • #1 g_log
    at gmessages.c line 1010
  • #2 g_return_if_fail_warning
  • #3 gdk_device_get_source
    at gdkdevice.c line 643
  • #4 send_crossing_event
    at gdkwindow.c line 8511
  • #5 _gdk_synthesize_crossing_events
    at gdkwindow.c line 8725
  • #6 synthesize_crossing_events
    at gdkdisplay.c line 805
  • #7 switch_to_pointer_grab
    at gdkdisplay.c line 994
  • #8 _gdk_display_device_grab_update
    at gdkdisplay.c line 1065
  • #9 gdk_device_virtual_ungrab
    at gdkdevice-virtual.c line 333
  • #10 gdk_device_ungrab
    at gdkdevice.c line 1280
  • #11 gtk_real_menu_shell_deactivate
    at gtkmenushell.c line 1237
  • #12 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 85
  • #13 g_type_class_meta_marshal
    at gclosure.c line 970
  • #14 g_closure_invoke
    at gclosure.c line 777
  • #15 signal_emit_unlocked_R
    at gsignal.c line 3514
  • #16 g_signal_emit_valist
    at gsignal.c line 3328
  • #17 g_signal_emit
    at gsignal.c line 3384
  • #18 gtk_menu_shell_deactivate
    at gtkmenushell.c line 616
  • #19 gtk_menu_deactivate
    at gtkmenu.c line 4572
  • #20 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 85
  • #21 g_type_class_meta_marshal
    at gclosure.c line 970
  • #22 g_closure_invoke
    at gclosure.c line 777
  • #23 signal_emit_unlocked_R
    at gsignal.c line 3514
  • #24 g_signal_emit_valist
    at gsignal.c line 3328
  • #25 g_signal_emit
    at gsignal.c line 3384
  • #26 gtk_menu_shell_deactivate
    at gtkmenushell.c line 616
  • #27 gtk_menu_shell_activate_item
    at gtkmenushell.c line 1421
  • #28 gtk_menu_shell_button_release
    at gtkmenushell.c line 830
  • #29 gtk_menu_button_release
    at gtkmenu.c line 3414
  • #30 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #31 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #32 _g_closure_invoke_va
    at gclosure.c line 840
  • #33 g_signal_emit_valist
    at gsignal.c line 3234
  • #34 g_signal_emit
    at gsignal.c line 3384
  • #35 gtk_widget_event_internal
    at gtkwidget.c line 6714
  • #36 gtk_widget_event
    at gtkwidget.c line 6371
  • #37 propagate_event_up
    at gtkmain.c line 2393
  • #38 propagate_event
    at gtkmain.c line 2501
  • #39 gtk_propagate_event
    at gtkmain.c line 2536
  • #40 gtk_main_do_event
    at gtkmain.c line 1716
  • #41 _gdk_event_emit
    at gdkevents.c line 69
  • #42 gdk_event_dispatch
    at gdkevents-win32.c line 3380
  • #43 g_main_dispatch
    at gmain.c line 3054
  • #44 g_main_context_dispatch
    at gmain.c line 3630
  • #45 g_main_context_iterate
    at gmain.c line 3701
  • #46 g_main_loop_run
    at gmain.c line 3895
  • #47 gtk_main
    at gtkmain.c line 1156
  • #48 main
    at main.c line 212

Comment 1 Christoph Reiter (lazka) 2013-05-26 22:01:51 UTC
Same under X11:

  • #0 g_logv
    at /tmp/buildd/glib2.0-2.36.1/./glib/gmessages.c line 981
  • #1 g_log
    at /tmp/buildd/glib2.0-2.36.1/./glib/gmessages.c line 1010
  • #2 g_return_if_fail_warning
  • #3 gdk_device_get_source
    at /tmp/buildd/gtk+3.0-3.8.2/./gdk/gdkdevice.c line 643
  • #4 gdk_device_get_source
    at /tmp/buildd/gtk+3.0-3.8.2/./gdk/gdkdevice.c line 641
  • #5 send_crossing_event
    at /tmp/buildd/gtk+3.0-3.8.2/./gdk/gdkwindow.c line 8518
  • #6 _gdk_synthesize_crossing_events
    at /tmp/buildd/gtk+3.0-3.8.2/./gdk/gdkwindow.c line 8732
  • #7 synthesize_crossing_events
    at /tmp/buildd/gtk+3.0-3.8.2/./gdk/gdkdisplay.c line 805
  • #8 switch_to_pointer_grab
    at /tmp/buildd/gtk+3.0-3.8.2/./gdk/gdkdisplay.c line 925
  • #9 _gdk_display_device_grab_update
    at /tmp/buildd/gtk+3.0-3.8.2/./gdk/gdkdisplay.c line 1034
  • #10 roundtrip_callback_idle
    at /tmp/buildd/gtk+3.0-3.8.2/./gdk/x11/gdkasync.c line 670
  • #11 gdk_threads_dispatch
    at /tmp/buildd/gtk+3.0-3.8.2/./gdk/gdk.c line 788
  • #12 g_main_dispatch
    at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c line 3054
  • #13 g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c line 3630
  • #14 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c line 3701
  • #15 g_main_context_iteration
    at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c line 3762
  • #16 gtk_main_iteration
    at /tmp/buildd/gtk+3.0-3.8.2/./gtk/gtkmain.c line 1260
  • #17 ffi_call_unix64
    from /usr/lib/x86_64-linux-gnu/libffi.so.6
  • #18 ffi_call
    from /usr/lib/x86_64-linux-gnu/libffi.so.6
  • #19 g_callable_info_invoke
    from /usr/lib/libgirepository-1.0.so.1
  • #20 g_function_info_invoke
    from /usr/lib/libgirepository-1.0.so.1
  • #21 ??
    from /usr/lib/python2.7/dist-packages/gi/_gi.so
  • #22 ext_do_call
    at ../Python/ceval.c line 4331
  • #23 PyEval_EvalFrameEx
    at ../Python/ceval.c line 2705
  • #24 ??
  • #25 ??

Comment 2 Carlos Garcia Campos 2013-06-18 12:32:14 UTC
Not sure this is specific to win32, I got a similar bt when running WebKit unit tests:

(Programs/WebKit2APITests/TestContextMenu:3109): Gdk-CRITICAL **: gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed

Program received signal SIGTRAP, Trace/breakpoint trap.
0xb5349541 in g_logv (log_domain=log_domain@entry=0xb577f6d6 "Gdk", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0xb53b56ac "%s: assertion '%s' failed", 
    args=args@entry=0xbfffe2ac "\347Ox\265W\373w\265\260&\377\267") at gmessages.c:989
989			G_BREAKPOINT ();
(gdb) bt
  • #0 g_logv
    at gmessages.c line 989
  • #1 g_log
    at gmessages.c line 1025
  • #2 g_return_if_fail_warning
  • #3 gdk_device_get_source
    at gdkdevice.c line 643
  • #4 gdk_device_get_source
    at gdkdevice.c line 641
  • #5 send_crossing_event
    at gdkwindow.c line 7412
  • #6 _gdk_synthesize_crossing_events
    at gdkwindow.c line 7626
  • #7 synthesize_crossing_events
    at gdkdisplay.c line 859
  • #8 switch_to_pointer_grab
    at gdkdisplay.c line 936
  • #9 _gdk_display_device_grab_update
    at gdkdisplay.c line 1076
  • #10 device_grab_update_callback
    at gdkdisplay-x11.c line 1725
  • #11 roundtrip_callback_idle
    at gdkasync.c line 670
  • #12 gdk_threads_dispatch
    at gdk.c line 804
  • #13 g_idle_dispatch
    at gmain.c line 5235
  • #14 g_main_dispatch
    at gmain.c line 3058
  • #15 g_main_context_dispatch
    at gmain.c line 3634
  • #16 g_main_context_iterate
    at gmain.c line 3705
  • #17 g_main_loop_run
    at gmain.c line 3899
  • #18 WebViewTest::showInWindowAndWaitUntilMapped(GtkWindowType)
  • #19 testContextMenuCustomMenu(ContextMenuCustomFullTest*, void const*)
  • #20 test_case_run
    at gtestutils.c line 1869
  • #21 g_test_run_suite_internal
    at gtestutils.c line 1926
  • #22 g_test_run_suite_internal
    at gtestutils.c line 1937
  • #23 g_test_run_suite_internal
    at gtestutils.c line 1937
  • #24 g_test_run_suite
    at gtestutils.c line 1986
  • #25 g_test_run
    at gtestutils.c line 1408

Comment 3 Carlos Garcia Campos 2013-06-18 12:34:12 UTC
Created attachment 247133 [details] [review]
Patch for X11

This fixes the problem in X11, I guess something similar happens in win32.
Comment 4 Christoph Reiter (lazka) 2013-06-18 15:14:37 UTC
I still get this with the patch applied:

Gdk-CRITICAL **: gdk_device_ungrab: assertion `GDK_IS_DEVICE (device)' failed

  • #0 g_logv
    at /tmp/buildd/glib2.0-2.36.3/./glib/gmessages.c line 981
  • #1 g_log
    at /tmp/buildd/glib2.0-2.36.3/./glib/gmessages.c line 1010
  • #2 gtk_scale_button_release_grab
    at gtkscalebutton.c line 1315
  • #3 cb_dock_button_press
    at gtkscalebutton.c line 1343

Comment 5 LE GARREC Vincent 2013-06-19 21:25:06 UTC
Created attachment 247289 [details] [review]
Patch for win32

Carlos, you were right.

The enclosed patch solve the problem for Win32.
Comment 6 Fan, Chun-wei 2013-07-31 10:09:41 UTC
Hi,

The Win32 patch also fixes the problem for me on Windows, at least on GTK+ master.

With blessings, thank you!
Comment 7 Fan, Chun-wei 2013-08-21 02:32:48 UTC
*** Bug 690838 has been marked as a duplicate of this bug. ***
Comment 8 Fan, Chun-wei 2013-08-26 02:44:00 UTC
Hi Le Garrec Vincent,

I have incorporated your patch for Win32 as part of commit bd596144 for the master branch (but not 3.8, as 3.10 is not too far from now).

Thanks, with blessings.
Comment 9 Carlos Garcia Campos 2013-09-16 08:04:08 UTC
Reopening because the X11 backend was not fixed.
Comment 10 Carlos Garnacho 2013-09-16 08:46:51 UTC
Comment on attachment 247133 [details] [review]
Patch for X11

The X11 patch is obviously right, that check happens in other places too. Sorry for not chiming in till now...
Comment 11 Carlos Garcia Campos 2013-09-16 10:54:58 UTC
Comment on attachment 247133 [details] [review]
Patch for X11

Pushed.