How to understand this crash? : SIGBUS BUS_ADRALN - ios

Thats in the stack trace and i dont understand this error:
0 CoreFoundation 0x30f57648 ___CFBasicHashFindBucket_Linear_NoCollision + 92
1 CoreFoundation 0x30f59688 __CFBasicHashAddValue + 692
2 CoreFoundation 0x30eaff9f CFDictionarySetValue + 74
3 UIKit 0x35721a0b -[UITouchesEvent _gestureRecognizersForWindow:] + 282
4 UIKit 0x357215d5 -[UIWindow _sendGesturesForEvent:] + 28
5 UIKit 0x357214ab -[UIWindow sendEvent:] + 66
6 UIKit 0x3570a313 -[UIApplication sendEvent:] + 298
7 UIKit 0x35709c53 _UIApplicationHandleEvent + 5090
8 GraphicsServices 0x31a11e77 PurpleEventCallback + 666
9 CoreFoundation 0x30f1ba97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
10 CoreFoundation 0x30f1d83f __CFRunLoopDoSource1 + 166
11 CoreFoundation 0x30f1e60d __CFRunLoopRun + 520
12 CoreFoundation 0x30eaeec3 CFRunLoopRunSpecific + 230
13 CoreFoundation 0x30eaedcb CFRunLoopRunInMode + 58
14 GraphicsServices 0x31a1141f GSEventRunModal + 114
15 GraphicsServices 0x31a114cb GSEventRun + 62
16 UIKit 0x35734d69 -[UIApplication _run] + 404
17 UIKit 0x35732807 UIApplicationMain + 670
18 AppName 0x00002e3b 0x1000 + 7739
The crash occurs sometimes, i dont know on what kind of action it occurs.
How can i understand this issue and can solve my problem?

I think the problem may be that you are re-using gesture objects for more than one UIView based object. They cannot be re-used. I have had similar problems in the past (not exactly the same crash). The documentation on it highlights the limitation. I suppose there is internal state (the hash table seen in the crash) which gets updated in conflicting ways for the different UI View based objects.
If you are not re-using them, try removing all of them temporarily just to confirm the system is otherwise stable.

Related

Crash on rotation with modal segues

I have view controllers 1, 2 and 3 chained like this, 2 and 3 are presented with modal segues:
When the user has been in landscape mode for a little while (inconsistent time), unwinds to the parent view, and then rotates the phone back to portrait, the app crashes with these symbolicated crash reports:
3 unwinds to 2:
Terminating app due to an uncaught exception
'NSInvalidArgumentException', reason: '-[NSConcreteMutableData
rotatesOnDeviceRotation]: unrecognized selector sent to instance
0x19360600'
Last Exception Backtrace
0 CoreFoundation 0x297a1fef __exceptionPreprocess + 127
1 libobjc.A.dylib 0x37a53c8b objc_exception_throw + 39
2 CoreFoundation 0x297a7409 __methodDescriptionForSelector + 1
3 CoreFoundation 0x297a5327 ___forwarding___ + 715
4 CoreFoundation 0x296d4e78 __forwarding_prep_0___ + 24
5 Retrostock v2 0x28b293 0x28b28f
6 CoreFoundation 0x29759e09 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 13
7 CoreFoundation 0x296b4515 _CFXNotificationPost + 1785
8 Foundation 0x2a415749 -[NSNotificationCenter postNotificationName:object:userInfo:] + 73
9 UIKit 0x2cdf78b7 -[UIDevice setOrientation:animated:] + 319
10 UIKit 0x2cdf766b -[UIApplication handleEvent:withNewEvent:] + 1599
11 UIKit 0x2cdf6f69 -[UIApplication sendEvent:] + 73
12 Retrostock v2 0x1ef675 -[IBGMethodSwizzler sendEvent:] (IBGMethodSwizzler.m:103)
13 Retrostock v2 0x1a850b uvSendEvents (UVManager.m:162)
14 UIKit 0x2ce5cc81 _UIApplicationHandleEvent + 633
15 GraphicsServices 0x30f927d1 _PurpleEventCallback + 529
16 GraphicsServices 0x30f9241b PurpleEventCallback + 35
17 CoreFoundation 0x297677cb __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35
18 CoreFoundation 0x29767767 __CFRunLoopDoSource1 + 347
19 CoreFoundation 0x29765d69 __CFRunLoopRun + 1609
20 CoreFoundation 0x296b2201 CFRunLoopRunSpecific + 477
21 CoreFoundation 0x296b2013 CFRunLoopRunInMode + 107
22 GraphicsServices 0x30f91201 GSEventRunModal + 137
23 UIKit 0x2ce56a59 UIApplicationMain + 1441
24 Retrostock v2 0x169690 main () (AppDelegate.swift:14)
25 libdyld.dylib 0x37fdfaaf start + 3
Crashed Thread 0 :
0 CoreFoundation 0x297a231f __handleUncaughtException + 631
1 libobjc.A.dylib 0x37a53f13 objc_terminate() + 175
2 libc++abi.dylib 0x37388de3 std::__terminate() + 79
3 libc++abi.dylib 0x373888af __cxa_rethrow + 103
4 libobjc.A.dylib 0x37a53dd3 objc_exception_rethrow + 43
5 CoreFoundation 0x296b229d CFRunLoopRunSpecific + 633
6 CoreFoundation 0x296b2013 CFRunLoopRunInMode + 107
7 GraphicsServices 0x30f91201 GSEventRunModal + 137
8 UIKit 0x2ce56a59 UIApplicationMain + 1441
9 Retrostock v2 0x169690 main () (AppDelegate.swift:14)
10 libdyld.dylib 0x37fdfaaf start + 3
2 unwinds to 1:
Application crashed with signal SIGSEGV
0 Retrostock v2 0x232293 0x23228f
1 CoreFoundation 0x29759e09 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 13
2 CoreFoundation 0x296b4515 _CFXNotificationPost + 1785
3 Foundation 0x2a415749 -[NSNotificationCenter postNotificationName:object:userInfo:] + 73
4 UIKit 0x2cdf78b7 -[UIDevice setOrientation:animated:] + 319
5 UIKit 0x2cdf766b -[UIApplication handleEvent:withNewEvent:] + 1599
6 UIKit 0x2cdf6f69 -[UIApplication sendEvent:] + 73
7 Retrostock v2 0x196675 -[IBGMethodSwizzler sendEvent:] (IBGMethodSwizzler.m:103)
8 Retrostock v2 0x14f50b uvSendEvents (UVManager.m:162)
9 UIKit 0x2ce5cc81 _UIApplicationHandleEvent + 633
10 GraphicsServices 0x30f927d1 _PurpleEventCallback + 529
11 GraphicsServices 0x30f9241b PurpleEventCallback + 35
12 CoreFoundation 0x297677cb __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35
13 CoreFoundation 0x29767767 __CFRunLoopDoSource1 + 347
14 CoreFoundation 0x29765d69 __CFRunLoopRun + 1609
15 CoreFoundation 0x296b2201 CFRunLoopRunSpecific + 477
16 CoreFoundation 0x296b2013 CFRunLoopRunInMode + 107
17 GraphicsServices 0x30f91201 GSEventRunModal + 137
18 UIKit 0x2ce56a59 UIApplicationMain + 1441
19 Retrostock v2 0x110690 main () (AppDelegate.swift:14)
20 libdyld.dylib 0x37fdfaaf start + 3
I get these reports from Appsee, because the app is now in beta testing, and I can't seem to recreate the error on my own device, so I'm dependent on knowing what the error is before I update it.
It seems like the app "forgets" what view it's in, and don't know what to rotate to. I would really appreciate it if you have any ideas or have experienced anything like this in the past.
UPDATE 1:
v2/ShinobiCharts.framework/Headers/SChartBandSeries.h:42:57: Attribute
'readonly' of property 'orientation' restricts attribute 'readwrite'
of property inherited from 'SChartSeries'
If the view hierarchy is this simple then you may be better off just using either a push segue to navigate then unwind. Without seeing the code one would have to assume the reference to that 2nd controller is lost so the rotation crashes when trying to rotate it (although I haven't experienced this).
Or just pop back one or 2 views simply
self.presentingViewController?.dismissViewControllerAnimated(true, completion: nil)
// Or to pop back 2
self.presentingViewController?.presentingViewController?.dismissViewControllerAnimated(true, completion: nil)
UPDATE:
Your issue is Shonobicontrols specific.
https://www.shinobicontrols.com/forum/shinobicontrols/2014/3/app-terminated-on-rotation-in-[schartcanvas-viewabouttorotate]
We have recently fixed an issue relating to messages being sent to SChartCanvas after it is dealloced that looks very similar to the above issue.
Version ShinobiCharts 2.7.3.hotfix2 might be worth trying if you are seeing this issue. This is available for download from our Portal.
I hope that solves the problem you have been seeing, but don't hesitate to get in touch if the issue persists! :-)
Thanks
Ryan

Cryptic crash in iOS app applicationWillTerminate method

Getting a lot of crashes from crash reporting in an iOS app with the following stack trace. I've not been able to reproduce this. My questions are:
Is this happening when the app terminates and therefore I shouldn't worry too much about it?
If not how can I figure out where this is coming from if I can't reproduce it locally?
0 libobjc.A.dylib (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 313
1 libobjc.A.dylib objc_object::sidetable_release(bool) + 94
2 CoreFoundation _CFAutoreleasePoolPop + 16
3 Foundation -[NSAutoreleasePool release] + 120
4 SmartRoam
MyAppDelegate.m line 95
-[MyAppDelegate applicationWillTerminate:]
5 UIKit -[UIApplication _terminateWithStatus:] + 152
6 UIKit -[UIApplication _handleApplicationSuspend:eventInfo:] + 2474
7 UIKit -[UIApplication handleEvent:withNewEvent:] + 774
8 UIKit -[UIApplication sendEvent:] + 72
9 UIKit _UIApplicationHandleEvent + 664
10 GraphicsServices _PurpleEventCallback + 608
11 GraphicsServices PurpleEventCallback + 34
12 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
13 CoreFoundation __CFRunLoopDoSource1 + 346
14 CoreFoundation __CFRunLoopRun + 1406
15 CoreFoundation CFRunLoopRunSpecific + 524
16 CoreFoundation CFRunLoopRunInMode + 106
17 GraphicsServices GSEventRunModal + 138
18 UIKit UIApplicationMain + 1136
19 SmartRoam
main.m line 41
main
Is this happening when the app terminates and therefore I shouldn't worry too much about it?
How can I figure out where this is coming from if I can't reproduce it locally and it never touches my application code.

i fail to understand these 2 crash reports

Since i received comments of crashes but the app never crashes for me, I now use critterism to hunt down crashes.
I received one report that pointed to me to an error by me. It was easy, since the method name was given and i
could look in my code what might crash. So far, so good.
But i also have the following two that puzzle me.
To me it looks like the app crashes in some internal apple library.( Most likely due to me feeding it some broken stuff...)
There is no call from my code in the crash, so where do start looking?
Does anyone understand these crashes?
Any idea how i can catch these and maybe get some more crash info?
No.1:
0 CoreFoundation 0x3585f88f __exceptionPreprocess + 162
1 libobjc.A.dylib 0x37c06259 objc_exception_throw + 32
2 CoreFoundation 0x35862a9b -[NSObject doesNotRecognizeSelector:] + 174
3 CoreFoundation 0x35861915 ___forwarding___ + 300
4 CoreFoundation 0x357bc650 _CF_forwarding_prep_0 + 48
5 UIKit 0x332f3efb -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 546
6 UIKit 0x332f2f39 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 916
7 UIKit 0x332f2763 -[UITableView layoutSubviews] + 206
8 UIKit 0x33296f37 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 182
9 CoreFoundation 0x357be1fb -[NSObject performSelector:withObject:] + 42
10 QuartzCore 0x3268eaa5 -[CALayer layoutSublayers] + 216
11 QuartzCore 0x3268e6bd _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 216
12 QuartzCore 0x32692843 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 226
13 QuartzCore 0x3269257f _ZN2CA11Transaction6commitEv + 314
14 QuartzCore 0x326ba911 _ZN2CA11Transaction5flushEv + 44
15 QuartzCore 0x326ba8e3 +[CATransaction flush] + 34
16 UIKit 0x332a1fb1 _afterCACommitHandler + 52
17 CoreFoundation 0x35833b1b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
18 CoreFoundation 0x35831d57 __CFRunLoopDoObservers + 258
19 CoreFoundation 0x358320b1 __CFRunLoopRun + 760
20 CoreFoundation 0x357b54a5 CFRunLoopRunSpecific + 300
21 CoreFoundation 0x357b536d CFRunLoopRunInMode + 104
22 GraphicsServices 0x37451439 GSEventRunModal + 136
23 UIKit 0x332c1cd5 UIApplicationMain + 1080
24 Wohnungssuche 0x000d5218 start + 40
No. 2:
Thread: Unknown Name (Crashed)
0 libobjc.A.dylib 0x35beb5d0 objc_msgSend + 16 + 15
1 UIKit 0x39fb0541 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 409 + 408
2 UIKit 0x39f95361 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1317 + 1316
3 UIKit 0x39fac7ff -[UITableView layoutSubviews] + 207 + 206
4 UIKit 0x39f68897 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 259 + 258
5 QuartzCore 0x34ab74eb -[CALayer layoutSublayers] + 215 + 214
6 QuartzCore 0x34ab708d _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 461 + 460
7 QuartzCore 0x34ab7fb1 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 17 + 16
8 QuartzCore 0x34ab799b _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 239 + 238
9 QuartzCore 0x34ab77ad _ZN2CA11Transaction6commitEv + 317 + 316
10 QuartzCore 0x34aee7df _ZN2CA7Display11DisplayLink8dispatchEyy + 255 + 254
11 QuartzCore 0x34aee6d9 _ZN2CA7Display16IOMFBDisplayLink8callbackEP21__IOMobileFramebufferyyyPv + 65 + 64
12 IOMobileFramebuffer 0x375f0fd7 IOMobileFramebufferVsyncNotifyFunc + 155 + 154
13 IOKit 0x3282a5ad IODispatchCalloutFromCFMessage + 193 + 192
14 CoreFoundation 0x3918288b __CFMachPortPerform + 119 + 118
15 CoreFoundation 0x3918d3e7 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35 + 34
16 CoreFoundation 0x3918d38b __CFRunLoopDoSource1 + 139 + 138
17 CoreFoundation 0x3918c20f __CFRunLoopRun + 1383 + 1382
18 CoreFoundation 0x390ff23d CFRunLoopRunSpecific + 357 + 356
19 CoreFoundation 0x390ff0c9 CFRunLoopRunInMode + 105 + 104
20 GraphicsServices 0x3344933b GSEventRunModal + 75 + 74
21 UIKit 0x39fb9291 UIApplicationMain + 1121 + 1120
Thanks for your help!
The crash point in both cases is the same:
UIKit 0x39fb0541 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 409 + 408
In the first case, the table view was trying to call a method on an instance that does not implement said method. The second crash was caused by trying to message garbage.
Thus, the most likely conclusion is that both crashes are symptoms of a single problem; you have an object that is being prematurely released or over-released.
In particular, your table view's data source is being released before or while a table is reloading.
I suspect that UITableView is trying to call the data source's method to create a cell. You could confirm this by setting a breakpoint on said method and looking at the stack trace. If my bet is correct, you'll see the _createPreparedCellForGlobal... method in the trace.
Without knowing details of your app, hard to say. Most likely, this is timing related issue between data being loaded on the screen and the user doing something that causes a request to be canceled earlier than the table view is done loading, causing your data source to be deallocated out from under the table (which can happen because the table view has an assign reference to your object; a non-retaining reference).
To try and reproduce, focus on:
• slow network connection or variable bandwidth (if your app is client/server)
• do things the user might do that causes operations to cancel
• quickly navigate between views without waiting for the update to complete drawing
In your comments, you mention that you are trying on "two different iPhones". Try on other device types and across different network configurations.

ios crash [_UIBackgroundTaskInfo fireExpirationHandler]

Got this crash report from crashlytics, any idea how to decipher this? I think it's related to some background task that I am doing. I am using restkit's background continue option. Crashlytics is also telling me that only 12% of user has the app in focus when this happens.
0 libobjc.A.dylib objc_msgSend + 15
1 UIKit ✭ -[_UIBackgroundTaskInfo fireExpirationHandler] + 48
2 UIKit -[UIApplication handleEvent:withNewEvent:] + 1288
3 UIKit -[UIApplication sendEvent:] + 54
4 UIKit _UIApplicationHandleEvent + 5826
5 GraphicsServices PurpleEventCallback + 882
6 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
7 CoreFoundation __CFRunLoopDoSource1 + 140
8 CoreFoundation __CFRunLoopRun + 1370
9 CoreFoundation CFRunLoopRunSpecific + 300
10 CoreFoundation CFRunLoopRunInMode + 104
11 GraphicsServices GSEventRunModal + 136
12 UIKit UIApplicationMain + 1080

Debugging iOS ad-hoc crash reports:

One of my users has sent me a bunch of crash logs, in which the majority of them read like this -
Thread 0 Crashed:
0 libobjc.A.dylib 0x33479466 objc_msgSend + 18
1 CoreFoundation 0x33a770c6 __CFNotificationCenterDarwinCallBack + 18
2 CoreFoundation 0x33a5dbe0 __CFMachPortPerform + 204
3 CoreFoundation 0x33a556f8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
4 CoreFoundation 0x33a556bc __CFRunLoopDoSource1 + 160
5 CoreFoundation 0x33a47f76 __CFRunLoopRun + 514
6 CoreFoundation 0x33a47c80 CFRunLoopRunSpecific + 224
7 CoreFoundation 0x33a47b88 CFRunLoopRunInMode + 52
8 GraphicsServices 0x33b0e4a4 GSEventRunModal + 108
9 GraphicsServices 0x33b0e550 GSEventRun + 56
10 UIKit 0x32099322 -[UIApplication _run] + 406
11 UIKit 0x32096e8c UIApplicationMain + 664
12 Nav 0x00002ea2 main (main.m:14)
13 Nav 0x00002e38 start + 44
This doesn't really make any sense to me, am I missing something really obvious?
Thanks,
Teja.
There is a wonderful blog post entitled So you crashed in objc_msgSend(). I strongly encourage you to read it. It should teach you how to find out what's going on here.

Resources