Skip to content

[Bug]: Crash OSModelStore.add(id:model:hydrating:) #1548

@jesus-mg-ios

Description

@jesus-mg-ios

What happened?

EXC_BAD_ACCESS KERN_INVALID_ADDRESS Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x3c20 objc_msgSend + 32
1  libswiftCore.dylib             0xb249c Dictionary._Variant.setValue(_:forKey:) + 92
2  libswiftCore.dylib             0x5a620 Dictionary.subscript.setter + 520
3  OneSignalOSCore                0xbd68 OSModelStore.add(id:model:hydrating:) + 93 (OSModelStore.swift:93)
4  OneSignalUser                  0x77d8 OneSignalUserManagerImpl.setNewInternalUser(externalId:pushSubscriptionModel:) + 474 (OneSignalUserManagerImpl.swift:474)
5  OneSignalUser                  0x6864 OneSignalUserManagerImpl.createNewUser(externalId:token:) + 331 (OneSignalUserManagerImpl.swift:331)
6  OneSignalUser                  0x70dc OneSignalUserManagerImpl._login(externalId:token:) + 410 (OneSignalUserManagerImpl.swift:410)
7  OneSignalUser                  0x4af4 OneSignalUserManagerImpl.user.getter + 140 (OneSignalUserManagerImpl.swift:140)
8  OneSignalUser                  0xa4d8 OneSignalUserManagerImpl.setPushToken(_:) + 886 (OneSignalUserManagerImpl.swift:886)
9  OneSignalUser                  0xa5bc @objc OneSignalUserManagerImpl.removeAlias(_:) + 4346357180
10 OneSignalNotifications         0x6200 +[OSNotificationsManager sendPushTokenToDelegate] + 487 (OSNotificationsManager.m:487)
11 OneSignalNotifications         0x6030 +[OSNotificationsManager didRegisterForRemoteNotifications:deviceToken:] + 464 (OSNotificationsManager.m:464)
12 OneSignalNotifications         0x8aa4 -[OneSignalNotificationsAppDelegate oneSignalDidRegisterForRemoteNotifications:deviceToken:] + 118 (UIApplicationDelegate+OneSignalNotifications.m:118)
13 UIKitCore                      0x4bd18c __63-[UIApplication pushRegistry:didUpdatePushCredentials:forType:]_block_invoke + 96
14 libdispatch.dylib              0x2248 _dispatch_call_block_and_release + 32
15 libdispatch.dylib              0x3fa8 _dispatch_client_callout + 20
16 libdispatch.dylib              0x12a34 _dispatch_main_queue_drain + 984
17 libdispatch.dylib              0x1264c _dispatch_main_queue_callback_4CF + 44
18 CoreFoundation                 0x79bcc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
19 CoreFoundation                 0x761c0 __CFRunLoopRun + 1996
20 CoreFoundation                 0xc8284 CFRunLoopRunSpecific + 588
21 GraphicsServices               0x14c0 GSEventRunModal + 164
22 UIKitCore                      0x3ee674 -[UIApplication _run] + 816
23 UIKitCore                      0x14e88 UIApplicationMain + 340
24 SwiftUI                        0x291ef8 closure #1 in KitRendererCommon(_:) + 168
25 SwiftUI                        0x291e28 runApp<A>(_:) + 100
26 SwiftUI                        0x291d0c static App.main() + 180
27 APP                         0x82e4 main + 52 (main.swift:52)
28 ???                            0x1c13e1de8 (Missing)
        

Steps to reproduce?

---

What did you expect to happen?

Not to crash

OneSignal iOS SDK version

5.2.10

iOS version

18

Specific iOS version

Relevant log output

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