fix(crash-reporting): don't crash if triggered before init - #21533
Open
david-allison wants to merge 1 commit into
Open
fix(crash-reporting): don't crash if triggered before init#21533david-allison wants to merge 1 commit into
david-allison wants to merge 1 commit into
Conversation
david-allison
force-pushed
the
fix-crash-report
branch
from
August 16, 2026 11:21
4a52214 to
55ec680
Compare
5 tasks
* onCreate() returns early if `setupAnkiDroidApp()` fails * ContentProvider performs an early init We don't want these to crash. Trade-off: a missed `setReporter()` call now degrades to warnings instead of failing fast. The rationale was also to allow tests to run without needed a no-op crash report handler. Assisted-by: Claude Fable 5
david-allison
force-pushed
the
fix-crash-report
branch
from
August 16, 2026 11:49
55ec680 to
0216407
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Assisted-by: Claude Fable 5
Purpose / Description
The main rationale was for tests below
:AnkiDroidwhere a reporter setup was required (and no reasonable teardown was available).setupAnkiDroidApp()failsContentProvidersare created beforeApplication.onCreate()Approach
UninitializedCrashReporterresetForTestingHow Has This Been Tested?
Checklist