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

Selector updates in unpredictable ways when closing windows #119

Open
numist opened this issue Mar 27, 2015 · 2 comments
Open

Selector updates in unpredictable ways when closing windows #119

numist opened this issue Mar 27, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@numist
Copy link
Owner

numist commented Mar 27, 2015

Might be a regression from 0.0.8, but I suspect it's not since the state machine tests do not test window closing at all, and reproducing issues like this probably requires specific replay of window updates (and application activation) as provided by the WindowServer, which is also not especially-well mocked in tests.

This bug tracks adding those tests and fixing the issues they uncover. Starting with a log where I closed a bunch of Finder windows and the selector went off into the weeds, including deselecting while there were still windows up:

2015-03-27 12:39:33.979 Switch[11248:6689430] State machine key event with invoke:true direction:increasing repeating:false
<!-- What is this?! -->
2015-03-27 12:39:33.980 Switch[11248:6689430] State machine update window groups: (null)
2015-03-27 12:39:33.986 Switch[11248:6689430] State machine update window groups: {(
    <12785 (SWCoreWindowService.m), 1 windows total>,
    <40258 (numist), 1 windows total>,
    <32318 (untitled 6), 1 windows total>,
    <40262 (numist), 1 windows total>,
    <40260 (numist), 1 windows total>,
    <40256 (numist), 1 windows total>,
    <40254 (numist), 1 windows total>,
    <30633 (NNHashTable.m), 1 windows total>
)}
2015-03-27 12:39:34.180 Switch[11248:6689430] State machine display timer completed
2015-03-27 12:39:36.067 Switch[11248:6689430] State machine event close window
2015-03-27 12:39:36.096 Switch[11248:6689430] State machine update window groups: {(
    <12785 (SWCoreWindowService.m), 1 windows total>,
    <32318 (untitled 6), 1 windows total>,
    <40262 (numist), 1 windows total>,
    <40260 (numist), 1 windows total>,
    <40256 (numist), 1 windows total>,
    <40254 (numist), 1 windows total>,
    <30633 (NNHashTable.m), 1 windows total>
)}
2015-03-27 12:39:36.223 Switch[11248:8311173] SWAccessibilityService.m:232 Closing Finder window <SWAccessibilityService: 0x6080002429a0> took 0.149s
2015-03-27 12:39:37.803 Switch[11248:6689430] State machine event close window
2015-03-27 12:39:37.906 Switch[11248:6689430] State machine update window groups: {(
    <12785 (SWCoreWindowService.m), 1 windows total>,
    <32318 (untitled 6), 1 windows total>,
    <40260 (numist), 1 windows total>,
    <40256 (numist), 1 windows total>,
    <40254 (numist), 1 windows total>,
    <30633 (NNHashTable.m), 1 windows total>
)}
2015-03-27 12:39:37.914 Switch[11248:8311180] SWAccessibilityService.m:232 Closing Finder window <SWAccessibilityService: 0x6080002429a0> took 0.100s
2015-03-27 12:39:38.523 Switch[11248:6689430] State machine event close window
2015-03-27 12:39:38.584 Switch[11248:6689430] State machine update window groups: {(
    <12785 (SWCoreWindowService.m), 1 windows total>,
    <32318 (untitled 6), 1 windows total>,
    <40256 (numist), 1 windows total>,
    <40254 (numist), 1 windows total>,
    <30633 (NNHashTable.m), 1 windows total>
)}
2015-03-27 12:39:38.638 Switch[11248:8311179] SWAccessibilityService.m:232 Closing Finder window <SWAccessibilityService: 0x6080002429a0> took 0.108s
2015-03-27 12:39:39.019 Switch[11248:6689430] State machine event close window
2015-03-27 12:39:39.091 Switch[11248:8311179] SWAccessibilityService.m:232 Closing Finder window <SWAccessibilityService: 0x6080002429a0> took 0.063s
2015-03-27 12:39:39.139 Switch[11248:6689430] State machine update window groups: {(
    <12785 (SWCoreWindowService.m), 1 windows total>,
    <32318 (untitled 6), 1 windows total>,
    <40254 (numist), 1 windows total>,
    <30633 (NNHashTable.m), 1 windows total>
)}
2015-03-27 12:39:39.698 Switch[11248:6689430] State machine key event with invoke:true direction:decreasing repeating:false
2015-03-27 12:39:40.331 Switch[11248:6689430] State machine key event with invoke:true direction:increasing repeating:false
2015-03-27 12:39:42.307 Switch[11248:6689430] State machine event close window
2015-03-27 12:39:42.371 Switch[11248:8311174] SWAccessibilityService.m:232 Closing Finder window <SWAccessibilityService: 0x6080002429a0> took 0.059s
2015-03-27 12:39:42.391 Switch[11248:6689430] State machine update window groups: {(
    <12785 (SWCoreWindowService.m), 1 windows total>,
    <32318 (untitled 6), 1 windows total>,
    <30633 (NNHashTable.m), 1 windows total>
)}
2015-03-27 12:39:43.242 Switch[11248:6689430] State machine key event with invoke:true direction:increasing repeating:false
2015-03-27 12:39:46.426 Switch[11248:6689430] State machine event end invocation
@numist numist added the bug label Mar 27, 2015
@numist numist self-assigned this Mar 27, 2015
@numist numist added this to the β.next milestone Mar 27, 2015
@numist
Copy link
Owner Author

numist commented May 6, 2015

Really wish I had #122 for this…

@numist
Copy link
Owner Author

numist commented May 11, 2016

This is seriously bad now, and needs tests.

@numist numist modified the milestones: 0.0.9 (β), β.next May 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant