How long is compacting supposed to take?

Posted on
  • Everything's in the title...how long may compacting storage on the Bangle take as a maximum?

    I have it running for close to 30 minutes now and it does not seem to finish.

    The thing is, a while back when I starting coding on it, I had some memory leak that apparently wiped all my apps, I had to re-install everything, and since then the "About" app only shows me about half of the 4096K of flash free, with only a couple of apps installed.

    What options are there to reset everything to a clean state? I've already tried powering off and on again, resetting it, and resetting it without loading any code.

  • That's odd - have you got the most recent watch firmware? (2v08)

    Compaction could take around 30 seconds (it's basically re-writing all of flash) but shouldn't take anywhere near 30 minutes. The best option is just to go to the App Loader, About, then Install Default Apps - it'll wipe storage and return everything to standard.

    You could also log in with the IDE and type require("Storage").eraseAll().

    While the new firmwares should be fine, it's possible that if you've never erased storage, and older firmware could have corrupted it, and then that causes problems for the new firmware?

  • The best option is just to go to the App Loader, About, then Install Default Apps - it'll wipe storage and return everything to standard.

    It seems that did the trick - at least now I see the full available space again.

    I never updated the firmware, it came shipped with 2v08 already. When I wiped my memory (still don't know how I ended up doing that...), I did not erase everything, I just re-installed the different apps manually. There must've been something left on the storage that caused the problem...I think there was a mysterious file named "q0" on the storage that I was not sure if it was supposed to be there or not, so I left it untouched, and it is now gone.

    Thanks!

  • Great, glad it's sorted! Ok, that'd odd then - looks like there may still be an issue with Storage.

    I did notice this could happen a few days ago https://github.com/espruino/Espruino/issues/1970 so I guess that could have caused it.

    If you manage to get it to happen again can you let me know? Especially if you figure out what caused it!

  • Sure, but I can't guarantee it will happen again. It was a coding mistake on my part which lead to that, and when I managed to stop the code, half of the files in storage were gone. I could still delete the remaining ones via Bluetooth though. I don't remember exactly what I did anymore, but I'm pretty sure I did not write anything to storage, that's why I found it odd. So there is not necessarily a bug in espruino.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How long is compacting supposed to take?

Posted by Avatar for Sebastian @Sebastian

Actions