Gold872 / elastic-dashboard

A simple and modern dashboard for FRC
MIT License
73 stars 13 forks source link

Application refuses to launch if shared-preferences.json is corrupted #9

Closed daltzctr closed 10 months ago

daltzctr commented 10 months ago

Located at appdata/com.gold872/

Gold872 commented 10 months ago

How exactly is the shared preferences file getting corrupted? That falls a bit more into an issue with your hard drive

daltzctr commented 10 months ago

It's actually fairly common for json configs to be a point of error in programs. Task managering the program after it hard freezes in the middle of a write can corrupt the json.

If it fails to read, I expect it to recreate the json.

Gold872 commented 10 months ago

Since the shared preferences is handled by a library that is not maintained by me, this is something that you will have to suggest to the maintainers of the SharedPreferences plugin.

https://pub.dev/packages/shared_preferences https://github.com/flutter/packages/tree/main/packages/shared_preferences

daltzctr commented 10 months ago

Possible workaround you could do here https://github.com/flutter/flutter/issues/89211#issuecomment-915096452