-
Notifications
You must be signed in to change notification settings - Fork 0
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
App crashes when backgrounded and brought to foreground #18
Comments
We are experiencing this crash as well on 3.1.1. 100% reproduction rate when backgrounding and foregrounding the app |
Hi @bsneed and team, We’ve transitioned to The lack of stability in the provided solution has already led to a significant loss of time and resources for our team. The prior removal of released versions disrupted our CI pipelines, and now the recommended alternative is introducing additional complexity and delays. We urgently need:
We appreciate your understanding of the urgency here and hope for a swift resolution. Please let us know how we can assist in diagnosing or reproducing the issue to expedite the fix. Looking forward to your prompt response. Best regards, |
Thanks @seanperez29 for the report, looking into this now. |
SwiftUI, on our let configuration = Configuration(writeKey: writeKey)
.flushInterval(10)
.trackApplicationLifecycleEvents(true)
let analytics = Analytics(configuration: configuration)
let brazeDestination = BrazeDestination(additionalConfiguration: { configuration in
// Some minimal Braze configuration
}, additionalSetup: { braze in
// Additional Braze setup for InAppMessages
})
analytics.add(plugin: brazeDestination)
analytics.add(plugin: DestinationFilters())
return analytics |
Thanks everyone! I was finally able to repro in a test case. |
Thanks @bsneed for your help ! |
I don't know yet. I'm only working on this at the moment and not stopping till it's fixed. |
I've narrowed down the issue. Whenever the js engine shuts down, there's still some outstanding objects (specifically the Destination Filter) that get released after the engine. The assert in the engine is reporting that the destfilter hasn't been let go yet, though it eventually is. The reason this manifests at background/foreground is because foreground kicks off a re-fetch of settings, which tears down the JS engine and re-builds it so it can use any new settings data. I'm considering just removing the assert for now since there's no actual leak, just an assert causing an unnecessary crash. I figure this will get everyone moving again while I continue to look at how to refactor such that deallocs are more in sync with the js engine. Thoughts? If I don't hear back in 15/20 mins, I'll go ahead and publish a new version with this change and leave this bug open in the meantime. |
This crash has been mitigated by #19. Please see 3.1.2. |
I am running analytics-swift version 1.7.1 and analytics-swift-live version 3.1.1 and upon launch of the app I am seeing this in the Xcode debugger:
And then if I background our app and bring it to the foreground 1-2 times you get more logs and then it will end up crashing:
If I run analytics-swift version 1.7.1 with analytics-swift-live version 3.1.0 I do not experience any of the debugger logs or the crash, everything seems to work as expected. But once I updated to version 3.1.1 that's when this all started.
I am on Xcode version 15.4
The text was updated successfully, but these errors were encountered: