talonvoice / beta

Issue tracker for the private Talon Beta
10 stars 0 forks source link

X11 event error on window close #63

Closed khornlund closed 4 years ago

khornlund commented 4 years ago

Closing a window causes the following error in talon console:

2020-05-15 10:02:51 ERROR x11 event error
   13:                           lib/python3.7/threading.py:890 | 
   12:                           lib/python3.7/threading.py:926 | 
   11:                           lib/python3.7/threading.py:870 | 
   10:                               talon/linux/xevents.py:145 | 
    9: ---------------------------------------------------------# stack splice
    8:                               talon/linux/xevents.py:140 | 
    7:                               talon/linux/xevents.py:123 | 
    6:                               talon/linux/xevents.py:31  | 
    5: lib/python3.7/site-packages/Xlib/xobject/drawable.py:487 | 
    4: lib/python3.7/site-packages/Xlib/xobject/drawable.py:472 | 
    3: lib/python3.7/site-packages/Xlib/xobject/drawable.py:461 | 
    2:      lib/python3.7/site-packages/Xlib/protocol/rq.py:1369| 
    1:      lib/python3.7/site-packages/Xlib/protocol/rq.py:1389| 
Xlib.error.BadWindow: <class 'Xlib.error.BadWindow'>: code = 3, resource_id = <class 'Xlib.xobject.resource.Resource'>(0x08a00007), sequence_number = 1373, major_opcode = 20, minor_opcode = 0

Steps to reproduce:

  1. Open window A (eg. nautilus)
  2. Open window B (eg. VS Code)
  3. Position window B so you can focus it while seeing window A
  4. Focus on window B
  5. Click close (x) on window A

OS: Ubuntu 18.04

lunixbochs commented 4 years ago

This is just log spam right? No other effect?

khornlund commented 4 years ago

Correct, it handles it gracefully

lunixbochs commented 4 years ago

try on 1285

khornlund commented 4 years ago

Slightly different but still there

2020-05-15 14:03:59 ERROR     8:                               talon/linux/xevents.py:141 | 
    7:                               talon/linux/xevents.py:123 | 
    6:                               talon/linux/xevents.py:31  | 
    5: lib/python3.7/site-packages/Xlib/xobject/drawable.py:487 | 
    4: lib/python3.7/site-packages/Xlib/xobject/drawable.py:472 | 
    3: lib/python3.7/site-packages/Xlib/xobject/drawable.py:461 | 
    2:      lib/python3.7/site-packages/Xlib/protocol/rq.py:1369| 
    1:      lib/python3.7/site-packages/Xlib/protocol/rq.py:1389| 
Xlib.error.BadWindow: <class 'Xlib.error.BadWindow'>: code = 3, resource_id = <class 'Xlib.xobject.resource.Resource'>(0x0861881e), sequence_number = 176, major_opcode = 20, minor_opcode = 0

[The below error was raised while handling the above exception(s)]
2020-05-15 14:03:59 ERROR x11 event error
    6: lib/python3.7/threading.py:890| 
    5: lib/python3.7/threading.py:926| 
    4: lib/python3.7/threading.py:870| 
    3:     talon/linux/xevents.py:148| 
    2: ------------------------------# stack splice
    1:     talon/linux/xevents.py:145| 
NameError: name 'Xlib' is not defined

It's no biggie, just FYI

lunixbochs commented 4 years ago

yeah, just working on this because it should be an easy bug. try again in 1286 :)

khornlund commented 4 years ago

Seems good!