launchdarkly / ios-client-sdk

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

LaunchDarkly Crash on Timer #265

Open res0nance opened 2 years ago

res0nance commented 2 years ago

Describe the bug We get a crash captured with firebase

To reproduce We unfortunately don't know exactly how this issue occurs because the stack trace does not seem to originate from our code

Expected behavior LaunchDarkly should not crash

Logs

Crashed: LaunchDarkly.FlagSynchronizer.syncQueue
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x00000000d024ee20
Crashed: LaunchDarkly.FlagSynchronizer.syncQueue
0  libobjc.A.dylib                0x33f0 objc_retain + 16
1  libswiftCore.dylib             0x3c83d4 swift_bridgeObjectRetain + 48
2  LaunchDarkly                   0x959c specialized Dictionary.init(dictionaryLiteral:) + 104 (<compiler-generated>:104)
3  LaunchDarkly                   0x10b14 DarklyService.getFeatureFlags(useReport:completion:) + 812 (<compiler-generated>:812)
4  LaunchDarkly                   0x449f4 FlagSynchronizer.makeFlagRequest(isOnline:) + 440 (<compiler-generated>:440)
5  LaunchDarkly                   0x474c0 partial apply for implicit closure #6 in implicit closure #5 in FlagSynchronizer.startPolling(isOnline:) + 100 (<compiler-generated>:100)
6  LaunchDarkly                   0x62444 closure #1 in LDTimer.timerFired() + 128 (<compiler-generated>:128)
7  LaunchDarkly                   0x61fb8 thunk for @escaping @callee_guaranteed () -> () + 20 (<compiler-generated>:20)
8  libdispatch.dylib              0x2924 _dispatch_call_block_and_release + 32
9  libdispatch.dylib              0x4670 _dispatch_client_callout + 20
10 libdispatch.dylib              0xbdf4 _dispatch_lane_serial_drain + 672
11 libdispatch.dylib              0xc968 _dispatch_lane_invoke + 392
12 libdispatch.dylib              0x171b8 _dispatch_workloop_worker_thread + 656
13 libsystem_pthread.dylib        0x10f4 _pthread_wqthread + 288
14 libsystem_pthread.dylib        0xe94 start_wqthread + 8

SDK version 5.4.5

Language version, developer tools

OS/platform We see this issue on iOS 14 and 15, potentially more.

louis-launchdarkly commented 2 years ago

Hello @res0nance, thank you for reaching out. Does this happen repeatedly and/or frequently? I have also created a task in the team to look at this.

Filed Internally as 147990

res0nance commented 2 years ago

Hello @res0nance, thank you for reaching out. Does this happen repeatedly and/or frequently? I have also created a task in the team to look at this.

Filed Internally as 147990

It has happened on several of our app releases. It doesn't seem to happen all that frequently

louis-launchdarkly commented 2 years ago

Hello @res0nance, thank you for checking. I have discussed this issue with the team, and we have started and are currently working on a newer version of the iOS SDK to address the issues that relate to the iOS SDK's Dictionary usage. I don't have an ETA yet, but I will give you another update when the new version is close to done.

res0nance commented 1 year ago

This has happened repeatedly we have seen this for over well over a month.

On Wed, Mar 30, 2022, 8:50 AM Louis Chan @.***> wrote:

Hello @res0nance https://github.com/res0nance, thank you for reaching out. Does this happen repeatedly and/or frequently? I have also created a task in the team to look at this.

Filed Internally as 147990

— Reply to this email directly, view it on GitHub https://github.com/launchdarkly/ios-client-sdk/issues/265#issuecomment-1082506802, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPIYTCI2MI7KFNRPZ6UP6LVCOQOXANCNFSM5R6H6LPA . You are receiving this because you were mentioned.Message ID: @.***>