What can this Crashlytics iOS crash log mean? - ios

I am getting some crash logs in Crashlytics for my iOS app and I am stumped as to how to interpret them. I have tried everything I can think of in my app to create a crash, and have been unable to create one that will result in a stack trace like the following:
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x397e6b26 objc_msgSend + 5
1 Foundation 0x2fcc7f8d -[NSError dealloc] + 60
2 libobjc.A.dylib 0x397f6b0b objc_object::sidetable_release(bool) + 174
3 Foundation 0x2fd241f5 -[NSFilesystemItemRemoveOperation dealloc] + 60
4 libobjc.A.dylib 0x397f6b0b objc_object::sidetable_release(bool) + 174
5 libobjc.A.dylib 0x397e8007 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 358
6 CoreFoundation 0x2f2de981 _CFAutoreleasePoolPop + 16
7 UIKit 0x31b1624d _wrapRunLoopWithAutoreleasePoolHandler + 36
8 CoreFoundation 0x2f3761cd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
9 CoreFoundation 0x2f373b71 __CFRunLoopDoObservers + 284
10 CoreFoundation 0x2f373eb3 __CFRunLoopRun + 730
11 CoreFoundation 0x2f2dec27 CFRunLoopRunSpecific + 522
12 CoreFoundation 0x2f2dea0b CFRunLoopRunInMode + 106
13 GraphicsServices 0x34005283 GSEventRunModal + 138
14 UIKit 0x31b82049 UIApplicationMain + 1136
15 Pocket Linesman 0x000d5a8b main + 17 (main.m:17)
Would anyone know how I can go about interpreting the cause of this stack trace? It seems that something is occurring when I am deleting an object in my app from the file system, but I am not 100% sure.

We can see in the backtrace _CFAutoreleasePoolPop.
It means that the crash occurred while the autorelease pool of the current run loop was trying to release an object that was marked for autorelease...
Usually, it means that an autoreleased object was released manually.
Imagine the following:
{
NSObject * o;
o = [ [ [ NSObject alloc ] init ] autorelease ];
[ o release ];
}
The o object here has a retain count of 1, and is marked for autorelease, so the current instance of the autorelease pool will send it a release message next time it's drained.
So the manual call to release, which is wrong, won't produce a crash, as the object is still leaving yet. But the object will then be deallocated, leaving the autorelease pool with a reference to a deallocated object.
When the pool is drained, it will then try to send a release message to that invalid reference, and your app will crash.

By the internal NSFilesystemItemRemoveOperation being deallocated, I would guess that you're dealing with problematic memory management around NSFileManager's removeItemAtPath:error:. Are you making this call anywhere in your code?

Related

"Selector name found in current argument registers:", What does it mean?

I am monitoring my App using HockeyApp, I can see the following CrashGroups in my HockeyApp Panel.
Crash Group:
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x20
Crashed Thread: 0
main "Selector name found in current argument registers: release"
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000182d9c160 objc_release + 16
1 libobjc.A.dylib 0x0000000182d9dae8 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 504
2 CoreFoundation 0x00000001835fc9fc _CFAutoreleasePoolPop + 24
3 Foundation 0x00000001840141c0 -[NSAutoreleasePool drain] + 148
4 CoreData 0x000000018561c8d0 -[NSManagedObjectContext _mergeChangesFromDidSaveDictionary:usingObjectIDs:] + 3000
5 CoreData 0x000000018561cc20 -[NSManagedObjectContext mergeChangesFromContextDidSaveNotification:] + 496
6 Foundation 0x00000001840f402c __NSThreadPerformPerform + 336
7 CoreFoundation 0x00000001836d509c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 20
8 CoreFoundation 0x00000001836d4b30 __CFRunLoopDoSources0 + 536
9 CoreFoundation 0x00000001836d2830 __CFRunLoopRun + 720
10 CoreFoundation 0x00000001835fcc50 CFRunLoopRunSpecific + 380
11 GraphicsServices 0x0000000184ee4088 GSEventRunModal + 176
12 UIKit 0x00000001888e6088 UIApplicationMain + 200
13 Essentials 0x000000010004d964 main (main.m:52)
14 ??? 0x000000018319a8b8 0x0 + 0
Other similar crash groups are given below.
Crash Group 1:
main "SIGSEGV - Selector name found in current argument registers: count"
Crash Group 2:
main "SIGSEGV - Selector name found in current argument registers: autorelease"
Crash Group 3:
main "SIGSEGV - Selector name found in current argument registers: retain"
HockeyApp didn't give enough clue to identify the reason. Not stack trace information as well, since all these crashes are happening in main thread.
Selector name found in current argument registers? What does it mean? Can someone give an example for this crash.
The number of occurrences of these crash types are keep on increasing in iOS 10.

Mysterious iOS crash with tiny stack trace

I have one user, and only one user, that regularly gets the following crash:
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x0000000192e7a984 objc_object::release() + 8
1 libobjc.A.dylib 0x0000000192e79474 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 524
2 CoreFoundation 0x0000000186855b38 _CFAutoreleasePoolPop + 28
3 CoreFoundation 0x0000000186915124 __CFRunLoopRun + 1460
4 CoreFoundation 0x0000000186855dd0 CFRunLoopRunSpecific + 452
5 GraphicsServices 0x000000018c53dc0c GSEventRunModal + 168
6 UIKit 0x0000000189986fc4 UIApplicationMain + 1156
7 MyApp 0x00000001001a92d0 main (main.m:17)
8 libdyld.dylib 0x0000000193453aa0 start + 4
This is the entire crash, and I have no clue what causes it.
The user has a pretty standard phone, but it only started happening when they got a replacement iPhone 5 earlier this year. Given that timeline and the fact they are the only one with the crash, might the phone itself be at fault?
Is there anywhere I could look for more information to default this information?

How to find, where is the crash happen - ios

I'm running my ios app in ipad 1, the following crash happen sometime while app is running, i don't know where the crash happen. This mostly happen in ios 5.1.1 . Here the crash log,
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xf0000008
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3387ef78 objc_msgSend + 16
1 UIKit 0x333ffa3a -[UIViewController unloadViewForced:] + 254
2 UIKit 0x335473a6 -[UIViewController purgeMemoryForReason:] + 58
3 Foundation 0x3507a4f8 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 12
4 CoreFoundation 0x35c2c540 ___CFXNotificationPost_block_invoke_0 + 64
5 CoreFoundation 0x35bb8090 _CFXNotificationPost + 1400
6 Foundation 0x34fee3e4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 60
7 Foundation 0x34fefc14 -[NSNotificationCenter postNotificationName:object:] + 24
8 UIKit 0x335120e6 -[UIApplication _performMemoryWarning] + 74
9 UIKit 0x335121e0 -[UIApplication _receivedMemoryNotification] + 168
10 libdispatch.dylib 0x33ffb252 _dispatch_source_invoke + 510
11 libdispatch.dylib 0x33ff8b1e _dispatch_queue_invoke$VARIANT$up + 42
12 libdispatch.dylib 0x33ff8e64 _dispatch_main_queue_callback_4CF$VARIANT$up + 152
13 CoreFoundation 0x35c332a6 __CFRunLoopRun + 1262
14 CoreFoundation 0x35bb649e CFRunLoopRunSpecific + 294
15 CoreFoundation 0x35bb6366 CFRunLoopRunInMode + 98
16 GraphicsServices 0x33951432 GSEventRunModal + 130
17 UIKit 0x3338ecce UIApplicationMain + 1074
18 MY Game 0x00079a90 0x75000 + 19088
19 MY Game 0x00079a50 0x75000 + 19024
As i understand from crash log, crash not happen due to my code. It's due low memory. Is that correct? How to find where the crash happen? Any suggestions.
As i understand from crash log, crash not happen due to my code. It's due low memory. Is that correct?
No, that's not correct.
Low memory is being reported, but your view controller is not responding properly. The most common cause of this is a retain cycle - see UIViewController purgeMemoryForReason: Crashing on iOS 5. In that answer, the retain cycle is in SVPullToRefresh , but yours could be elsewhere. The most common cause of retain cycles is not setting a delegate property to weak.
Once you figure out where the issue is, you can set breakpoints in viewDidUnload and ``didReceiveMemoryWarning`, simulate a memory warning, and step through your code to find the error.
Symbolication
Additionally, this crash report isn't symbolicated. Typically you'll want to symbolicate your crash report first. For example, see these lines:
18 MY Game 0x00079a90 0x75000 + 19088
19 MY Game 0x00079a50 0x75000 + 19024
In this case, as pointed out by Kerni, those two will just show start and main, so they won't help you in this instance. But generally, you should symbolicate your crash reports. (Search for "Xccode symbolicate crash logs" if you don't know how to do this.)

_UIDelayedPresentationContext beginDelayedPresentation causing crashes on iOS

I have been getting rather strange crash reports from my live app with stack traces like the following:
Thread 0: Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x38af7942 realizeClass(objc_class*) + 117
1 libsystem_malloc.dylib 0x390dbef5 szone_malloc_should_clear + 1376
2 libobjc.A.dylib 0x38af976f lookUpImpOrForward + 74
3 libobjc.A.dylib 0x38af1feb _class_lookupMethodAndLoadCache3 + 34
4 libobjc.A.dylib 0x38af1db9 _objc_msgSend_uncached + 24
5 UIKit 0x30e571bf __57-[_UIDelayedPresentationContext beginDelayedPresentation]_block_invoke + 26
6 libdispatch.dylib 0x38fd9d07 _dispatch_client_callout + 22
7 libdispatch.dylib 0x38fe2803 _dispatch_source_invoke$VARIANT$mp + 262
8 libdispatch.dylib 0x38fe073d _dispatch_main_queue_callback_4CF$VARIANT$mp + 188
9 CoreFoundation 0x2e3ef819 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
10 CoreFoundation 0x2e3ee0ed __CFRunLoopRun + 1300
11 CoreFoundation 0x2e358c27 CFRunLoopRunSpecific + 522
12 CoreFoundation 0x2e358a0b CFRunLoopRunInMode + 106
13 GraphicsServices 0x3302c283 GSEventRunModal + 138
14 UIKit 0x30bfc049 UIApplicationMain + 1136
This is rather mysterious because neither the main thread nor any of the other live threads in the reports seem to imply that this is caused by my code, though of course I am skeptical of this.
This seems to be a rather common crash according to the number of reports I receive from Crashlytics, yet I have not been able to reproduce it on my own devices. I suspect this is probably related to some memory management issues because the various crashes always end up being some bad pointers being sent messages.
This always happens on this thread and following the -[_UIDelayedPresentationContext beginDelayedPresentation]_block_invoke call. This is obviously a private class being referenced from within some Apple framework, however I am at a loss to figure out exactly which one could be calling this.
The app is an educational game and I suspect this could be related to the GameKit API (particularly the Game Center authentication dialogs).
All of these crashes have been happening exclusively on iOS 7 and on iPad only. The app is universal so it is interesting to see that iPhone users seem to be unaffected.
Does anybody have any previous experience with these private classes that could give me some hints?

How can I resolve a SIGSEGV with crittercism

I'm using crittercism to get crash report on my app.
It's working pretty well but I got a crash with a stacktrace which is not really helpful.
0 libobjc.A.dylib 0x3b16c5b0 objc_msgSend + 16
1 Foundation 0x33d6b0f5 __NSThreadPerformPerform + 461
2 CoreFoundation 0x33429683 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
3 CoreFoundation 0x33428ee9 __CFRunLoopDoSources0 + 213
4 CoreFoundation 0x33427cb7 __CFRunLoopRun + 647
5 CoreFoundation 0x3339aebd CFRunLoopRunSpecific + 357
6 CoreFoundation 0x3339ad49 CFRunLoopRunInMode + 105
7 GraphicsServices 0x36f712eb GSEventRunModal + 75
8 UIKit 0x352b0301 UIApplicationMain + 1121
9 myapp 0x00024c2f main (main.m:14)
The crash is symbolicated but there is no information to point me at the exact place of the crash.
I think it could be an object released too soon, but since it's a random bug and I don't know where it happen its really hard to track it down.
How do I convert this stacktrace or the crash report to a human readable one?
This crash is almost exactly identical with my main headache-causing crash at the moment, and I don't know what to do about it. The only change in my crash log is main (main.m:6) instead of your main (main.m:14).
So far I've found this:
SIGABRT crash on __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
Rejected iPhone app has strange crash logs
The accepted answers suggests that it could be related to misuse of performSelector.
This guy also has the same crash, but with no suggested solution:
http://comments.gmane.org/gmane.comp.handhelds.phonegap/24494
There are other, similar crash logs out there that have a curious addition:
...
CoreFoundation 0xXXXXXXXX -[NSObject performSelector:withObject:] + XX <- additional line
Foundation 0xXXXXXXXX __NSThreadPerformPerform + XXX
CoreFoundation 0xXXXXXXXX __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + XX
...
Which again suggests that it's related to performSelector, but that's still speculation.

Resources