Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guake fails to start due to a GlobalHotkey related C call #558

Closed
jyssh opened this issue Jun 1, 2015 · 29 comments · Fixed by #560
Closed

Guake fails to start due to a GlobalHotkey related C call #558

jyssh opened this issue Jun 1, 2015 · 29 comments · Fixed by #560

Comments

@jyssh
Copy link

jyssh commented Jun 1, 2015

This is the traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/site-packages/guake/main.py", line 235, in <module>
    exec_main()
  File "/usr/lib/python2.7/site-packages/guake/main.py", line 231, in exec_main
    if not main():
  File "/usr/lib/python2.7/site-packages/guake/main.py", line 147, in main
    instance = Guake()
  File "/usr/lib/python2.7/site-packages/guake/guake_app.py", line 287, in __init__
    self.hotkeys = guake.globalhotkeys.GlobalHotkey()
SystemError: NULL result without error in PyObject_Call

This started happening since today. I tried the usual reboot-and-hope-things-work scenario, but didn't work.
For the record, I am using Arch Linux.

@gsemet gsemet added this to the 0.7.3 milestone Jun 1, 2015
@gsemet
Copy link
Member

gsemet commented Jun 1, 2015

thanks for report. Doesn't it also do it in 0.7.x / 0.6.x or 0.5.x ?

@gsemet gsemet self-assigned this Jun 1, 2015
@jyssh
Copy link
Author

jyssh commented Jun 1, 2015

I haven't faced this issue earlier. The latest version of guake on Arch Linux is 0.7.0-1 as per this listing, updated on 2015-05-04 10:27 UTC. It has been flagged out-of-date since then.
I think I faced this issue only now because I updated my system yesterday. I am not so sure about this though, as guake might have been updated to its latest version before yesterday's update.

@gsemet
Copy link
Member

gsemet commented Jun 1, 2015

Probably a dependency that has been updated

@jenrik
Copy link
Contributor

jenrik commented Jun 2, 2015

This also happen with Guake 0.7.2 on Arch Linux. I have to note that it only happen sometimes, if I start and stop Guake repeatedly I can see that some of the times it fails and other times it runs just fine.

For dependecy version, this is the version I have installed as of writting this:

@ivoshm
Copy link

ivoshm commented Jun 2, 2015

Navigate to /usr/lib/python2.7/site-packages/guake and delete all files ending with .pyc then reboot.

PS: I'm not author of this idea - all credits to JayGuevara at https://forum.manjaro.org/index.php?topic=23155.msg203775#msg203775.
PS2: Even I have no idea how it works :-)

@jenrik
Copy link
Contributor

jenrik commented Jun 2, 2015

@ivoshm I deleted all .pyc and .pyo files, and it didn't resolve the issue

@ivoshm
Copy link

ivoshm commented Jun 2, 2015

I can imagine only two differences between me and you ... I didn't remove *.pyo only *.pyc and I rebooted.

@jyssh
Copy link
Author

jyssh commented Jun 2, 2015

@stibbons

Probably a dependency that has been updated

I thought the same, however I haven't been able to find a culprit.
In an attempt to find some commonality with others, I will mention my full setup:

System: Arch Linux
Desktop Environment: LXQt 0.9
Guake 0.7.0

LXQt may have had a hand in this, but I am positive it hasn't been updated recently.

@jyssh
Copy link
Author

jyssh commented Jun 2, 2015

@ivoshm *.pyc files were the culprits in my eyes too, and then I saw your comment. I followed your suggestion word to word, but as @jenrik says, this does not work; not reliably at least.
On the contrary, what @jenrik says is true on my side - guake would start after random number of attempts, failing in the rest of the attempts.

@gsemet
Copy link
Member

gsemet commented Jun 2, 2015

that's really weird...

@ivoshm
Copy link

ivoshm commented Jun 2, 2015

@ghosthoughts All people affected are Arch positive, desktop environment is probably not the key (in Manjaro forum was bug reported on KDE primally, you are on LXQt, @jenrik on vanilla ? Arch and another happy Manjaro man solved this problem same way as me on MATE).
If guake crashed I had similar symptoms as you - sometimes guake started, sometimes crashed. After removing pyc problem disappeared and never returned.
Only weak idea - try remove pyc files in python dependencies too (python2-notify, python2-gconf, python2-dbus, python2-xdg), may be it helps.

@enlighter
Copy link

I am on the same boat as @ghosthoughts , although my DE is gnome and i don't think DE has anything to do with it....
I had upgraded to guake 0.7.0 a while ago and it was working perfectly as usual... but I noticed the problem being discussed here appear after the 'python2-setuptools (1:16.0-1 -> 1:17.0-1)' and 'python2 (2.7.9-1 -> 2.7.10-1)' upgrades.
I think the upgrade to python2 2.7.10-1 https://www.archlinux.org/packages/extra/x86_64/python2/ is the cause for this problem.
here's the changelog for python2.7.10 https://hg.python.org/cpython/raw-file/15c95b7d81dc/Misc/NEWS

@enlighter
Copy link

@jenrik
Copy link
Contributor

jenrik commented Jun 2, 2015

@ivoshm I have tried deleting only .pyc files, and I have tried both .pyc and .pyo files, neither helped me. I will also note that I have tried with both openbox and xfce4 (with xfwm window manager).
Recompiling and reinstalling didn't help.
By best guess is that the problem is somewhere in globalhotkeys, since it probably shouldn't return NULL.
And here is a list of packages I have installed, all except for a few are from the official arch repository: https://gist.github.com/jenrik/0062bdd84e0f77c815d8

@ivoshm
Copy link

ivoshm commented Jun 2, 2015

Maybe it will be way ... I'm using non-standard global hot-key (Win+Z) instead of default F12.

If I set global hotkey back to F12, exception reappear again.
If I set global hotkey to my favorite Win+Z, everything is ok.

@jenrik
Copy link
Contributor

jenrik commented Jun 2, 2015

Setting the show/hide hotkey to F12 or Pause doesn't fix it.

@jenrik
Copy link
Contributor

jenrik commented Jun 2, 2015

The problem happens when "GlobalHotkey()" is called which calls the C function GlobalHotkey_init in globalhotkeys.c, which doesn't return NULL?! It may very well be calling other C functions I just haven't noticed.

@gsemet
Copy link
Member

gsemet commented Jun 2, 2015

This is a very old code, never touched since prehistoric times...

@jenrik
Copy link
Contributor

jenrik commented Jun 2, 2015

Gonna startup a proper debugger tomorrow and see if I can find out some more about the issue.

@gsemet
Copy link
Member

gsemet commented Jun 2, 2015

i don't env environment to debug it at home for the moment...

@vertexmachina
Copy link

Same issue occurring here. My hotkey to raise the terminal is not the default. I'm on Arch with xfce. Python was updated a few days ago which is around the time the issues started, so perhaps the python update is causing the issue.

[2015-05-30 00:43] [ALPM] upgraded python2 (2.7.9-1 -> 2.7.10-1)
[2015-05-30 09:21] [PACMAN] Running 'pacman --color auto -S --asdeps --needed extra/python-gobject community/python-pyudev'
[2015-05-30 09:21] [ALPM] installed python-gobject (3.16.1-1)
[2015-05-30 09:21] [ALPM] installed python-pyudev (0.16.1-3)
[2015-05-30 10:23] [ALPM] removed python-pyudev (0.16.1-3)
[2015-05-30 10:23] [ALPM] removed python-gobject (3.16.1-1)
[2015-05-31 11:17] [ALPM] upgraded python2-cffi (1.0.3-1 -> 1.1.0-1)
[2015-05-31 11:17] [ALPM] upgraded python2-markdown (2.6.1-1 -> 2.6.2-1)

@ivoshm
Copy link

ivoshm commented Jun 3, 2015

I refer all ... today my guake didn't started - I am inclined to the random occurrence of this error (maybe it will be this NULL without error message as mentioned by @enlighter).

@gsemet
Copy link
Member

gsemet commented Jun 3, 2015

Can you roll back to python 2.7.6 ?

@ivoshm
Copy link

ivoshm commented Jun 3, 2015

I rollbacked to python 2.7.9 (python2-2.7.9-1-x86_64.pkg.tar.xz) and started Guake ten times without problem (even mixing Win+Z and F12 global hotkey).

@gsemet
Copy link
Member

gsemet commented Jun 3, 2015

so this comes from 2.7.10?

@ivoshm
Copy link

ivoshm commented Jun 3, 2015

Looks like ... I updated my Manjaro at Saturday and Python's update from 2.7.9 to 2.7.10 was included.

Actual Arch package info for python2 ...https://www.archlinux.org/packages/extra/x86_64/python2/

@jenrik
Copy link
Contributor

jenrik commented Jun 3, 2015

I have created a PR that replaces guakes internal GlobalHotkeys system with the keybinder module and as a result fixes this issue.
And I also created a PKGBUILD for a patched 0.7.2 version, for the people who are unwilling to use development versions: https://gist.github.com/jenrik/6063d0b7053253c6964e

@Bujiraso
Copy link

Bujiraso commented Jun 4, 2015

Also on Arch x64, running Gnome, Pause for my hotkey, latest python update seems to have broken everything -- no new information there.
But I applied @jenrik 's patch and deleted my .pycs, then rebooted and I have guake running again.

@joe-conigliaro
Copy link

Thanks jenrik! Nice one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants