This repository was archived by the owner on Oct 22, 2021. It is now read-only.
Option for selecting "Partition scheme" missing - can create confusion or even bugs #194
Labels
conclusion: duplicate
This issue or pull request already exists
type: imperfection
Something isn't working
Describe the bug
A working project for ESP32, when compiled by this arduino-pro-ide alpha 4, introduces a serious/scary bug in SPIFFS. It reads content of different file than it opened succesfully.
To Reproduce
Steps to reproduce the behavior:
File f = SPIFFS.open("/A", "r"); if (f) { char x[10]; int b = f.readBytes(x, 10); x[b] = 0; Serial.println(x); }
Expected behavior
Shows content of the file "A". Unfortunately, it shows content of file "B" instead.
BTW, it seems to use the real length of file "A" even though it reads bytes of file "B".
Please note this will not be this easy to reproduce. The "A" and "B" are just made up - in fact my files are named "wifi.cfg" and "names.json". It apparently is not related to file names. It might be dependent on the order of files created on the SPIFFS, or something else.
When this very project is compiled using Arduino 1.8.10 + arduino-esp32 v1.0.4, it works correctly, i.e. reads the right bytes of the right file.
The text was updated successfully, but these errors were encountered: