Totalspaces locking up system

every now and then (started with mavericks) totalspaces i’ll switch to my grid and be unable to leave. windows continue to update in the background but no user input is accepted. if i log in remotely via ssh and kill or restart totalspaces there is no effect. if i hold my power button to shut down the regular shutdown dialog comes up over the grid.

i’m running 2.0.10.

Hi, apologies for this problem, I do understand that locking your machine is one of the worst things that can happen.

A couple of questions to diagnose it better:

If you have a hotkey set for the overview grid, does pressing it again exit the grid?
Do you have multiple monitors?

One note - there is some code in TotalSpaces to force quit the grid when you wake the machine. So putting the machine briefly to sleep (with the power button) then waking it should get you out of this situation (let me know if that doesn’t work).
Also, if you SSH in, killall Dock should get rid of the grid because it runs in the Dock plugin (Dock will restart automatically).

should have mentioned that i tried killing dock as well, it’s a really bizarre problem but it’s happened more than once. i don’t know if it’s an o/s issue or anything to do with totalspaces. is there any debugging i can do in case this happens again?

I encountered the same issue—froze so hard I had to manually hold the power button on my Mac Pro to shutdown and then restart. After having this happen several times I tracked it down to turning off: System Preferences/ Desktop & Screen Saver/ Hot Corners where I had Mission Control as my lower-righthand corner hot corner. Whenever I would enable Mission Control via Apple’s Hot Corners, I encountered the freeze. After turning this Apple feature off, the problem went away.

looks like kill -9 (dock pid) did the job actually. i’ll turn off hot corners and hopefully it won’t happen again.

Hi Steven,

I’ve been running into this problem as well. In my case, the grid eventually unfreezes; it can take anywhere from ~30 seconds to whole minutes.


Yep – on this machine, two.

One thing I’ve noticed is that while the overview grid is non-responsive, a number of application’s windows contents in the grid display corrupted data. They continue to update (with corrupted data) every few seconds, until eventually the grid is dismissed.

In terms of a temporary work-around, what about a watchdog timer that automatically terminates if TotalSpaces fails to complete a modal operation in time? Given that the Dock will auto-relaunch, that would be preferable to being locked out of my machine until either the grid dismisses, or I SSH in to kill the Dock myself.

just an update on my situation - removing hot corners didn’t fix the problem. it happens infrequently, ssh’ing and killing the dock “solves” the problem every time. i have one monitor, 9 spaces. if i have video playing in one of the spaces it continues to play fine - no artifacts/corruption.

Thanks for the feedback. That the grid eventually unfreezes in your case (landonf) is very suggestive that the graphics or windows server is getting overloaded.

I will need to do some more work on this, I’m sorry I don’t have an update right now, but resolving this (and Spaces frozen on Mavericks ) is a priority.

This is still a very big problem with 2.0.17 on Mavericks - it happens fairly regularly on a new mac pro as well as a two-year-old mac mini. The mac pro has two monitors, the mac mini has one. Both have 9 spaces per monitor.

The only way to snap out of it is to ssh in and kill the Dock. I checked console and there were no messages from any application at the time of the freeze.

How can I help troubleshoot this?

Thanks for the further info.

Would you try installing 2.1.2?

Secondly, since version 2.0.15 there has been a feature to restart the Dock if it appears to be hung (so it doesn’t communicate any more with TotalSpaces). But you would definitely see this in the logs. So I have to assume that the Dock is remaining responsive, but the overview grid stays on the screen anyway.

If you still are able to reproduce the issue with 2.1.2 then I can perhaps make a debug build to log more information for you to try.

Your description is what’s happening - no errors in the console log but the grid is locked up anyway. I installed the new version, will let you know if there are any problems. Thanks.

happens with 2.1 :frowning: there are no messages when it froze but here’s everything after i killed the dock process:

4/6/14 1:16:17.013 PM sshd: nik [priv][36854]: USER_PROCESS: 36857 ttys001
4/6/14 1:16:19.964 PM TotalSpaces2[22960]: Dock connection did die
4/6/14 1:16:19.964 PM NotificationCenter[230]: Connection interrupted.
4/6/14 1:16:19.965 PM TotalSpaces2[22960]: Failed to register connection
4/6/14 1:16:19.966 PM TotalSpaces2[22960]: DO proxy exception connection is invalid
4/6/14 1:16:19.967 PM TotalSpaces2[22960]: (
    0   CoreFoundation                      0x00007fff8bb2a25c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff85e80e75 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8bb2a10c +[NSException raise:format:] + 204
    3   Foundation                          0x00007fff892409a8 -[NSConnection sendInvocation:internal:] + 231
    4   CoreFoundation                      0x00007fff8ba881c4 ___forwarding___ + 452
    5   CoreFoundation                      0x00007fff8ba87f78 _CF_forwarding_prep_0 + 120
    6   TotalSpaces2                        0x000000010a15ea8f TotalSpaces2 + 105103
    7   TotalSpaces2                        0x000000010a16003f TotalSpaces2 + 110655
    8   CoreFoundation                      0x00007fff8baf8e0c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    9   CoreFoundation                      0x00007fff8b9eca6d _CFXNotificationPost + 2893
    10  Foundation                          0x00007fff891c17ba -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
    11  Foundation                          0x00007fff8929b449 -[NSConnection invalidate] + 879
    12  Foundation                          0x00007fff89249a88 +[NSConnection _portInvalidated:] + 830
    13  CoreFoundation                      0x00007fff8baf8e0c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    14  CoreFoundation                      0x00007fff8b9eca6d _CFXNotificationPost + 2893
    15  Foundation                          0x00007fff891c17ba -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
    16  Foundation                          0x00007fff891f0484 _NSPortDeathNotify + 76
    17  CoreFoundation                      0x00007fff8bab03ac ____CFMachPortChecker_block_invoke + 204
    18  libdispatch.dylib                   0x00007fff886081d7 _dispatch_call_block_and_release + 12
    19  libdispatch.dylib                   0x00007fff886052ad _dispatch_client_callout + 8
    20  libdispatch.dylib                   0x00007fff8860cf03 _dispatch_main_queue_callback_4CF + 333
    21  CoreFoundation                      0x00007fff8ba91679 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    22  CoreFoundation                      0x00007fff8ba4c954 __CFRunLoopRun + 1636
    23  CoreFoundation                      0x00007fff8ba4c0b5 CFRunLoopRunSpecific + 309
    24  HIToolbox                           0x00007fff85a93a0d RunCurrentEventLoopInMode + 226
    25  HIToolbox                           0x00007fff85a937b7 ReceiveNextEventCommon + 479
    26  HIToolbox                           0x00007fff85a935bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
    27  AppKit                              0x00007fff81d663de _DPSNextEvent + 1434
    28  AppKit                              0x00007fff81d65a2b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
    29  AppKit                              0x00007fff81d59b2c -[NSApplication run] + 553
    30  AppKit                              0x00007fff81d44913 NSApplicationMain + 940
    31  libdyld.dylib                       0x00007fff880145fd start + 1
    32  ???                                 0x0000000000000001 0x0 + 1
4/6/14 1:16:19.982 PM TotalSpaces2[22960]: Dock pid 22955 terminated
4/6/14 1:16:19.982 PM[181]: ([22955]) Exited: Killed: 9
4/6/14 1:16:21.064 PM[185]: Interval maximum value is 946100000 seconds (specified value: 9223372036854775807).
4/6/14 1:16:25.987 PM TotalSpaces2[22960]: Monitoring Dock 36863
4/6/14 1:16:26.019 PM Dock[36863]: TotalSpacesInjector v1.1.6 received init event
4/6/14 1:16:26.021 PM Dock[36863]: Loaded bundle from path: /Library/ScriptingAdditions/TotalSpaces.osax/Contents/Resources/TotalSpaces.bundle
4/6/14 1:16:26.021 PM Dock[36863]: TotalSpacesInjector: Installing TotalSpaces ...
4/6/14 1:16:26.021 PM Dock[36863]: [TotalSpaces] FastSwitch2 (c) 2011-2014 Switchstep is association with BinaryAge
4/6/14 1:16:26.021 PM Dock[36863]: [TotalSpaces] FastSwitch2 is being initialized
4/6/14 1:16:26.022 PM Dock[36863]: [TotalSpaces] Mavericks detected
4/6/14 1:16:26.028 PM Dock[36863]: [TotalSpaces] FastSwitch2 ready v2.1.2
4/6/14 1:16:26.029 PM Dock[36863]: Loaded bundle from path: /Library/ScriptingAdditions/TotalSpaces.osax/Contents/Resources/GridZoom.bundle
4/6/14 1:16:38.956 PM Console[36866]: setPresentationOptions called with NSApplicationPresentationFullScreen when there is no visible fullscreen window; this call will be ignored.
4/6/14 1:16:39.023 PM Mumble[26595]: warning: failed to get scripting definition from /Applications/Utilities/; it may not be scriptable.

Hi, apologies for the delay, I have been travelling.

This trace doesn’t give me any new clues - it says that the Dock process died, and TotalSpaces re-installed itself when it came back to life (which is normal, and a good thing in the circumstances).

So something causes the Dock process to stop responding, but I don’t know what.

One great thing you could do is to run the following command when Dock is stuck and you ssh in:

sample Dock >sample.txt

Then send me the sample.txt file. I’ll see if I can figure out what Dock might be doing, or if it’s deadlocked or whatever.

here’s the sample output while the screen is frozen. had to use pastebin, body is too long.

Thank you. This is very useful. It looks like some kind of deadlock due to TotalSpaces trying to show and unshow the overview grid at the same time. I will investigate how to resolve this.

Can you recall exactly what you did to trigger this particular lockup? How were you exiting the grid (hotkey, hot corner, clicking on a space…?)

Ok, I can see what’s happening.

Indeed there is a situation where if the grid tries to show and unshow at the same time it will get locked. I’m not sure how this is triggered (any hint?) - it’s obviously not designed to do this, but I can fix the deadlock.

Expect a new release within a day or so.

You may try this version (please download and install):

I have fixed the deadlock, but, as I mentioned, I’m not sure the cause of the simultaneous show/unshow. But at least the worst that should happen now would be a crash rather than a lockup.

Please let me know if this does indeed fix it, and if there are any other effects.

Thank you!

nothing particular comes to mind that would trigger this. i have bringing up the grid bound to f3 and f3 is bound to a thumb button on my mouse using usb overdrive. i’ll try the new version.