This repository was archived by the owner on Oct 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
iOS Crash LeanplumRequest.m line 116 #57
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
There's a crash that's been present for 6 months or more.
I think it's caused by the RN client not calling the SDK on the right thread / queue (see logs).
To reproduce
Too hard to reproduce.
Expected behavior
The SDK to not crash.
Logs
+[LeanplumRequest generateUUID]
Crashed: NSOperationQueue 0x280c2f020 (QOS: UNSPECIFIED)
0 libobjc.A.dylib 0x19139b530 objc_msgSend + 16
1 Foundation 0x192bf6830 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 700
2 Foundation 0x192b49c58 -[NSObject(NSKeyValueObservingPrivate) _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 648
3 CoreFoundation 0x1920a524c -[CFPrefsSource forEachObserver:] + 260
4 CoreFoundation 0x1920a6cb0 -[CFPrefsSource _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 76
5 CoreFoundation 0x1921e6ffc ___CFPrefsDeliverPendingKVONotificationsGuts_block_invoke + 408
6 CoreFoundation 0x192107e10 __CFDictionaryApplyFunction_block_invoke + 24
7 CoreFoundation 0x1921d18dc CFBasicHashApply + 116
8 CoreFoundation 0x192107dec CFDictionaryApplyFunction + 168
9 CoreFoundation 0x1921e0710 _CFPrefsDeliverPendingKVONotificationsGuts + 260
10 CoreFoundation 0x192126d70 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 304
11 CoreFoundation 0x192126794 normalizeQuintuplet + 340
12 CoreFoundation 0x192094e74 -[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 108
13 CoreFoundation 0x192097e8c -[_CFXPreferences setValue:forKey:appIdentifier:container:configurationURL:] + 92
14 CoreFoundation 0x1921e5460 _CFPreferencesSetAppValueWithContainerAndConfiguration + 132
15 Foundation 0x192b44a08 -[NSUserDefaults(NSUserDefaults) setObject:forKey:] + 64
16 Leanplum 0x103747fd4 +[LeanplumRequest generateUUID] + 116 (LeanplumRequest.m:116)
17 Leanplum 0x103748d50 __32-[LeanplumRequest sendRequests:]_block_invoke + 261 (LeanplumRequest.m:261)
18 Foundation 0x192c0def8 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
19 Foundation 0x192b1a3e0 -[NSBlockOperation main] + 72
20 Foundation 0x192b198c8 -[__NSOperationInternal _start:] + 740
21 Foundation 0x192c0fc7c __NSOQSchedule_f + 272
22 libdispatch.dylib 0x191be8a38 _dispatch_call_block_and_release + 24
23 libdispatch.dylib 0x191be97d4 _dispatch_client_callout + 16
24 libdispatch.dylib 0x191b8e018 _dispatch_continuation_pop$VARIANT$mp + 412
25 libdispatch.dylib 0x191b8d6dc _dispatch_async_redirect_invoke + 600
26 libdispatch.dylib 0x191b9a02c _dispatch_root_queue_drain + 372
27 libdispatch.dylib 0x191b9a8d0 _dispatch_worker_thread2 + 128
28 libsystem_pthread.dylib 0x191dc91b4 _pthread_wqthread + 464
29 libsystem_pthread.dylib 0x191dcbcd4 start_wqthread + 4
SDK version
3.1.1
Language version, developer tools
n/a
OS/platform
iOS 12.3.1
Additional context
It's definitely an issue where the RN bridge uses an operation queue that's not compatible with the SDK or Foundation APIs. This is usually resolved by dispatching to the main thread for example.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working