I'm hunting down a bug right now which causes my program to catastrophically crash. None of my asserts are failing, if I turn on logging to figure out where the crash it, it doesn't. It also doesn't crash when running in the debugger.

How do you handle situations like this? I'm not sure why the slow down caused by either logging or the debugger causes the program to work correctly, thought it was threading, but I checked the code, there is only one worker thread running when it crashes. And the main thread doesn't do anything other than dispatch messages.