launchdarkly / ios-client-sdk

LaunchDarkly Client-side SDK for iOS (Swift and Obj-C)
https://docs.launchdarkly.com/sdk/client-side/ios
Other
70 stars 84 forks source link

Crash - [LDFlagConfigModel dictionaryValueIncludeNulls:] #153

Closed mberndt92 closed 5 years ago

mberndt92 commented 5 years ago

Hey guys! I've seen this popping up since our last release, most likely on startup. We've been using LD version 2.10.x and updated to 2.13.5 in this release, were the crash is happening so I was assuming this is related to the bug thats been supposedly fixed in 2.13.8. After releasing a hot fix of our app updating LD to 2.13.8 this crash still occurs in the same dimension as before.

Let me know if you need any additional info!

Before release (LD version): 2.10.x After release (LD version): 2.13.5 - crash is appearing After hot fix (LD version): 2.13.8 - crash is still appearing

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x20e0cff78 __exceptionPreprocess
1  libobjc.A.dylib                0x20d2c8284 objc_exception_throw
2  CoreFoundation                 0x20dfe35e0 -[NSOrderedSet initWithSet:copyItems:]
3  CoreFoundation                 0x20e0d59e4 ___forwarding___
4  CoreFoundation                 0x20e0d7750 _CF_forwarding_prep_0
5  Darkly                         0x102608f10 -[LDFlagConfigModel dictionaryValueIncludeNulls:] (LDFlagConfigModel.m:64)
6  Darkly                         0x102605380 -[LDUserModel dictionaryValueWithFlagConfig:includePrivateAttributes:config:] (LDUserModel.m:72)
7  Darkly                         0x1025f5654 -[LDDataManager storeUserDictionary:] (LDDataManager.m:128)
8  Darkly                         0x1025f4f9c __44-[LDDataManager saveUser:asDict:completion:]_block_invoke (LDDataManager.m:94)
9  libdispatch.dylib              0x20dad2d74 _dispatch_call_block_and_release
10 libdispatch.dylib              0x20dad430c _dispatch_client_callout
11 libdispatch.dylib              0x20dadb6fc _dispatch_lane_serial_drain
12 libdispatch.dylib              0x20dadc244 _dispatch_lane_invoke
13 libdispatch.dylib              0x20dae4524 _dispatch_workloop_worker_thread
14 libsystem_pthread.dylib        0x20dcd3b38 _pthread_wqthread
15 libsystem_pthread.dylib        0x20dcd9dec start_wqthread
PeterMosaad commented 5 years ago

This is a very critical issue, Could you guys please update us about ASAP.

arun251 commented 5 years ago

Hi @mberndt92 and @PeterMosaad,

Thanks for reporting the issue. We haven't been able to reproduce the issue, but we've added some defensive code checks that should mitigate the issue. We expect to release a patch later today.

mberndt92 commented 5 years ago

@arun251 thanks for your response! Looking at your changes we are quite positive about this possibly fixing our crashes. Thanks a lot!

PeterMosaad commented 5 years ago

@arun251 Thank you for your reply, we update to version 2.13.9 and will keep you posted. We appreciate your help.