Hammerspoon / hammerspoon

Staggeringly powerful macOS desktop automation with Lua
http://www.hammerspoon.org
MIT License
12.06k stars 583 forks source link

latest version breaks me in at #2507

Open maxandersen opened 4 years ago

maxandersen commented 4 years ago

after #2481 being fixed I've now updated and past that issue but bumped into something that never broke before too:

my config hasn't changed but eventually I get this error:

2020-09-23 14:38:16: 14:38:16 ERROR:   LuaSkin: hs.hotkey callback: ...n.app/Contents/Resources/extensions/hs/window/tiling.lua:110: not a rect
stack traceback:
    [C]: in function 'error'
    ...n.app/Contents/Resources/extensions/hs/geometry/init.lua:659: in function 'hs.geometry.toUnitRect'
    ...n.app/Contents/Resources/extensions/hs/window/tiling.lua:110: in function 'hs.window.tiling.tileWindows'
    ...n.app/Contents/Resources/extensions/hs/window/layout.lua:455: in upvalue 'performPendingActions'
    ...n.app/Contents/Resources/extensions/hs/window/layout.lua:593: in function 'hs.window.layout.apply'
    ...n.app/Contents/Resources/extensions/hs/window/layout.lua:685: in function 'hs.window.layout.resume'
    ...n.app/Contents/Resources/extensions/hs/window/layout.lua:884: in function 'hs.window.layout.resumeAllInstances'
    /Users/max/code/dotfiles/.hammerspoon/init.lua:471: in function 'toggleLayout'

line init.lua:471 is an "else" line but I assume it hits:

hs.window.layout.resumeAllInstances()

or hs.window.layout.pauseAllInstances()

maxandersen commented 4 years ago

note, restart of hammerspoon things works fine - it just stops working eventually...not sure why/when yet

asmagill commented 4 years ago

hs.window.layout uses hs.window.filter, so could you try the fix described in https://github.com/Hammerspoon/hammerspoon/issues/2465#issuecomment-697154463 (also a pending pull at https://github.com/Hammerspoon/hammerspoon/pull/2509 if you prefer) and see if that makes a difference?

maxandersen commented 4 years ago

ive copied it into the file and restarted - now we wait to see if it fails again :)

maxandersen commented 4 years ago

sorry clicked the worng button ;)

vritser commented 4 years ago

same error

asmagill commented 4 years ago

as in you're getting this same error? are you running the latest official release of Hammerspoon?

maxandersen commented 4 years ago

FYI. I've not had the issue since I reported it and tried using the suggestion.

vritser commented 4 years ago

@asmagill Yes, the latest version

vritser commented 4 years ago

I have downgraded to version 0.9.78, and it works fine.