Skip to content

Crashlytics: Signal/Mach handlers are installed asynchronously, this doesn't allow to build proper chain #15383

@dkimitsa

Description

@dkimitsa

Description

Java/C# ecosystems requires signals to be handled by them firstly to allow handling of null pointer exceptions inside try/catch block. To achieve this proper signal chain has to be built with Java/c# handlers on top and Crashlytics bellow.
This usually done by restoring signal handler to platform one after initialisation of crashlytics (and delegating handling to it in case of non try/catch case)

currently FIRApp.configure() installs handlers asynchronously and this doesn't allow calling party to wait completion to restore proper chain.

As result Crashlytics:

  • will report phantom crashes on properly handled NPEs inside try/catch

Reproducing the issue

FIRApp.configure() will schedule FIRCLSSignalInitialize/FIRCLSMachExceptionInit in async queue, as result this installation will happen after FIRApp.configure() exits

Firebase SDK Version

12.3

Xcode Version

26.0

Installation Method

Zip

Firebase Product(s)

Crashlytics

Targeted Platforms

iOS

Relevant Log Output

If using Swift Package Manager, the project's Package.resolved

If using CocoaPods, the project's Podfile.lock

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions