Skip to content

[Bug]: EXC_BAD_ACCESS fatal exception in OneSignalNotifications.m #1531

@trooperandz

Description

@trooperandz

What happened?

An unhandled, fatal exception was thrown in the OneSignalNofications.m file with the following breadcrumbs being reported in Sentry (also see image attached):

EXC_BAD_ACCESS: Exception 1, Code 1, Subcode 9223372036854775824 > KERN_INVALID_ADDRESS at 0x8000000000000010.

In addition, part of the Sentry error message states the following:
Dictionary.Keys._customContainsEquatableElement

Screenshot 2024-12-18 at 4 41 12 PM

Steps to reproduce?

I am not able to create a reproduction of the error as it happens intermittently and I do not know a reliable way to recreate it.

What did you expect to happen?

I expect the exception to be fixed or handled some way instead of causing a fatal crash.

OneSignal iOS SDK version

Release 5.2.8

iOS version

17

Specific iOS version

* iOS 18.1.1
Note that I could not select 18 above; is this an official support level, or does the template need updating to add 18?

Relevant log output

system

    exception
        stack-trace
            frame (marked in-app by stack trace rule (family:native package:**/Containers/Bundle/Application/** +app))
                filename
                    <compiler-generated>
                function
                    Dictionary.Keys._customContainsEquatableElement
            frame (marked in-app by stack trace rule (family:native package:**/Containers/Bundle/Application/** +app))
                filename
                    <compiler-generated>
                function
                    [A : B].Keys
            frame (marked in-app by stack trace rule (family:native package:**/Containers/Bundle/Application/** +app))
                filename
                    <compiler-generated>
                function
                    Sequence<T>.contains
            frame (marked in-app by stack trace rule (family:native package:**/Containers/Bundle/Application/** +app))
                filename
                    onesignalusermanagerimpl.swift
                function
                    OneSignalUserManagerImpl.setNewInternalUser
            frame (marked in-app by stack trace rule (family:native package:**/Containers/Bundle/Application/** +app))
                filename
                    onesignalusermanagerimpl.swift
                function
                    OneSignalUserManagerImpl.createNewUser
            frame (marked in-app by stack trace rule (family:native package:**/Containers/Bundle/Application/** +app))
                filename
                    onesignalusermanagerimpl.swift
                function
                    OneSignalUserManagerImpl._login
            frame (marked in-app by stack trace rule (family:native package:**/Containers/Bundle/Application/** +app))
                filename
                    onesignalusermanagerimpl.swift
                function
                    OneSignalUserManagerImpl.user.getter
            frame (marked in-app by stack trace rule (family:native package:**/Containers/Bundle/Application/** +app))
                filename
                    onesignalusermanagerimpl.swift
                function
                    OneSignalUserManagerImpl.setPushToken

frame (marked in-app by stack trace rule (family:native package:**/Containers/Bundle/Application/** +app))

    function
        OneSignalUserManagerImpl.removeAlias

frame (marked in-app by stack trace rule (family:native package:**/Containers/Bundle/Application/** +app))

    filename
        osnotificationsmanager.m
    function
        +[OSNotificationsManager sendPushTokenToDelegate]

frame (marked in-app by stack trace rule (family:native package:**/Containers/Bundle/Application/** +app))

    filename
        osnotificationsmanager.m
    function
        +[OSNotificationsManager didRegisterForRemoteNotifications:deviceToken:]

frame (marked in-app by stack trace rule (family:native package:**/Containers/Bundle/Application/** +app))

    filename
        uiapplicationdelegate+onesignalnotifications.m
    function
        -[OneSignalNotificationsAppDelegate oneSignalDidRegisterForRemoteNotifications:deviceToken:]

    frame
        function
            UIApplicationMain

type

    EXC_BAD_ACCESS

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions