RavenLRS / raven

Raven Long Range System
GNU General Public License v3.0
165 stars 45 forks source link

Crash when changing Yes/No settings on RX #11

Closed Smeat closed 5 years ago

Smeat commented 6 years ago

When I try to disable "Auto Craft Name" using the "crossfire.lua" script my receiver crashes with the following log:

I (46576) STORAGE_HAL: Setting rx.auto_craft_name with size 1 to
I (46583) STORAGE_HAL: 00 
ESP_ERROR_CHECK failed: esp_err_t 0x1109 at 0x4016923a
0x4016923a: storage_hal_set_blob at /home/kevin/Dokumente/Projekte/Github/raven/components/hal-esp32/./storage.c:35 (discriminator 1)

file: "/home/kevin/Dokumente/Projekte/Github/raven/components/hal-esp32/./storage.c" line 35
func: storage_hal_set_blob
expression: nvs_set_blob(storage_hal->nvs_handle, key, buf, size)

Backtrace: 0x4008cdac:0x3ffe1040 0x4008d119:0x3ffe1060 0x4016923a:0x3ffe1080 0x4010ee41:0x3ffe10b0 0x4010bdf9:0x3ffe10e0 0x4010be5a:0x3ffe1100 0x4010c496:0x3ffe1120 0x4010ca9d:0x3ffe1140 0x40111161:0x3ffe12d0 0x4010e905:0x3ffe1330 0x40168ec5:0x3ffe1370 0x400e99e1:0x3ffe1390 0x400ec552:0x3ffe13b0
0x4008cdac: invoke_abort at /home/kevin/Dokumente/Projekte/esp32/esp-idf/components/esp32/./panic.c:572

0x4008d119: _esp_error_check_failed at /home/kevin/Dokumente/Projekte/esp32/esp-idf/components/esp32/./panic.c:584

0x4016923a: storage_hal_set_blob at /home/kevin/Dokumente/Projekte/Github/raven/components/hal-esp32/./storage.c:35 (discriminator 1)

0x4010ee41: storage_set_u8 at /home/kevin/Dokumente/Projekte/Github/raven/main/platform/storage.c:103

0x4010bdf9: setting_save at /home/kevin/Dokumente/Projekte/Github/raven/main/config/settings.c:1027

0x4010be5a: setting_changed at /home/kevin/Dokumente/Projekte/Github/raven/main/config/settings.c:1027

0x4010c496: setting_set_u8 at /home/kevin/Dokumente/Projekte/Github/raven/main/config/settings.c:1027

0x4010ca9d: settings_rmp_handler at /home/kevin/Dokumente/Projekte/Github/raven/main/config/settings_rmp.c:389

0x40111161: rmp_process_message at /home/kevin/Dokumente/Projekte/Github/raven/main/rmp/rmp.c:507

0x4010e905: p2p_hal_callback at /home/kevin/Dokumente/Projekte/Github/raven/main/p2p/p2p.c:110

0x40168ec5: promiscuous_rx_packet_handler at /home/kevin/Dokumente/Projekte/Github/raven/components/hal-esp32/./p2p.c:121 (discriminator 1)

0x400e99e1: ppProcessRxPktHdr at ??:?

0x400ec552: ppTask at ??:?

Same for "FPort/SBUS/S.Port Inverted"

I (286845) STORAGE_HAL: Setting rx.fport_inverted with size 1 to
I (286852) Output.FPort: Open
I (286856) STORAGE_HAL: 01 
ESP_ERROR_CHECK failed: esp_err_t 0x1109 at 0x4016923a
0x4016923a: storage_hal_set_blob at /home/kevin/Dokumente/Projekte/Github/raven/components/hal-esp32/./storage.c:35 (discriminator 1)

file: "/home/kevin/Dokumente/Projekte/Github/raven/components/hal-esp32/./storage.c" line 35
func: storage_hal_set_blob
expression: nvs_set_blob(storage_hal->nvs_handle, key, buf, size)

Backtrace: 0x4008cdac:0x3ffdf9c0 0x4008d119:0x3ffdf9e0 0x4016923a:0x3ffdfa00 0x4010ee41:0x3ffdfa30 0x4010bdf9:0x3ffdfa60 0x4010be5a:0x3ffdfa80 0x4010c496:0x3ffdfaa0 0x4010ca9d:0x3ffdfac0 0x40111161:0x3ffdfc50 0x4010e905:0x3ffdfcb0 0x40168ec5:0x3ffdfcf0 0x400e99e1:0x3ffdfd10 0x400ec552:0x3ffdfd30
0x4008cdac: invoke_abort at /home/kevin/Dokumente/Projekte/esp32/esp-idf/components/esp32/./panic.c:572

0x4008d119: _esp_error_check_failed at /home/kevin/Dokumente/Projekte/esp32/esp-idf/components/esp32/./panic.c:584

0x4016923a: storage_hal_set_blob at /home/kevin/Dokumente/Projekte/Github/raven/components/hal-esp32/./storage.c:35 (discriminator 1)

0x4010ee41: storage_set_u8 at /home/kevin/Dokumente/Projekte/Github/raven/main/platform/storage.c:103

0x4010bdf9: setting_save at /home/kevin/Dokumente/Projekte/Github/raven/main/config/settings.c:1027

0x4010be5a: setting_changed at /home/kevin/Dokumente/Projekte/Github/raven/main/config/settings.c:1027

0x4010c496: setting_set_u8 at /home/kevin/Dokumente/Projekte/Github/raven/main/config/settings.c:1027

0x4010ca9d: settings_rmp_handler at /home/kevin/Dokumente/Projekte/Github/raven/main/config/settings_rmp.c:389

0x40111161: rmp_process_message at /home/kevin/Dokumente/Projekte/Github/raven/main/rmp/rmp.c:507

0x4010e905: p2p_hal_callback at /home/kevin/Dokumente/Projekte/Github/raven/main/p2p/p2p.c:110

0x40168ec5: promiscuous_rx_packet_handler at /home/kevin/Dokumente/Projekte/Github/raven/components/hal-esp32/./p2p.c:121 (discriminator 1)

0x400e99e1: ppProcessRxPktHdr at ??:?

0x400ec552: ppTask at ??:?

I've added this log output right before the error

ESP_LOGI("STORAGE_HAL", "Setting %s with size %d to", key, size);
ESP_LOG_BUFFER_HEX_LEVEL("STORAGE_HAL", buf, size, ESP_LOG_INFO);

I am using the TTGO V1 module without a display and flashed both with

make TARGET=esp32_lora_ttgo_v1_868_915_tx PORT=/dev/ttyUSB0 erase flash monitor
make TARGET=esp32_lora_ttgo_v1_868_915_rx PORT=/dev/ttyUSB1 erase flash monitor

I already swapped the modules with each other and writing other settings is working fine.