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 653706 - key typing causes infinite-loop in VNC environment
key typing causes infinite-loop in VNC environment
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-06-30 03:46 UTC by VDR dai (bugzilla)
Modified: 2011-07-01 00:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description VDR dai (bugzilla) 2011-06-30 03:46:54 UTC
key typing causes infinite-loop in VNC environment.

For example, gtk3-demo freezes when I type a key on GtkEntry.
I trace gtk3-demo using gdb, it maybe run infinite-loop in
gdk_x11_keymap_get_entries_for_keyval at gdk/x11/gdkkeys-x11.c.
It occurs in only VNC environment, not plain X.

gtk+ 2.24.4 : not occurs
gtk+ 3.0.10 : occurs

Regards,
       dai
--
Comment 1 Matthias Clasen 2011-06-30 12:08:06 UTC
do you have a stacktrace that shows the infinite loop ?
Comment 2 VDR dai (bugzilla) 2011-06-30 12:56:51 UTC
Here is stacktrace.

0x00002b406ee3c1f0 in gdk_x11_keymap_get_entries_for_keyval (keymap=0xfbc110, 
    keyval=99, keys=0xfb23b0, n_keys=0xfb23b8)
    at /tmp/buildd/gtk+3.0-3.0.10/./gdk/x11/gdkkeys-x11.c:868
868	              if (syms[i] == keyval)
(gdb) bt
  • #0 gdk_x11_keymap_get_entries_for_keyval
    at /tmp/buildd/gtk+3.0-3.0.10/./gdk/x11/gdkkeys-x11.c line 868
  • #1 key_hash_insert_entry
    at /tmp/buildd/gtk+3.0-3.0.10/./gtk/gtkkeyhash.c line 64
  • #2 key_hash_get_keycode_hash
    at /tmp/buildd/gtk+3.0-3.0.10/./gtk/gtkkeyhash.c line 93
  • #3 _gtk_key_hash_lookup
    at /tmp/buildd/gtk+3.0-3.0.10/./gtk/gtkkeyhash.c line 385
  • #4 gtk_window_activate_key
    at /tmp/buildd/gtk+3.0-3.0.10/./gtk/gtkwindow.c line 9076
  • #5 gtk_window_key_press_event
    at /tmp/buildd/gtk+3.0-3.0.10/./gtk/gtkwindow.c line 5738
  • #6 _gtk_marshal_BOOLEAN__BOXED
    at /tmp/buildd/gtk+3.0-3.0.10/./gtk/gtkmarshalers.c line 85
  • #7 g_closure_invoke
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./gobject/gclosure.c line 767
  • #8 signal_emit_unlocked_R
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./gobject/gsignal.c line 3290
  • #9 g_signal_emit_valist
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./gobject/gsignal.c line 2993
  • #10 g_signal_emit
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./gobject/gsignal.c line 3040
  • #11 gtk_widget_event_internal
    at /tmp/buildd/gtk+3.0-3.0.10/./gtk/gtkwidget.c line 6114
  • #12 gtk_propagate_event
    at /tmp/buildd/gtk+3.0-3.0.10/./gtk/gtkmain.c line 2571
  • #13 gtk_main_do_event
    at /tmp/buildd/gtk+3.0-3.0.10/./gtk/gtkmain.c line 1872
  • #14 gdk_event_source_dispatch
    at /tmp/buildd/gtk+3.0-3.0.10/./gdk/x11/gdkeventsource.c line 318
  • #15 g_main_dispatch
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./glib/gmain.c line 2440
  • #16 g_main_context_dispatch
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./glib/gmain.c line 3013
  • #17 g_main_context_iterate
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./glib/gmain.c line 3091
  • #18 g_main_loop_run
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./glib/gmain.c line 3299
  • #19 gtk_main
    at /tmp/buildd/gtk+3.0-3.0.10/./gtk/gtkmain.c line 1358
  • #20 main
    at /tmp/buildd/gtk+3.0-3.0.10/./demos/gtk-demo/main.c line 1009
882	              ++i;
(gdb) n
866	          while (i < keymap_x11->keysyms_per_keycode)
(gdb) n
868	              if (syms[i] == keyval)
(gdb) n
882	              ++i;
(gdb) n
866	          while (i < keymap_x11->keysyms_per_keycode)
(gdb) n
861	      while (keycode <= keymap_x11->max_keycode)
(gdb) n
863	          const KeySym *syms = map + (keycode - keymap_x11->min_keycode) * keymap_x11->keysyms_per_keycode;
(gdb) n
866	          while (i < keymap_x11->keysyms_per_keycode)
(gdb) n
863	          const KeySym *syms = map + (keycode - keymap_x11->min_keycode) * keymap_x11->keysyms_per_keycode;
(gdb) n
866	          while (i < keymap_x11->keysyms_per_keycode)
(gdb) n
864	          gint i = 0;
(gdb) n
868	              if (syms[i] == keyval)
(gdb) n
882	              ++i;
(gdb) n
866	          while (i < keymap_x11->keysyms_per_keycode)
(gdb) n
868	              if (syms[i] == keyval)
(gdb) n
882	              ++i;
(gdb) n
866	          while (i < keymap_x11->keysyms_per_keycode)
(gdb) n
861	      while (keycode <= keymap_x11->max_keycode)
(gdb) n
863	          const KeySym *syms = map + (keycode - keymap_x11->min_keycode) * keymap_x11->keysyms_per_keycode;
(gdb) n
866	          while (i < keymap_x11->keysyms_per_keycode)
(gdb) n
863	          const KeySym *syms = map + (keycode - keymap_x11->min_keycode) * keymap_x11->keysyms_per_keycode;
(gdb) n
866	          while (i < keymap_x11->keysyms_per_keycode)
(gdb) n
864	          gint i = 0;
(gdb)
Comment 3 Matthias Clasen 2011-06-30 18:40:30 UTC
Looks like the while (keycode <= ... loop simply misses a keycode++; ?
Comment 4 Matthias Clasen 2011-06-30 18:47:56 UTC
Indeed, that was it. Should be fixed in master and gtk-3-0 now.
Comment 5 VDR dai (bugzilla) 2011-07-01 00:46:04 UTC
3.0.10 applied c5d26520d2d6c72fcd13941cc30e35c40294a2ba does not loop. Thank you.