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

Bug #756346 reported by Suppermann
88
This bug affects 22 people
Affects Status Importance Assigned to Milestone
Screenkey
Fix Committed
High
Pablo SEMINARIO

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.

Tags: python
Revision history for this message
tabou (tabougag) wrote :

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

Revision history for this message
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)
Changed in screenkey:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
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:
gtk.gdk.threads_init()
right before that line and it worked perfectly.

Revision history for this message
Pablo SEMINARIO (pabluk) wrote :

Thanks Jacob

Pablo SEMINARIO (pabluk)
Changed in screenkey:
assignee: nobody → Pablo Seminario (pabluk)
status: Confirmed → In Progress
Revision history for this message
Eiichi Sato (eiiches) wrote :

Hi,

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.

Revision history for this message
Pablo SEMINARIO (pabluk) wrote :

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

Revision history for this message
Dario Bertini (berdario) wrote :

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

what is preventing it to be merged in trunk?

Revision history for this message
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.

Thanks!

Revision history for this message
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)
Changed in screenkey:
status: In Progress → Fix Committed
Revision history for this message
Samuel Suther (s-suther) wrote :

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

Revision history for this message
Giacomo Alzetta (giacomo-alzetta) wrote :

This is still affecting Kubuntu 16.04!!!

Revision history for this message
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  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.