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
Storage Compact can break storage #2009
Comments
Same happens on ESP32 from time to time |
Interesting - thanks! If anyone can come up with a way to reproduce it reliably (eg specific calls to As far as I can tell this only really happens if you have a 'corrupt' filename shown in the IDE's storage list or
|
…y relocated during compact (#2009)
You could reproduce one issue with:
In that case, the function 'hello' ended up pointing to the wrong place after the compact - the commit above fixes that. However, I'm not sure this entirely fixes the problem. You'd hope that this code would flex the compaction algorithm pretty well, and it works totally fine, repeatedly:
And the only time I have hit issues is once when I have done a compact after I have seen a broken-looking filename in However I am unable to reproduce the broken filename or the compaction issues. So I'll leave this open for a while in case someone can come up with sample code that can corrupt storage in some way, but if not I think it's safe to close. |
On Bangle.js if you write a bunch of stuff to storage and then compact, it can actually corrupt storage.
However, it doesn't happen all the time...
The text was updated successfully, but these errors were encountered: