16

I've seen similar issues/questions on Stack Overflow, but they didn't help.

I built the app with Xcode 11 and iOS 13 SDK. The problem is that I get all these crashes only on iOS 13+, even though my app supports iOS 10+ and there are ~50% iOS 12 users among all. Also, I cannot debug or reproduce it.

From this info I inferred the issue must be specific to iOS 13. Has anyone come across the same issue recently? Possible causes, solutions?

Here is the stack trace from Crashlytics:

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x1c25e1c30 __exceptionPreprocess
1  libobjc.A.dylib                0x1c22fc0c8 objc_exception_throw
2  CoreFoundation                 0x1c24d13ac -[NSCache init]
3  UIKitCore                      0x1c6b189a8 -[UIView(Internal) _addSubview:positioned:relativeTo:]
4  UIKitCore                      0x1c6078bb4 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke_2
5  UIKitCore                      0x1c6b11f60 +[UIView(Animation) performWithoutAnimation:]
6  UIKitCore                      0x1c6078630 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke
7  UIKitCore                      0x1c6b1784c +[UIView(Internal) _performBlockDelayingTriggeringResponderEvents:forScene:]
8  UIKitCore                      0x1c6078088 -[_UINavigationParallaxTransition animateTransition:]
9  UIKitCore                      0x1c606e2b0 ___UIViewControllerTransitioningRunCustomTransition_block_invoke_2
10 UIKitCore                      0x1c61822f8 +[UIInputResponderController _pinInputViewsForInputResponderController:onBehalfOfResponder:duringBlock:]
11 UIKitCore                      0x1c606e238 ___UIViewControllerTransitioningRunCustomTransition_block_invoke.648
12 UIKitCore                      0x1c6b11c0c +[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:]
13 UIKitCore                      0x1c606e088 _UIViewControllerTransitioningRunCustomTransition
14 UIKitCore                      0x1c5f9d77c -[UINavigationController _startCustomTransition:]
15 UIKitCore                      0x1c5fb0c18 -[UINavigationController _startDeferredTransitionIfNeeded:]
16 UIKitCore                      0x1c5fb20f8 -[UINavigationController __viewWillLayoutSubviews]
17 UIKitCore                      0x1c5f954e0 -[UILayoutContainerView layoutSubviews]
18 UIKitCore                      0x1c6b1fabc -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
19 libobjc.A.dylib                0x1c22f7af0 -[NSObject performSelector:withObject:]
20 QuartzCore                     0x1c90be0f4 -[CALayer layoutSublayers]
21 QuartzCore                     0x1c90be3fc CA::Layer::layout_if_needed(CA::Transaction*)
22 QuartzCore                     0x1c90d1964 CA::Layer::layout_and_display_if_needed(CA::Transaction*)
23 QuartzCore                     0x1c9016c1c CA::Context::commit_transaction(CA::Transaction*, double)
24 QuartzCore                     0x1c9041bd8 CA::Transaction::commit()
25 QuartzCore                     0x1c90427ac CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
26 CoreFoundation                 0x1c255c67c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
27 CoreFoundation                 0x1c255731c __CFRunLoopDoObservers
28 CoreFoundation                 0x1c25578cc __CFRunLoopRun
29 CoreFoundation                 0x1c2557098 CFRunLoopRunSpecific
30 GraphicsServices               0x1cc6c1534 GSEventRunModal
31 UIKitCore                      0x1c66777ac UIApplicationMain

Update 1: The issue is relevant to all iPhones running iOS 13, not only iPhone X(S,R) line.

Update 2: The issue is relevant to iOS 12 as well, but crashes happen rarely in comparison to iOS 13. My guess is that the issue is related to building the project with iOS 13 SDK, because the same code built with iOS 12 SDK didn't emit such crashes and the navigation logic wasn't updated.

Aleksandr Honcharov
  • 2,343
  • 17
  • 30
  • We would have to see some code. I would guess that a view is attempting to add itself as a subview. – John Farkerson Oct 10 '19 at 11:43
  • Here's something to look into: https://stackoverflow.com/a/21226801/2142112 – John Farkerson Oct 10 '19 at 11:46
  • @SamuelNoyes, I cannot share any code, because I don't know where it happens. Also, I checked all the code of adding subviews (itself as a subview), it doesn't happen anywhere in the whole codebase. – Aleksandr Honcharov Oct 10 '19 at 11:46
  • @SamuelNoyes I checked all these old answers and possible solutions, doesn't help. – Aleksandr Honcharov Oct 10 '19 at 11:47
  • Hmm. Well sadly I have never experienced this myself so if you can't debug any further I can't be of much help. Have you tried running on an iOS 13 device to see if you can reproduce? – John Farkerson Oct 10 '19 at 11:48
  • @SamuelNoyes, yes, tried, but didn't manage to get any crash. – Aleksandr Honcharov Oct 10 '19 at 11:51
  • 2
    We have the same error going on, but in our case it's not limited to iOS 13. It seems that it's probably about presenting/pushing/dismissing/popping view controllers with animation, but I can only see a regression test (trying to push/pop near simultaneously) as a viable debugging method. – EDUsta Oct 15 '19 at 14:16
  • 1
    @EDUsta Hi. In our case we also got several crashes on iOS 12 (90%+ still iOS 13). It's definitely specific to iOS 13 SDK. With iOS 12 SDK the same code didn't emit any errors of such kind and we haven't changed navigation logic in the app. – Aleksandr Honcharov Oct 15 '19 at 14:19
  • @AleksandrHoncharov Did you ever manage to fix this crash? Thx – chroman Dec 30 '19 at 02:37
  • 1
    @chroman It seems the app built with Xcode 11.3 & iOS SDK 13.3 doesn't have this crash anymore. I guess it was solved on Apple SDK side. – Aleksandr Honcharov Dec 31 '19 at 08:48

1 Answers1

2

The app built with Xcode 11.3 & iOS SDK 13.3 doesn't have this crash anymore. I guess it was solved on the iOS SDK side.

UPDATE: 18.06.2020

For those, who continue having the issue, I'd recommend updating to the new Firebase Crashlytics from the old Fabric Crashlytics. The guide is here: https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=ios

Moreover, I got an email from Firebase about the old SDK deprecation:

We are writing to let you know that the Fabric Crashlytics SDK is now deprecated and will continue reporting your app's crashes until November 15, 2020. After this date, the Fabric Crashlytics SDK and beta versions of the Firebase Crashlytics SDK will stop sending crash reports for your app.

Aleksandr Honcharov
  • 2,343
  • 17
  • 30
  • Our app continues to see reports of this crash when built with Xcode 11.3.1 – esilver Jan 31 '20 at 14:17
  • @esilver Maybe in some cases it happens. Maybe your scenario was slightly different. But in our case the crashes just disappeared altogether. – Aleksandr Honcharov Jan 31 '20 at 15:54
  • 1
    For me it also started when I updated my project to iOS SDK 13.0, but I'm still getting this error on iOS SDK 13.4, but with some search, it seems that it can be the Firebase Crashlytics SDK that is causing this problem – Leonardo Bortolotti May 19 '20 at 15:37
  • Same error here with xcode 11.5 and iOS 13 SDK. It is related to crashlitics SDK. Any solution? – Ugo Chirico Jun 18 '20 at 08:52
  • 1
    Hi @UgoChirico I updated my answer. Please, have a look. – Aleksandr Honcharov Jun 18 '20 at 09:00
  • @AleksandrHoncharov I didn't update from the old version. I created the new project with the new version FirebaseCrashlytics 4.1.0. Today I run pod update and I got the new versions 4.2.0. Let's check if it still happens with the 4.2.0 – Ugo Chirico Jun 19 '20 at 14:28
  • @AleksandrHoncharov What makes you think that this specific crash is related somehow to the old Fabric Crashlytics SDK? I don't doubt you here, but I don't see the actual correlation. – jpm Jul 10 '20 at 21:30
  • I have the same problem in a project that has been on the air since January 2018. I have tried to solve this problem for a while but I can't find anything that seems to solve. In the past it was a small percentage, but as the number of users increased, a little more appears. Today I also have NewRelic in the App, and in the trace it appears that it is a firebase crash, but I just think it is something at the origin of the crash that NewRelic takes as if it were the firebase – Lucas Romano Jul 16 '20 at 02:40
  • @jpm I also don't see the correlation, but some people reported it helped them. And since nobody has a definite answer, that's the best shot. Because in my case the problem disappeared after switching to iOS SDK 13.3, but maybe alongside this switch I updated Fabric SDK. I didn't change any code in my codebase regarding navigation. – Aleksandr Honcharov Jul 16 '20 at 07:44
  • @AleksandrHoncharov Yeah, in my case I'm already using the iOS 13 SDK, and the Fabric SDK was switched to the Firebase Crashlytics SDK months ago, and these crash reports are still coming in. I don't think it's related to that. – jpm Jul 16 '20 at 12:06
  • @LeonardoBortolotti can I have those search links, which makes you believe its crashlytics? I googled but nothing of that sort popped up. Thanks! – BangOperator Jul 29 '20 at 18:00
  • Update: Updating firebase crashlytics has not fixed this for me. – BangOperator Aug 17 '20 at 07:01