Found in whole-codebase review.
esp32/src/Config.cpp:
Config::getSavedCameras() (~line 54): if the savedCameras JSON in NVS fails to parse, it calls NSG_LOG_FATAL, which loops forever printing the error. Since this is called from BleWorker::taskLoop at startup, a single corrupted NVS write permanently bricks normal mode until NVS is manually erased — with no recovery path and (on the WROOM board) nothing but serial output.
Config::addToSavedCameras() (~line 106): the nvs.putString("savedCameras", ...) return value is ignored, so a truncated/failed write is never detected.
Proposal:
- On JSON parse error: log the error, erase/reset the
savedCameras key, and continue with an empty list instead of hanging.
- Check the
putString result and log on failure.
Found in whole-codebase review.
esp32/src/Config.cpp:Config::getSavedCameras()(~line 54): if thesavedCamerasJSON in NVS fails to parse, it callsNSG_LOG_FATAL, which loops forever printing the error. Since this is called fromBleWorker::taskLoopat startup, a single corrupted NVS write permanently bricks normal mode until NVS is manually erased — with no recovery path and (on the WROOM board) nothing but serial output.Config::addToSavedCameras()(~line 106): thenvs.putString("savedCameras", ...)return value is ignored, so a truncated/failed write is never detected.Proposal:
savedCameraskey, and continue with an empty list instead of hanging.putStringresult and log on failure.