crash at window->runAppViaInfiniteLoop( OFSAptr.get() );

I think might be a question about how to debug rather than a particular problem with oF.

I have an app that crashes intermittently. Sometimes it will crash after 20 minutes, and sometimes after 3 hours, but it always crashes eventually.

Here are the deets:

  1. The app is multithreaded.
  2. The app receives OSC messages.
  3. The crash doesn’t occur when the app isn’t receiving OSC messages, but this is most likely due to code that is executed when the messages are received and not the OSC itself
  4. The threads are blocking, and I am careful about locking and unlocking in draw(), update(), and threadedFunction()
  5. I never do anything in the non-openGL threads except update ofVBOs
  6. I’ve read about a GLUT problem with window size. The window size is 3840x1080 (2 HD projectors), but it also crashes when run at half of that size.

When the app crashes, the debugger cries BAD_ACCESS and always points to

window->runAppViaInfiniteLoop( OFSAptr.get() );

in ofAppRunner.cpp as the last readable entry in the call stack. My interpretation of this is that there is something wrong with “window”, but I find this unlikely. So perhaps my understanding of the debugger is wrong?

Has anyone seen this before?

thanks!