3

I'm running an app on iOS and periodical (not very often) it crashes with EXC_BAD_ACCESS. The crash occurs while starting boost::thread:

boost::thread(boost::bind(&SomeClass::someStaticFunction, someParam));

and the call stack i see is:

* thread #35: tid = 0x2a822, 0x00d2469e NdsVgconnectTestApp`boost::(anonymous namespace)::thread_proxy(param=<unavailable>) + 246 at thread.cpp:164, stop reason = EXC_BAD_ACCESS (code=1, address=0x20000008)
  * frame #0: 0x00d2469e NdsVgconnectTestApp`boost::(anonymous namespace)::thread_proxy(param=<unavailable>) + 246 at thread.cpp:164
    frame #1: 0x3b877918 libsystem_pthread.dylib`_pthread_body + 140
    frame #2: 0x3b87788a libsystem_pthread.dylib`_pthread_start + 102

I'm passing to boost::thread a static function so its hard to believe that there is some problem with addressing or pointer corruption. So my question is: Can EXC_BAD_ACCESS crash be an artifact of iOS device running out of memory or the app exceeding the memory limit given by the OS?

Sanich
  • 1,739
  • 6
  • 25
  • 43
  • Maybe you're running out of threads. I don't have iOS, but see similar: http://stackoverflow.com/questions/22569805/boost-thread-throwing-exception-thread-resource-error-resource-temporarily-una/22570554#22570554 – sehe Oct 12 '14 at 19:43
  • @sehe: Maybe. But the strange thing is that I'm not getting the boost::thread_resource_error exception that should be thrown in case of failure on creating new thread. – Sanich Oct 13 '14 at 12:54
  • Maybe the error cascades into abnormal termination – sehe Oct 13 '14 at 12:57

0 Answers0