开发者

Guide need for debugging crash log

开发者 https://www.devze.com 2023-04-12 16:00 出处:网络
#00x345bbc98 in objc_msgSend () #10x35cd3616 in -[_PFManagedObjectReferenceQueue _processReferenceQueue:] ()
#0  0x345bbc98 in objc_msgSend ()
#1  0x35cd3616 in -[_PFManagedObjectReferenceQueue _processReferenceQueue:] ()
#2  0x35cd32b2 in _performRunLoopAction ()
#3  0x31458a34 in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ ()
#4  0x3145a464 in __CFRunLoopDoObservers ()
#5  0x3145b75a in __CFRunLoopRun ()
#6  0x313ebec2 in CFRunLoopRunSpecific ()
#7  0x313ebdca in CFRunLoopRunInMode ()
#8  0x354d941e in GSEventRunModal ()
#9  0x354d94ca in GSEventRun ()
#10 0x36a03d开发者_运维问答68 in -[UIApplication _run] ()
#11 0x36a01806 in UIApplicationMain ()
#12 0x00002b6a in main (argc=1, argv=0x2fdff494) at /Projects/iOS_Universal/main.m:14

How can i know which object is overrelease.I have my application running with NSZombieEnabled also tried some gdb command but didnt get any help


Set MallocStackLogging, and guard malloc in the debugger. Then, when your App crashes, type this in the gdb console:

(gdb) info malloc-history 0x543216

Replace 0x543216 with the address of the object that caused the crash, and you will get a much more useful stack trace and it should help you pinpoint the exact line in your code that is causing the problem.


Add a breakpoint on Exceptions (Xcode 4 makes this pretty easy) then re-run and crash your app. Chances are you will get a break point right at the point that the crash is occurring. From there you can po the various objects until you hit the one that causes the debugger to complain.

If you have NSZombieEnabled and it is not throwing an exception on the overrelease then you are probably just accessing a released object. Best prevention of that is to nil any object that you release.


It was due to concurrent access of core data db from two different thread i.e main thread & background thread

0

精彩评论

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