agwells / pywo

Automatically exported from code.google.com/p/pywo
GNU General Public License v3.0
0 stars 0 forks source link

Crashes with "unknown request" when tiling a window #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Run pywo --daemon
2. Mess around with the tiling shortcuts for a couple of minutes

What is the expected output? What do you see instead?

PyWO should always tile the window. It crashes instead with:
grid_height: win=<Window id=62914731>, kwargs={'size':<Size width=[0.5, 
0.6666666666666666, 0.3333333333333333], height=[0.3333333333333333, 0.5, 
0.6666666666666666]>, 'position':<Gravity x=0.00, y=0.00>, 
'invert_on_resize':0, 'gravity':<Gravity x=0.00, y=0.00>, 'xinerama':1}
Exception Request reply to unknown request.  Can't happen! while performing 
<Action 'grid_height'>
Traceback (most recent call last):
  File "pywo/actions/__init__.py", line 124, in __call__
    self.perform(win, **kwargs)
  File "pywo/actions/grid_actions.py", line 163, in perform
    size, width, height, self.cycle, xinerama)
  File "pywo/actions/grid_actions.py", line 181, in get_geometry
    size, width, height, cycle, xinerama)
  File "pywo/actions/grid_actions.py", line 106, in __init__
    dummy = DummyWindow(win, self.position, self.sizes, self.gravity)
  File "pywo/actions/grid_actions.py", line 51, in __init__
    self.extents = window.extents
  File "pywo/core/windows.py", line 275, in extents
    extents = self.__extents()
  File "pywo/core/windows.py", line 266, in __extents
    extents = self.get_property('_NET_FRAME_EXTENTS')
  File "pywo/core/xlib.py", line 113, in get_property
    property = self._win.get_full_property(atom, 0)
  File "/usr/lib/pymodules/python2.7/Xlib/xobject/drawable.py", line 459, in get_full_property
    prop = self.get_property(property, type, 0, sizehint)
  File "/usr/lib/pymodules/python2.7/Xlib/xobject/drawable.py", line 448, in get_property
    long_length = length)
  File "/usr/lib/pymodules/python2.7/Xlib/protocol/rq.py", line 1428, in __init__
    self.reply()
  File "/usr/lib/pymodules/python2.7/Xlib/protocol/rq.py", line 1440, in reply
    self._display.send_and_recv(request = self._serial)
  File "/usr/lib/pymodules/python2.7/Xlib/protocol/display.py", line 547, in send_and_recv
    gotreq = self.parse_response(request)
  File "/usr/lib/pymodules/python2.7/Xlib/protocol/display.py", line 634, in parse_response
    gotreq = self.parse_request_response(request) or gotreq
  File "/usr/lib/pymodules/python2.7/Xlib/protocol/display.py", line 711, in parse_request_response
    req = self.get_waiting_replyrequest()
  File "/usr/lib/pymodules/python2.7/Xlib/protocol/display.py", line 838, in get_waiting_replyrequest
    raise RuntimeError("Request reply to unknown request.  Can't happen!")
RuntimeError: Request reply to unknown request.  Can't happen!

If I then try to interrupt PyWO with Ctrl-C:

^CInterrupted!
Exiting PyWO...
PyWO D-Bus Service stopped
Keyboard shortcuts unregistered

At this point, it doesn't return to the shell prompt. From another terminal:

$ pgrep -lf pywo
2498 /usr/bin/python /usr/local/bin/pywo --daemon
$ kill 2498
$ pgrep -lf pywo
2498 /usr/bin/python /usr/local/bin/pywo --daemon
$ kill 2498
$ pgrep -lf pywo
2498 /usr/bin/python /usr/local/bin/pywo --daemon
$ kill -9 2498
$ pgrep -lf pywo
$ 

What version of the product are you using? On what operating system?

Revision 195 on Ubuntu 11.04 Classic GNOME session (i.e. no Unity), with 
xinerama = yes in [SETTINGS].

Original issue reported on code.google.com by akaih...@gmail.com on 16 Jun 2011 at 9:06

GoogleCodeExporter commented 9 years ago
That's strange... I thought that issue with "RuntimeError: Request reply to 
unknown request.  Can't happen!" error is over. Importing Xlib.threaded should 
make python-xlib threadsafe and prevent this error. Haven't noticed this error 
since I have added this import.

Original comment by kosci...@gmail.com on 16 Jun 2011 at 7:26