Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS advanced debug
    text
    copied!<p>I found solution of problem below when enabled "Guard malloc" in "Edit Schema->Diagnostic". Third party code uses memory in inproper way.</p> <hr> <p>I got several random crashes on my iOS application (with ARC, see below). It seams to me that it is due to overreleased objects.</p> <p>I've tried to enable <code>NSZombie</code> in xCode but received no warnings in console prior crash. The same problem with <em>Zombies</em> instrument -- no errors detected. Breakpoint on "All Exceptions" stops on <code>objc_msgSend</code> or something like this.</p> <p>I could not paste any code here or perform line-by-line debug because I don't understand place of crashes.</p> <p>So, does anybody know any other advanced techniques to find sources of errors on iOS? Samples of backtraces:</p> <pre><code>#0 0x3c2e1cda in realizeClass(class_t*) () #1 0x3c2e1d46 in realizeClass(class_t*) () #2 0x3c2e1d46 in realizeClass(class_t*) () #3 0x3c2dc094 in prepareForMethodLookup () #4 0x3c2dbf9a in lookUpMethod () #5 0x3c2dbf66 in _class_lookupMethodAndLoadCache3 () #6 0x3c2db61a in objc_msgSend_uncached () #7 0x3627784c in -[UIButtonContent dealloc] () #8 0x34388310 in CFRelease () #9 0x34463434 in __CFBasicHashDrain () #10 0x343883d0 in CFRelease () #11 0x3627dee6 in -[UIButton dealloc] () #12 0x3627e0b4 in -[UIView dealloc] () #13 0x34388310 in CFRelease () #14 0x3439295c in -[__NSArrayM dealloc] () #15 0x3c2dd488 in (anonymous namespace)::AutoreleasePoolPage::pop(void*) () #16 0x3438a440 in _CFAutoreleasePoolPop () #17 0x34cbb782 in -[NSAutoreleasePool drain] () #18 0x341ce2ca in -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] () #19 0x341cd10e in _performRunLoopAction () #20 0x3441c6cc in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ () #21 0x3441a9c0 in __CFRunLoopDoObservers () #22 0x3441ad16 in __CFRunLoopRun () #23 0x3438debc in CFRunLoopRunSpecific () #24 0x3438dd48 in CFRunLoopRunInMode () #25 0x37f402ea in GSEventRunModal () #26 0x362a3300 in UIApplicationMain () #27 0x000a879c in main at main.m:16 </code></pre> <hr> <pre><code>#0 0x3c2db5be in objc_msgSend () #1 0x34388aaa in CFDictionaryGetValue () #2 0x362656cc in -[UIButton(UIButtonContentLookup) _contentForState:] () #3 0x36274f38 in -[UIButton(UIButtonContentLookup) _backgroundForState:usesBackgroundForNormalState:] () #4 0x36274e54 in -[UIButton contentRectForBounds:] () #5 0x362954c4 in -[UIButton layoutSubviews] () #6 0x36252802 in -[UIView(CALayerDelegate) layoutSublayersOfLayer:] () #7 0x35ffcd8a in -[CALayer layoutSublayers] () #8 0x35ffc928 in CA::Layer::layout_if_needed(CA::Transaction*) () #9 0x35ffd85c in CA::Layer::layout_and_display_if_needed(CA::Transaction*) () #10 0x35ffd242 in CA::Context::commit_transaction(CA::Transaction*) () #11 0x35ffd050 in CA::Transaction::commit() () #12 0x35ffceb0 in CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) () #13 0x3441c6cc in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ () #14 0x3441a9c0 in __CFRunLoopDoObservers () #15 0x3441ad16 in __CFRunLoopRun () #16 0x3438debc in CFRunLoopRunSpecific () #17 0x3438dd48 in CFRunLoopRunInMode () #18 0x37f402ea in GSEventRunModal () #19 0x362a3300 in UIApplicationMain () #20 0x0007479c in main at main.m:16 </code></pre> <hr> <pre><code>#0 0x33750f78 in objc_msgSend () #1 0x35a7b2e6 in CFRelease () #2 0x35af7b36 in __CFDictionaryStandardReleaseValue () #3 0x35b4b3bc in __CFBasicHashDrain () #4 0x35a7b39a in CFRelease () #5 0x332a0c88 in -[UIButton dealloc] () #6 0x33752174 in _objc_rootRelease () #7 0x35a7b2e6 in CFRelease () #8 0x35a9106a in -[__NSArrayM dealloc] () #9 0x33752174 in _objc_rootRelease () #10 0x33753e56 in objc_release () #11 0x33752eac in (anonymous namespace)::AutoreleasePoolPage::pop(void*) () #12 0x33752dc8 in _objc_autoreleasePoolPop () #13 0x35a82cfe in _CFAutoreleasePoolPop () #14 0x34f5898c in __NSFireDelayedPerform () #15 0x35b06a32 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ () #16 0x35b06698 in __CFRunLoopDoTimer () #17 0x35b0526e in __CFRunLoopRun () #18 0x35a884a4 in CFRunLoopRunSpecific () #19 0x35a8836c in CFRunLoopRunInMode () #20 0x33823438 in GSEventRunModal () #21 0x33260cd4 in UIApplicationMain () #22 0x001185b8 in main at main.m:16 #23 0x000f7d78 in start () </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload