简体   繁体   中英

Guide need for debugging crash log

#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 0x36a03d68 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.

这是由于来自两个不同线程(即主线程和后台线程)的核心数据数据库的并发访问

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM