Hi All,
I have a device using the esp32 wroom-32d and running esp-idf sdk v3.3.1.
When the device reboots occasionally I see the following failed assert:
assertion "dataSize == readSize" failed: file "C:/device/user/repository/esp
-idf/components/nvs_flash/src/nvs_storage.cpp", line 419, function: esp_err_t nvs::Storage::readMultiPageBlob(uint8_t, const char*, void*, size_t) abort() was called at PC 0x400d5ba3 on core 0
When this assert error occurs, the device will reset and print this error again and will continue to repeat this cycle. The only way to recover the device is to reflash it.
Just a note, this device has run an earlier version of the esp-idf sdk where this error was not seen. In the earlier version, nvs_storage.cpp line 419 where the assertion occurs did not exist. Since updating to esp-idf sdk v3.3.1 this error is seen on the device occasionally.
I would appreciate any insights into the cause of this error.Thanks.
nvs_storage.cpp: assertion "dataSize == readSize" failed
Re: nvs_storage.cpp: assertion "dataSize == readSize" failed
This error comes on the specific code or on all code. Please share the code which is running on Esp. at the time it is throwing the error.
Re: nvs_storage.cpp: assertion "dataSize == readSize" failed
Hi,
I wanted to update this post on the reason for the issue described in my original post.
My device previously ran espressif IDF v3.0.x and was being updated to v3.3.x.
It was discovered the NVS partition format changed between 3.1.x and v3.2.x. This means when I upgraded from v3.0.3 to v3.3.1 the NVS partition format changed. Upgrading doesn't cause any problems.
But when downgrading from v3.3.1 to v3.0.x this can cause corruption in the data structure. If I upgrade again to 3.3.x the corrupted data structure can cause the assert error.
To avoid data corruption, do not downgrade your espressif IDF from the newer NVS partition format to the older format.
I wanted to update this post on the reason for the issue described in my original post.
My device previously ran espressif IDF v3.0.x and was being updated to v3.3.x.
It was discovered the NVS partition format changed between 3.1.x and v3.2.x. This means when I upgraded from v3.0.3 to v3.3.1 the NVS partition format changed. Upgrading doesn't cause any problems.
But when downgrading from v3.3.1 to v3.0.x this can cause corruption in the data structure. If I upgrade again to 3.3.x the corrupted data structure can cause the assert error.
To avoid data corruption, do not downgrade your espressif IDF from the newer NVS partition format to the older format.
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot] and 56 guests