4

I've got an app in the app store and there's a crash report showing there's a very occasional crash with details below:

Incident Identifier: C25BD8DF-FAA9-4A5F-B3D2-6E1CE81F1D17
CrashReporter Key:   798f7dee81117ed0f05b3f19dc4bbc2874eefaf6
Hardware Model:      iPhone9,2
Process:             My app [1936]
Path:                /private/var/containers/Bundle/Application/757D7BE6-4F91-4B74-BA64-09FA53AE3E16/My app.app/My app
Identifier:          com.app.Myapp
Version:             12 (1.1)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.app.Myapp [701]


Date/Time:           2017-06-27 20:05:28.7901 -0400
Launch Time:         2017-06-27 16:38:23.0376 -0400
OS Version:          iPhone OS 10.3.2 (14F89)
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000010
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
Triggered by Thread:  0

Thread 0 name:
Thread 0 Crashed:
0   UIKit                           0x0000000190ee4264 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 444 (UIPresentationController.m:731)
1   UIKit                           0x0000000190ee4260 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 440 (UIPresentationController.m:731)
2   UIKit                           0x0000000190e20950 _runAfterCACommitDeferredBlocks + 292 (UIApplication.m:2469)
3   UIKit                           0x0000000190e129ec _cleanUpAfterCAFlushAndRunDeferredBlocks + 528 (UIApplication.m:2447)
4   UIKit                           0x0000000190b86648 _afterCACommitHandler + 132 (UIApplication.m:2499)
5   CoreFoundation                  0x000000018aa109a8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1802)
6   CoreFoundation                  0x000000018aa0e630 __CFRunLoopDoObservers + 372 (CFRunLoop.c:1898)
7   CoreFoundation                  0x000000018aa0ea7c __CFRunLoopRun + 956 (CFRunLoop.c:2849)
8   CoreFoundation                  0x000000018a93eda4 CFRunLoopRunSpecific + 424 (CFRunLoop.c:3113)
9   GraphicsServices                0x000000018c3a8074 GSEventRunModal + 100 (GSEvent.c:2245)
10  UIKit                           0x0000000190bf9058 UIApplicationMain + 208 (UIApplication.m:4089)
11  My app                          0x000000010005a8b4 main + 56 (Database.swift:17)
12  libdyld.dylib                   0x000000018994d59c start + 4

My app doesn't use UIPresentationController so why is this showing as the last line in Thread 0 which is the thread that crashed?

Gruntcakes
  • 37,738
  • 44
  • 184
  • 378
  • Maybe a library references it somehow? – Nick Jul 23 '17 at 17:47
  • @Nick The app's not using any libraries providing any GUI type functionality. – Gruntcakes Jul 23 '17 at 17:53
  • 2
    This is probably unanswerable without knowing your code. While it *could* be a bug in an Apple framework, I would more assume you're doing something in e.g. a completion block you're not supposed to do or the like. You not using `UIPresentationController` explicitly doesn't mean it's not there. It is used by the regular UIKit classes as well, for example for presenting another view controller modally. I could imagine you are accidentally snitching a view it expects away in an async call or the like for it to crash. – Gero Jul 25 '17 at 07:17
  • 1
    `UIKit` uses `UIPresentationController` to manage transitions of presented `viewControllers` check your code where you used `present(UIViewController, animated: Bool, completion:...)` or where you have modal transitions, like `popover` s. It also might be an animation conflict between presenting a controller and doing another thing like custom animations in the main thread synchronously – MohyG Jul 27 '17 at 07:32
  • 1
    Possible duplicate of https://stackoverflow.com/questions/39530125/app-crashing-on-runtransitionforcurrentstate-but-no-clue-as-to-why – fishinear Jul 28 '17 at 14:30
  • @Sausagedioxide Did you figure out where this crash was coming from? – user2363025 Oct 10 '17 at 14:37

1 Answers1

0

Without looking at your code exactly this is quite hard to answer. Commonly, you should check possible classes (including system frameworks) that you might ignore are actually a subclass of UIPresentationController. In addition, a 3rd party library might be referencing this class (or subclass).

However most likely is that this is a crash in UIKit. UIPresentationController is a class that provides advanced view controller management and handles transitioning between controllers. Most likely, UIKit is crashing somewhere (very possibly due to your code). More info in the Apple docs.

donkey
  • 1,343
  • 13
  • 32