ioscrashdispatch

Crash on __dispatch_call_block_and_release


I have an iOS app, and I am getting quite amount of this crash. And it seems that it is not related to my code. Do you have any idea why the app can crash because of this. Is there something that I can do to prevent these crashes.

    Thread 9 Crashed:
1    libobjc.A.dylib     _objc_msgSend + 16
2    libdispatch.dylib   __dispatch_call_block_and_release + 13
3    libdispatch.dylib   __dispatch_queue_drain + 239
4    libdispatch.dylib   __dispatch_queue_invoke$VARIANT$mp + 41
5    libdispatch.dylib   __dispatch_worker_thread2 + 211
6    libsystem_c.dylib   __pthread_wqthread + 295

Solution

  • GCD is used in your app. So.. Bring more detail-info please? code where it's occurred? May be you need copy block vs retain, may be you need use __block vars correctly. May be something else. Obviously, your object had been captured by block is released and deallocated when happens queue_drain, and after that you call method of the object in other scope, or in the block scope.