MacOS specific- debugging 'spinning beach ball' on installs

I have an install that I thoroughly tested and relaunch on a daily basis. Every few days I encounter the wonderful OSX ‘spinning beach ball’ and the entire application is frozen, and I am not even able to log in remotely.

There are obviously a ton of possibly causes, but can anyone suggest some troubleshooting steps?
Is it possible this is a memory leak issue?


If you are able to run it from Xcode and reproduce the spinning beach ball, then when it happens you can hit the pause icon in the debugger, this will show you the point where the app is stuck.

This is good for debugging issues where the app hasn’t crashed but is stuck in some sort of infinite loop or recursion.

Some other things to look for are:

  • uninitialized variables ( did you know in 0.9.0 you can initialize your variables in the header file after you declare them? )
  • allocation without deallocation ( i.e: pushing back into a vector but not limiting the total size of the vector )
  • memory leaks / not freeing pointers etc.
  • for loops inside for loops where you are accidentally using the same variable ( usually i in both )

One way to tell if its a memory leak is to use the Activity Monitor to see what the memory consumption is after 30 min then 90 min etc ( also the leaks tool in the profiler in Xcode - can point out possible leaks )

I hope that helps!