Crashing in iOS

Hello, I developed a flutter app. But its crashing in review I got. I am attaching the crash report. Can someone help in that. Thanks so much

Both your crash reports show this:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000

Your app is crashing trying to dereference nil. The crashing thread backtrace looks like this:

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libswiftCore.dylib       … swift_getObjectType + 40
1   path_provider_foundation … static PathProviderPlugin.register(with:) + 88
2   path_provider_foundation … @objc static PathProviderPlugin.register(with:) + 56
3   Runner                   … +[GeneratedPluginRegistrant registerWithRegistry:] + 452
4   Runner                   … AppDelegate.application(_:didFinishLaunchingWithOptions:) + 96
5   Runner                   … @objc AppDelegate.application(_:didFinishLaunchingWithOptions:) + 196

Frame 5 is your application(_:didFinishLaunchingWithOptions:) method. It’s doing its thing and, in frame 3, the +[GeneratedPluginRegistrant registerWithRegistry:] routine calls another routine in your path_provider_foundation. Eventually that lands in static PathProviderPlugin.register(with:) (frame 1) which calls into the Swift runtime (frame 0) which dereferences nil. It’s likely that the code in frame 1 is passing a bogus parameter into the Swift runtime.

There are two ways you can investigate this:

  • Given that this is very much tied to your third-party tooling, you could ask about this via its support channel.

  • Alternatively, you can dig into that code yourself. As a first step, you’d need to symbolicate your crash report to identify the line of code that corresponds to frame 1. See Adding identifiable symbol names to a crash report for info on how to do that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I'm a Flutter developer and I've run into this same problem. When adopting UISceneDelegate it breaks the swift-objc bridge where the swift->objc bridge classes are available at compile time, but at runtime the class is nil.

I've filed an issue with reproduction steps in our issue tracker: https://github.com/flutter/flutter/issues/168228

This is very surprising behavior and possibly an Apple bug we'll have to work with them to address. I wouldn't expect that adding Info.plist entries to designate the UISceneDelegate to effect the runtime behavior of the swift/objc bridge.

Crashing in iOS
 
 
Q