QuartzCore - Crash in iOS8

8

After releasing the new version of my iOS application , I am getting the following crash frequently.

Crashed: WebThread EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x80000012

This is one of the irritating crashes where stack trace didn't give any clues related to where its crashing or what causes the crash. One major thing is that this crash is only there in iOS8. Please find below the stack trace :

0 libobjc.A.dylib        objc_msgSend + 5 release
1 CoreFoundation         CFRelease + 600
2 QuartzCore             CA::release_objects(X::List<void const*>*) + 16
3 QuartzCore             -[CAAnimation dealloc] + 54
4 libobjc.A.dylib        objc_object::sidetable_release(bool) + 166
5 libobjc.A.dylib        (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 404
6 CoreFoundation         _CFAutoreleasePoolPop + 16
7 Foundation             -[NSAutoreleasePool drain] + 122
8 CFNetwork              AutoAutoreleasePool::~AutoAutoreleasePool() + 24
9 CFNetwork              ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 166
10 CFNetwork             RunloopBlockContext::_invoke_block(void const*, void*) + 60
11 CoreFoundation        CFArrayApplyFunction + 36
12 CFNetwork             RunloopBlockContext::perform() + 182
13 CFNetwork             MultiplexerSource::perform() + 216
14 CFNetwork             MultiplexerSource::_perform(void*) + 48

Any hint would be greatly appreciated. Thanks in advance.

objective-c
iphone
crash
ios8
asked on Stack Overflow Dec 22, 2014 by christijk

1 Answer

0

Most of the time, EXC_BAD_ACCESS results from sending a message to an object that has already been released. While this is harder-than-before to do under ARC, it is still possible.

The KERN_INVALID_ADDRESS part just tells you that the memory you tried to access isn't part of your app's memory space, which lends credence to the released-object-handle hypothesis.

To debug previously released objects (called "Zombie" objects), turn on NSZombies in the debugger. In XCode 7...

  • CMD-SHIFT- to bring up manage schemes.
  • Select your scheme
  • Select Diagnostics
  • Check Enable Zombie Objects

NOTE: you only want to do this on debug builds, as zombie-objects take-up a ton of memory and hurt performance overall. Still, it's an excellent debugging tool.

answered on Stack Overflow Oct 5, 2015 by Olie

User contributions licensed under CC BY-SA 3.0