launchdarkly / ios-client-sdk

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

Crash when app goes to Background #231

Closed TomCobo closed 3 years ago

TomCobo commented 3 years ago

Describe the bug We are experiencing some of the sessions crash when the app goes to the background state.

To reproduce

Unable to reproduce. We got just the stack trace and some logs.

Stack trace

0  LaunchDarkly                   0x103d73e60 $s12LaunchDarkly13EventReporterC12reportEventsyyF + 108
1  LaunchDarkly                   0x103d834f0 $s12LaunchDarkly8LDClientC7runModeAA0c3RunE0OvW + 180
2  LaunchDarkly                   0x103d79b1c $sSo8NSThreadC12LaunchDarklyE13performOnMainyyyyXEFZ04$s12B83Darkly8LDClientC18didEnterBackground33_14C52C04C80D938C2FE76924F7908AD1LLyyFyyXEfU_AC0I0CTf1cn_nTf4dg_n + 88
3  LaunchDarkly                   0x103d83428 $s12LaunchDarkly8LDClientC18didEnterBackground33_14C52C04C80D938C2FE76924F7908AD1LLyyFToTm + 44

SDK version 4.7.0

Language version, developer tools Swift 5.x

OS/platform iOS 12, 13, 14

torchhound commented 3 years ago

Hi @TomCobo, thanks for reporting this. Is this happening in a development or production environment? Are there a large number of events that the SDK is trying to flush? Do the devices seeing crashes have poor internet connections?

TomCobo commented 3 years ago

hi @torchhound, thanks for the quick response. Yes, we are seeing this only in production and we don't have much more information right now regarding the number of events when flushing or the user's network conditions. We can include some logs on the next release to gather more information.

Note: I've been debugging a bit our app using Network Link Conditioner and it seems stable.

jbrozen commented 3 years ago

@torchhound - Should we also open a Support ticket with our TAM to help with this issue?

Internal reference: NIR-15644

Thanks

-Josh

torchhound commented 3 years ago

Hi all, this sounds similar to another customer reported bug that was fixed in version 5 of the iOS SDK. @jbrozen opening a ticket is fine, please try upgrading the SDK if possible.

torchhound commented 3 years ago

Hi all, we haven't heard back from you in a few months so I'm going to close this issue. Please feel free to comment if this is not resolved or reach out to support@launchdarkly.com.