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
Run fs.readFileSync before fs.statSync will cause ESP32 exception. #1163
Comments
How hard is it to build the Flash filesystem code for Linux now? It could be a good way to try and track this down? |
I think the issue is here.... https://github.com/espruino/Espruino/blob/master/libs/filesystem/jswrap_file.c#L423 http://elm-chan.org/fsw/ff/doc/sync.html f_sync keeps the file open, so it can be appended too, and I think we want a proper close.
The issue is the code is littered with #ifdef Linux etc, so perhaps a switch to use the fats. It would be cleaner to remove the direct file code, but then the Linux build would not be able to work with real files. |
Should there be a close_dir for the fatfs here too? https://github.com/espruino/Espruino/blob/master/libs/filesystem/jswrap_fs.c#L139 |
I think The lack of And yeah, we definitely want the original file access stuff in there - Espruino does seem to be used on OpenWRT/Linux. |
documenting here so can used in the future: cut and paste from the IDE:
The elf file needs to match the binary - so this would need to be from a build. in this case is crashing here:
full output as a sample:
|
https://www.esp32.com/viewtopic.php?t=263 How to trace crash point |
copy content between:
Crash is here terminating the string! |
Looks like I bet a |
@gfwilliams |
Reported here...
http://forum.espruino.com/conversations/304604/#comment13624116
Will need to get core dump and elf file and find actual crash point.
Wondering if the write is closed properly?
The text was updated successfully, but these errors were encountered: