Screenkey hangs when trying to access 'preferences' or 'about'

Bug #756346 reported by Suppermann on 2011-04-10
This bug affects 22 people
Affects Status Importance Assigned to Milestone

Bug Description

When I try to access preferences or about screenkey stalls. Running with --debug and --no-detach does not provide any useful debugging information. I am running debian stable.

tabou (tabougag) wrote :

I'm using "Lucid Lynx" and i have the same problem. "Screenkey" doesn't works.

qubodup (qubodup) wrote :

This affects me as well. Using Arch Linux + Awesome WM

Can't really debug. GDB won't catch the process (?) tried:
gdb python2
run /usr/bin/screenkey

but the app exits normally

tags: added: python
Pablo SEMINARIO (pabluk) on 2011-05-23
Changed in screenkey:
status: New → Confirmed
importance: Undecided → High
Jacob Gardner (jacob-v-gardner) wrote :

gtk.gdk.threads_enter() hangs on line 391
If you don't call
gtk.gdk.threads_init() sometime before it.
Just as a test I put:
right before that line and it worked perfectly.

Pablo SEMINARIO (pabluk) wrote :

Thanks Jacob

Pablo SEMINARIO (pabluk) on 2011-09-13
Changed in screenkey:
assignee: nobody → Pablo Seminario (pabluk)
status: Confirmed → In Progress
Eiichi Sato (eiiches) wrote :


I also had the same problem on my ubuntu 11.04, although I noticed, on my other machine, which is running ubuntu 10.10, screenkey worked without problems (don't know why). I used revision 50 from bzr trunk.

I looked into the codes, and fixed, by adding or removing gtk.gdk.threads_{enter,leave}.

As already pointed out, there should not be gtk.gdk.threads_{enter,leave} in on_preference_dialog() and on_about_dialog() because gtk (not glib) signal handlers are called *inside* a critical section. I removed them.

I added gtk.gdk.threads_{enter,leave} pairs in functions which are executed in key listener thread or timer thread. threads_init() is not needed since it is already called in a executable 'screenkey'.

I think this will also fix other bugs:
    bug #830958 Doesn't work anymore in Ubuntu 11.10 -- lack of thread synchronization in key listener.
    bug #603755 screenkey crashes -- the same bug.
    bug #620047 Screenkey Not Responsive -- not so sure but I think this is also caused by a lack of syncs in key listener.
    bug #728677 Freezes after writing the first time. -- lack of syncs in timer thread.

I tested this patch on both ubuntu 11.04 / 10.10 and this worked correctly.

Pablo SEMINARIO (pabluk) wrote :

Thanks for you collaboration Eiichi, I'll test the patch.

Dario Bertini (berdario) wrote :

I tested eiiches' patch and it seems to work fine...

what is preventing it to be merged in trunk?

Pablo SEMINARIO (pabluk) wrote :

Hi @Dario,

I just merge Eiichi's patch and Muneeb's fixes in trunk.
I would appreciate if you could test the changes, before I release a new version.


Dario Bertini (berdario) wrote :

uh, I wasn't subscribed to this bug and I didn't receive mail about it... I have to pay more attention :/

I tested the changes by pulling in the latest revision, everything seems ok

Markus Graube (mog33) on 2012-07-25
Changed in screenkey:
status: In Progress → Fix Committed
Samuel Suther (s-suther) wrote :

Still not work in Kubuntu 14.04. If i try to enter Pereferences, the Programm crashed.

This is still affecting Kubuntu 16.04!!!

Dusan (dulex123) wrote :

This same bug is happening on freshly installed Ubuntu Gnome 16.04.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers