Understanding crash in Cocos2d iOS game

questions :


I’m trying to understand a crash reported by my crash reporting service. The report is:

Exception Type: EXC_BAD_ACCESS    Code: KERN_INVALID_ADDRESS at 0x12341234

0   libobjc.A.dylib    _cache_getImp + 3
2   libobjc.A.dylib    class_respondsToSelector + 30
3   CoreFoundation     objectIsKindOfClass + 36
4   CoreFoundation     __handleUncaughtException + 68
5   libobjc.A.dylib    _objc_terminate() + 128
6   libc++abi.dylib    safe_handler_caller(void (*)()) + 78
7   libc++abi.dylib    std::terminate() + 19
8   libc++abi.dylib    __cxa_rethrow + 94
9   libobjc.A.dylib    objc_exception_rethrow + 12
10  CoreFoundation     CFRunLoopRunSpecific + 456
11  CoreFoundation     CFRunLoopRunInMode + 104
12  GraphicsServices   GSEventRunModal + 74
13  UIKit              UIApplicationMain + 1120
14  MyCocos2diOSGame    
main.m line 6
main 

The crash reporting service emphasises the following line:

3   CoreFoundation     objectIsKindOfClass + 36

What is happening in this crash?

I’m familiar with the usual crashes like “index out of bounds”, “class doesn’t respond to selector” etc. However this particular crash baffles me. Line two mentions class_respondsToSelector so maybe the code is trying to call a non-existant selector on a class? If that’s the case then why isn’t the selector mentioned by name?

Any insight is very helpful! Thanks in advance.

 

————————–

Answer :

 

 

 

cocos2d-iphone,crash,ios,objective-c

Facebook Comments

Post a comment