Skip to content
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

Copy NDK crash reports prior to flushOnLaunch() #1164

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Feb 26, 2021

Goal

Copies NDK crash reports to the bugsnag-errors directory prior to flushOnLaunch() being called. This ensures that any NDK reports which occurred during the launch period are flushed appropriately.

Changeset

The NDK plugin now calls setupNdkPlugin(), which installs signals handlers, syncs the initial state to the NDK layer (metadata/context etc), then copies any existing NDK crash reports to the bugsnag-errors directory.

NativeInterface#deliverReport() no longer needs to call eventStore.flushAsync() because it is now guaranteed that the crash report will be copied before flushOnLaunch() is called.

It's worth noting that this copy takes place on the main thread. PLAT-5736 and PLAT-5975 will make some pre-requisite changes to how synchronous sending of reports works, which will allow NDK crash reports to only be copied if they are startup crashes. Implementing this functionality in the current changeset would likely lead to unnecessary rework.

Testing

Relied on existing E2E test coverage and log messages to confirm the NDK crash report is copied over at the appropriate time.

@fractalwrench fractalwrench marked this pull request as ready for review February 26, 2021 11:11
@fractalwrench fractalwrench merged commit 024b231 into integration/road-1175-identify-crashes-on-launch Mar 4, 2021
@fractalwrench fractalwrench deleted the PLAT-5976/ndk-report-sync branch March 4, 2021 11:48
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

Successfully merging this pull request may close these issues.

2 participants