-
Notifications
You must be signed in to change notification settings - Fork 837
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
Fix crash on scan state restore. #1131
base: master
Are you sure you want to change the base?
Conversation
if (file.length() > SANITY_FILE_SIZE_LIMIT) { | ||
// make sure file size is reasonable. If over 100k, do not restore | ||
// See issue #1129 | ||
LogManager.e(TAG, "Refusing to restore file of size "+file.length()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we maybe delete STATUS_PRESERVATION_FILE_NAME
if it is too big or corrupted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the code does something similar as is because as soon as the file is persisted (typically after app processing a few milliseconds later) the scan state is persisted with the newly emptier state, overwriting the problematic file.
So I did some tests with multiple files and it correctly marks them as corrupted or skips them for excessive size. It seems it's working fine. |
This is being published as 2.19.6-beta3. It will be in a non-beta release after I verify it fixes crashes in production in an app published to Google Play. |
@davidgyoung any update on this PR? I guess the verifying should have taken place now? Can you please also have a look, why See here: #1189 |
@davidgyoung do you have an update? We're still seeing the issue in our stack. |
This is a work in progress on fixing problems in #1129.
Changes compile and unit tests still pass, but end-to-end testing has not started.