Why would an app crash with _objc_msgSend_uncached

来源:互联网 发布:ubuntu 设置开机脚本 编辑:程序博客网 时间:2024/05/17 03:31

Is a document or a place to find information information on what would cause _objc_msgSend_uncached in a crash report?

more info on the crash

libobjc.A.dylib 0x37e623cc  _objc_inform4   libobjc.A.dylib 0x37e616f2  _ZN7cache_t9bad_cacheEP11objc_objectP13objc_selectorP10objc_class5   libobjc.A.dylib 0x37e61730  _ZN7cache_t4findEm6   libobjc.A.dylib 0x37e617da  cache_fill7   libobjc.A.dylib 0x37e65890  lookUpImpOrForward8   libobjc.A.dylib 0x37e5e02a  _class_lookupMethodAndLoadCache39   libobjc.A.dylib 0x37e5ddf8  _objc_msgSend_uncached10  MyApp   0x00253f5c  -[AEEngine scanKeyframes:currentFrame:] in AEEngine.m on Line 25611  MyApp   0x00256148  -[AEEngine doFrame] in AEEngine.m on Line 66412  MyApp   0x00255f28  __31-[AEEngine doFrameInBackground]_block_invoke in AEEngine.m on Line 642

Got another similar crash that looks like this and ends in cache_t::bad_cache

  0   libobjc.A.dylib                   0x37b44368 _objc_trap() + 0  1   libobjc.A.dylib                   0x37b443c8 _objc_fatal + 68  2   libobjc.A.dylib                   0x37b436ee cache_t::bad_cache(objc_object*, objc_selector*, objc_class*) + 202  3   libobjc.A.dylib                   0x37b4372c cache_t::find(unsigned long) + 48  4   libobjc.A.dylib                   0x37b437d6 cache_fill + 122  5   libobjc.A.dylib                   0x37b4788c lookUpImpOrForward + 320  6   libobjc.A.dylib                   0x37b40026 _class_lookupMethodAndLoadCache3 + 30  7   libobjc.A.dylib                   0x37b3fdf6 _objc_msgSend_uncached + 22  8   MyApp                         0x0033811c -[MyCellCell configureCell:] (MyCe
解决办法:

_objc_msgSend_uncached is an internal implementation detail of objc_msgSend. Crashes in objc_msgSend most often indicate that you're sending a message to a deallocated instance. The most common cause of that is incorrect memory management. The most common cause of incorrect memory management is failure to use ARC.

Most likely, -[AEEngine scanKeyframes:currentFrame:] is trying to message something that is deallocated. That doesn't mean the bug is in AEEngine, only that this is the place you tripped over the over-release. I would start by making sure that ARC is turned on, and that you have addressed all static analyzer warnings.

0 0