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 489200 - Keyboard stops working
Keyboard stops working
Status: RESOLVED INCOMPLETE
Product: gtk+
Classification: Platform
Component: Input Methods
2.10.x
Other All
: Normal major
: ---
Assigned To: Hidetoshi Tajima
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-10-22 22:51 UTC by Derek Chen-Becker
Modified: 2012-06-08 10:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Trace from when the app works. (2.64 KB, text/plain)
2007-10-25 21:11 UTC, Derek Chen-Becker
Details
Trace when the app doesn't work (1.83 KB, text/plain)
2007-10-25 21:11 UTC, Derek Chen-Becker
Details

Description Derek Chen-Becker 2007-10-22 22:51:20 UTC
Please describe the problem:
After a random amount of time, GTK+ apps stop accepting keyboard input. I built a debug version of GTK+ 2.10.14 and enabled GDK_DEBUG=events, and GDK is seeing the keyboard events coming in from X, but somewhere after that they're getting lost. The mouse continues to work fine. I'm not sure where to look now other than attempting gdb.

Steps to reproduce:
1. Start GTK+ based app
2. Use as normal
3. Some time later it stops taking keyboard input


Actual results:
The app stops getting keyboard input

Expected results:
The app should normally continue to process keyboard events

Does this happen every time?
Yes

Other information:
This started after I upgraded from Ubuntu Feisty to Ubuntu Gutsy. I don't know what the GTK version was for Feisty but something changed.
Comment 1 Behdad Esfahbod 2007-10-22 22:59:20 UTC
I've seen this too, and it's very, very annoying.  I think it's like all input gets locked to going to a single widget for a while...  I typically bring up Run... dialog using Alt+F2 and run xterm, then kill metacity and it sometimes fixes it...
Comment 2 Derek Chen-Becker 2007-10-22 23:45:28 UTC
Well, I've switched to using RXVT since it doesn't depend on it. If no one else has any ideas, can someone at least point me toward the code path in GTK that handles this? One thing I forgot to mention, sometimes if I switch windows and then switch back to the unresponsive app, its like the key queue unloads and I get 5-10 characters that I had typed.
Comment 3 Derek Chen-Becker 2007-10-23 00:01:41 UTC
Oh, one more thing. It sounds like when this happens to you it's infrequent. For me, I have yet to go more than 40 minutes without it happening. I have restarted Thunderbird 7 times today, Pidgin 3 times (haven't used it as often) and gnome-terminal twice before I installed and switched to RXVT.
Comment 4 Derek Chen-Becker 2007-10-23 02:18:00 UTC
I got a response in a forum that indicates that this might be this bug:

https://bugs.launchpad.net/fedora/+bug/66104

I'm going to try modifying my SCIM config as specified since I don't use deadkeys and see if that fixes it.
Comment 5 Derek Chen-Becker 2007-10-23 20:08:35 UTC
Well, that seems to have increased the amount of time before it loses keyboard, but I just got the problem again. Is there some developer documentation that could help me narrow down where the problem is occuring? I'm going to start reading through the source code to see if I can find it, but I'm not sure if there's a central "pipe" that key events go through other than GDK (which is getting the events).

Thanks,

Derek
Comment 6 Derek Chen-Becker 2007-10-24 17:15:39 UTC
A quick update. I've added some debug statements and tried some debugging through GDB and at this point I'm still a little lost. When the problem happens I can see the key event percolate up from GDK all the way to gtk_widget_event_internal. It gets passed to MozContainer, which I'm assuming is some subclassed container that Thunderbird uses. I don't yet have a debug build of glib, so I can't tell what happens after the g_signal_emit in MozContainer, but somewhere after that point it stops being handled. I'm going to post to the mailing list and see if I get anywhere, but if anyone has any ideas I'd really appreciate them.
Comment 7 Derek Chen-Becker 2007-10-25 21:07:56 UTC
OK, I'm slowly tracking it down. I have noticed a difference in event handling when the app stops working. I'm attaching a trace of when it works and when it doesn't. In the trace where it works, for some reason when I type "s", GDK says an Alt_L keypress follows it. In the trace where it doesn't work this doesn't happen.
Comment 8 Derek Chen-Becker 2007-10-25 21:11:07 UTC
Created attachment 97873 [details]
Trace from when the app works.
Comment 9 Derek Chen-Becker 2007-10-25 21:11:36 UTC
Created attachment 97874 [details]
Trace when the app doesn't work
Comment 10 André Klapper 2012-01-12 18:58:23 UTC
Derek: Does this problem still happen in a recent GTK+ version (such as 3.2 or 2.24)? If yes, which version, and which distribution do you use?

Note to myself: Bug 536886 is a bit similar.
Comment 11 André Klapper 2012-04-04 11:44:42 UTC
NEEDINFO as per last comment.

Anybody can still reproduce this in 2.24 or newer?
Comment 12 Akhil Laddha 2012-06-08 10:28:10 UTC
Please feel free to reopen the bug if the problem still occurs with a newer
version of GNOME 3.2.2 or 3.4.1 or later, thanks.