fix: NoSuchFileException in card template fragment#20801
Open
criticalAY wants to merge 1 commit intoankidroid:mainfrom
Open
fix: NoSuchFileException in card template fragment#20801criticalAY wants to merge 1 commit intoankidroid:mainfrom
criticalAY wants to merge 1 commit intoankidroid:mainfrom
Conversation
cf0843c to
7c2ee26
Compare
Member
|
I haven't explicitly fixed these as I suspected there was more going on here. It seems unusual that so many issues are coming from the OS clearing the cache, and I was concerned there was another bug at play. If we are going to fix this:
|
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 Opus 4.6 - Reproduction of the issue
Turn on Don't keep activitiy -> open template editor -> press home -> clear AnkiDroid cache -> open AnkiDroid -> crash -> report
(I tried in Tablet)
Purpose / Description
The previewer was crashing after process death. Android restores the activity, the ViewModel tries to rebuild by reading a temp file we'd stashed earlier, and the file is gone so the constructor throws and the app dies. so bug: SavedStateHandle promised durability, the file didn't deliver it.
Fixes
Approach
How Has This Been Tested?
Emulator API 31 tablet
Learning (optional, can help others)
I am open to any other suggestion but this is what i can think of even note editor is finished when we do that same or dont keep activity is turned on
Checklist
Please, go through these checks before submitting the PR.