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
Related
I'm using Crittercism (SDK 4.1.2) crash reporting service to catch reports on my iOS app. i've been getting this crash many times and i've no idea why it's happening.
Name: SIGSEGV - Reason: Main
Crashed Thread
0 libobjc.A.dylib 0x397c4b26 objc_msgSend + 6
1 UIKit 0x31965a2d -[UIScrollView(UIScrollViewInternal) _scrollViewAnimationEnded:finished:] + 177
2 UIKit 0x31a0e4b3 -[UIAnimator stopAnimation:] + 471
3 UIKit 0x31a0de9d -[UIAnimator(Static) _advanceAnimationsOfType:withTimestamp:] + 285
4 UIKit 0x31a0dd7d -[UIAnimator(Static) _LCDHeartbeatCallback:] + 53
5 QuartzCore 0x315419cf _ZN2CA7Display15DisplayLinkItem8dispatchEv + 99
6 QuartzCore 0x31541779 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 345
7 IOMobileFramebuffer 0x3411b76d IOMobileFramebufferVsyncNotifyFunc + 105
8 IOKit 0x2fdd9a75 IODispatchCalloutFromCFMessage + 249
9 CoreFoundation 0x2f0b7e21 __CFMachPortPerform + 137
10 CoreFoundation 0x2f0c29df __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35
11 CoreFoundation 0x2f0c297b __CFRunLoopDoSource1 + 347
12 CoreFoundation 0x2f0c114f __CFRunLoopRun + 1399
13 CoreFoundation 0x2f02bc27 CFRunLoopRunSpecific + 523
14 CoreFoundation 0x2f02ba0b CFRunLoopRunInMode + 107
15 GraphicsServices 0x33cff283 GSEventRunModal + 139
16 UIKit 0x318cf049 UIApplicationMain + 1137
17 AppName 0x000b1fef main + 67
Not sure if this is the case for you, but I've had a similar crash caused by a button in an UIView trying to invoke a callback method on a already released object. The UI was displayed, and then the object was released.
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.
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.
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
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.