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

Detect ANRs on Android and provide configuration option to enable detection #184

Merged
merged 2 commits into from
Jan 22, 2020

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Jan 13, 2020

Goal

Changeset

  • Adds AutoDetectAnrs flag (defaulting to false) to Configuration. When this flag is altered, a method is invoked on the native interface which enables/disables ANR detection
  • Adds an AutoDetectAnrs flag to the BugsnagBehaviour script, which shows up as a checkbox in the GUI
  • Adds NDK + ANR crash buttons to the example app
  • Updates bugsnag-android to allow for the SIGQUIT handler to be disabled: Allow disabling previous signal handler invocation for Unity ANRs bugsnag-android#743

Configuration

Configuration is now a publicly accessible interface to allow for users to supply a value for detectAnrs up-front. This also brings bugsnag-unity more inline with the notifier specification, although configuration options are still considered mutable after initialisation to remain backwards compatible.

Tests

  • Verified that an ANR is detected (or not) when setting each combination of the AutoNotify/AutoDetectAnrs flags in the example app

Copy link
Contributor

@kattrali kattrali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall intent looks good here as well as moving the interface towards spec compliance, however I raised a few inline concerns on the implementation.

src/Assets/Standard Assets/Bugsnag/BugsnagBehaviour.cs Outdated Show resolved Hide resolved
src/BugsnagUnity/Native/Android/Configuration.cs Outdated Show resolved Hide resolved
@fractalwrench fractalwrench force-pushed the anr-detection branch 8 times, most recently from c7c5aa4 to 26de597 Compare January 16, 2020 16:53
@fractalwrench fractalwrench dismissed kattrali’s stale review January 17, 2020 09:44

addressed review comments

@fractalwrench fractalwrench merged commit 93732cf into next Jan 22, 2020
@fractalwrench fractalwrench deleted the anr-detection branch January 22, 2020 14:20
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