Skip to content
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

Lot of config.json file corruption >> 0 byte (when flashing new program) #41

Open
GregAscolab opened this issue May 23, 2024 · 1 comment

Comments

@GregAscolab
Copy link
Contributor

GregAscolab commented May 23, 2024

I notice a corruption of the config.json file very often when I flash a new firmware during my software development...
Its about every 2 or 3 times...

I loose the content of the config.json file : File is "empty" : 0 bytes
So impossible to load options, and the file is not automatically recreated...

I don't know why... I take care to always close() the file or use it as readonly...

  1. I just asking myself if I'm the only one ???
  2. It seems to me it could come from recent update...

If someone has similiar experience, feel free to answer ;-)

@GregAscolab
Copy link
Contributor Author

Hi all,

I still have this trouble very often.
I notice that it suffisant for me to reset my device couple of times (2 or 3 times) and then the config.json file is corrupted.

0:00:00:00.0154 D system  FS partition: 36864/1179648 = 3%
0:00:00:00.0154 W system  Listing directory: /
0:00:00:00.0159 W system  Listing directory: /config
0:00:00:00.0176 W system  |__ FILE: config.json (0 bytes)

I try to debug access to this file without success for the moment.
I use LittleFS filesystem, I don't know if it can be linked...
I'm very surprise because I only open/read the options at startup, then I don't update or write to the file after.
I'm asking myself also if my other part of code could write to the partition (bug pointer...) but this seems strange to me...

If anybody had already get this trouble here or in other project, I will be gratefull to get some clues or ideas.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant