purchases-ios: crash: EXC_BAD_ACCESS in 4.2.1, DeviceCache.swift - Line 123
- [* ] I have updated Purchases SDK to the latest version
- [*] I have read the Contribution Guidelines
- [*] I have searched the Community
- [* ] I have read docs.revenuecat.com
- [*] I have searched for existing Github issues
Describe the bug Crash in DeviceCache.cache(customerInfo:appUserID:) + 123 Crashed: Backend callbackQueue EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000b2005a2e0
see stack trace below
- Environment
- Platform: iOS
- SDK version: 4.2.1
- StoreKit 2 enabled (Y/N): not sure.
- OS version: 15.5.0
- Xcode version: 13.3.1
- How widespread is the issue. Percentage of devices affected. unknown as of now
- Debug logs that reproduce the issue no logs available for this crash
- Steps to reproduce, with a description of expected vs. actual behavior No steps as such - happened randomly
- Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
Crashed: Backend callbackQueue
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000b2005a2e0
0
libobjc.A.dylib
objc_release + 16
1
Foundation
-[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 676
2
Foundation
-[NSObject(NSKeyValueObservingPrivate) _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 816
3
CoreFoundation
-[CFPrefsSource forEachObserver:] + 332
4
CoreFoundation
-[CFPrefsSource _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:] + 112
5
CoreFoundation
___CFPrefsDeliverPendingKVONotificationsGuts_block_invoke + 440
6
CoreFoundation
__CFDictionaryApplyFunction_block_invoke + 28
7
CoreFoundation
CFBasicHashApply + 148
8
CoreFoundation
CFDictionaryApplyFunction + 328
9
CoreFoundation
_CFPrefsDeliverPendingKVONotificationsGuts + 300
10
CoreFoundation
-[_CFXPreferences _deliverPendingKVONotifications] + 96
11
CoreFoundation
__108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 428
12
CoreFoundation
normalizeQuintuplet + 356
13
CoreFoundation
-[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 152
14
CoreFoundation
-[_CFXPreferences setValue:forKey:appIdentifier:container:configurationURL:] + 128
15
CoreFoundation
_CFPreferencesSetAppValueWithContainerAndConfiguration + 136
16
Foundation
-[NSUserDefaults(NSUserDefaults) setObject:forKey:] + 84
17
<my app>
DeviceCache.swift - Line 123
closure #1 in DeviceCache.cache(customerInfo:appUserID:) + 123
Additional context Add any other context about the problem here.
purchase state is unsubscribed. was on mobile data and not on wifi. app was in foreground, and buttons were pressed, and randomly the crash happened. hasn’t happened again today
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24 (12 by maintainers)
Thanks for your quick response! I don’t have a spare device with a release build yet 😦 Also I don’t know how to repro this … it’s happened once, seemingly randomly. No userdefaults/kvo being passed to purchases. The configure() is called in App’s init() once. I’ll keep a lookout for this crash again.