开发者

Strange memory management issue

I can't identify the object being deallocated, I run my app with Command+Y but despite having MallocStackLogging set to YES and NSZombieEnabled set to YES, when I hit EXC_BAD_ACCESS in my app, gdb doesn't print the memory address of the deallocated object. Any ideas?

Apologies if this seems vague, it looks like it's Core Data related, if anyone can provide insightful analysis of the output I'd very much appreciate it. Thanks

Here's the stack trace at the crash:

#0  0x933b4edb in objc_msgSend
#1  0x08c46040 in ??
#2  0x01f3c6c9 in __CFSetDeallocate
#3  0x01f23a41 in _CFRelease
#4  0x01dd9977 in -[_NSFaultingMutableSet dealloc]
#5  0x01dcb892 in -[NSManagedObject(_NSInternalMethods) _clearRawPropertiesWithHint:]
#6  0x01dcb5ed in -[NSFaultHandler turnObject:intoFaultWithContext:]
#7  0x01dccd8c in -[NSManagedObject dealloc]
#8  0x01db0315 in -[_PFManagedObjectReferenceQueue _processReferenceQueue:]
开发者_开发技巧#9  0x01ddd9ba in _performRunLoopAction
#10 0x01f65252 in __CFRunLoopDoObservers
#11 0x01f6465f in CFRunLoopRunSpecific
#12 0x01f63c48 in CFRunLoopRunInMode
#13 0x0268b615 in GSEventRunModal
#14 0x0268b6da in GSEventRun
#15 0x002a7faf in UIApplicationMain
#16 0x00002b60 in main at main.m:13


Run the Clang Static Analyzer (Xcode Build menu >> Build and Analyze) and check if it finds any issues.

Yesterday I had an "EXC_BAD_ACCESS" problem in one of my apps, and I had NSZombieEnabled but it wasn't printing a message so I was stumped but the static analyzer found an issue where I was releasing an object that was never retained, and fixing that solved my problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜