Skip to content

Crash when getting DynamicConfig value #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bodnar-dan opened this issue Feb 10, 2025 · 1 comment
Open

Crash when getting DynamicConfig value #24

bodnar-dan opened this issue Feb 10, 2025 · 1 comment
Assignees

Comments

@bodnar-dan
Copy link

Description

  • We're facing a crash that comes from Statsig library. There's not much manipulation done from our side and I am unable to reproduce, but I do see it in the crash reports.
  • It's an early crash, that happens soon after app start (2-5 seconds after the app started, possible while Statsig is updating values);

Staktrace

DynamicConfig.getValue<A>(forKey:defaultValue:)

Crashed: com.apple.main-thread
0  [APP]  0x15cdb1c DynamicConfig.getValue<A>(forKey:defaultValue:) + 101 (DynamicConfig.swift:101)

Usage

lazy var myConfig: DynamicConfig = Statsig.getConfig(configName)
lazy var myVar: Int = myConfig.getValue(forKey: valueKey, defaultValue: 0) // -> the line that crashes.

Versions

  • We've got this for several version now. The current version we're using is 1.48.1.
@andre-statsig
Copy link
Contributor

Hey @bodnar-dan, thanks for reporting this! We'll investigate this on our side. Overall, we're looking to refactor how our iOS SDK handles threads, which is what I assume to be the source of this crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants