Repository navigation
Closed
Labels
Description
What happened?
Crashes when using HTTP API within MQTT . I am raising this on behave of @mcsSolutions as it is also confirmed from our side .Original post on discord
https://discord.com/channels/473448917040758787/779395228624617512/1304888652161220729
( I never used nor will use HTTP API within MQTT but only helping log this )
To Reproduce Bug
Expected Behavior
No crash
Install Method
Self-Compiled
What version of WLED?
0.15.0-b7 (build 2410270)
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
[21:28:53]Connected! IP address: 10.0.6.18
[21:28:53]Init STA interfaces
[21:28:53]mDNS started
[21:28:53]Reconnecting MQTT
[21:28:53]Reconnecting MQTT
[21:28:53]Loop took 38ms.
[21:28:53]Usermods took 0ms.
[21:28:53]Strip took 0ms.
[21:28:53]MQTT ready
[21:28:53]Publish MQTT
[21:28:53]MQTT ready
[21:28:53]Publish MQTT
[21:28:56]MQTT msg: wled/WLED18/api
[21:28:56]PL=1
[21:28:56]JSON buffer locked. (15)
[21:28:56]API req: win&PL=1
[21:28:56]Playlist unloaded.
[21:28:56]Request to apply preset: 1
[21:28:56]Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
[21:28:56]Core 1 register dump:
[21:28:56]PC : 0x401329d6 PS : 0x00060230 A0 : 0x8010b1b8 A1 : 0x3ffdcf00
[21:28:56]A2 : 0x00000000 A3 : 0x3ffe37c8 A4 : 0x3ffc3954 A5 : 0x0000003c
[21:28:56]A6 : 0x00000000 A7 : 0x00000000 A8 : 0x80123518 A9 : 0x3ffdce10
[21:28:56]A10 : 0x000000ad A11 : 0x94cb258c A12 : 0x94cb258c A13 : 0x3ffc3954
[21:28:56]A14 : 0x3ffdce4c A15 : 0x3ffe39bc SAR : 0x00000004 EXCCAUSE: 0x0000001d
[21:28:56]EXCVADDR: 0x0000000c LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000
[21:28:56]
[21:28:56]ELF file SHA256: 0000000000000000
[21:28:56]
[21:28:56]Backtrace: 0x401329d3:0x3ffdcf00 0x4010b1b5:0x3ffdcf40 0x40106646:0x3ffdcfe0 0x401c56c6:0x3ffdd080 0x40112a75:0x3ffdd0a0 0x401c589d:0x3ffdd110 0x40113cfe:0x3ffdd140 0x40112641:0x3ffdd190 0x401126d2:0x3ffdd200 0x40129d15:0x3ffdd220 0x40129d95:0x3ffdd260 0x4012a3c6:0x3ffdd280 0x4008cd1e:0x3ffdd2b0
[21:28:56]
[21:28:56]Rebooting...
[21:28:56]ets Jun 8 2016 00:22:57
[21:28:56]
[21:28:56]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[21:28:56]configsip: 0, SPIWP:0xee
[21:28:56]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[21:28:56]mode:DOUT, clock div:2
[21:28:56]load:0x3fff0030,len:1184
[21:28:56]load:0x40078000,len:12784
[21:28:56]load:0x40080400,len:3032
[21:28:56]entry 0x400805e4
[21:28:57]
[21:28:57]---WLED 0.15.0-b7 2410270 INIT---
[21:28:57]
[21:28:57]esp32 v3.3.6-16-gcc5440f6a2
[21:28:57]arduino-esp32 v1.0.x
[21:28:57]
[21:28:57]CPU: ESP32-D0WDQ5 rev.1, 2 core(s), 240 MHz.
[21:28:57]FLASH: 4 MB, Mode 3 (DOUT), speed 40 MHz.
[21:28:57]heap 308336
[21:28:57]JSON buffer allocated: 32767
[21:28:57]TX power: 78/78
[21:28:57]PIN ALLOC: Pin 1 successfully allocated by 0x89.
[21:28:57]PIN ALLOC: 0x00000000000002.
[21:28:57]Registering usermods ...Anything else?
Code of Conduct
- I agree to follow this project's Code of Conduct

Activity
mcsSolutions commentedon Nov 10, 2024
DEBUG from WLED 0.15.0-b7
Stimuli MQTT message to select preset 2 and then preset 3.
[MQTT LOG]
12:04:46 PM Topic wled/11020c/api Payload PL=2
12:04:50 PM Topic wled/11020c/status Payload offline
12:04:50 PM Topic wled/11020c/status Payload offline
12:04:50 PM Topic wled/11020c/g Payload 128
12:04:50 PM Topic wled/11020c/c Payload #0D39FF
12:04:50 PM Topic wled/11020c/status Payload online
12:04:50 PM Topic wled/11020c/v Payload 1281357255000010160001281280-1010WLED0
12:04:50 PM Topic wled/11020c/g Payload 128
12:04:50 PM Topic wled/11020c/c Payload #0D39FF
12:04:50 PM Topic wled/11020c/status Payload online
12:04:50 PM Topic wled/11020c/v Payload 1281357255000010160001281280-1010WLED0
12:06:59 PM Topic wled/11020c/status Payload offline
12:06:59 PM Topic wled/11020c/status Payload offline
12:06:59 PM Topic wled/11020c/g Payload 128
12:06:59 PM Topic wled/11020c/c Payload #0D39FF
12:06:59 PM Topic wled/11020c/status Payload online
12:06:59 PM Topic wled/11020c/v Payload 1281357255000010160001281280-1010WLED0
12:08:29 PM Topic wled/11020c/status Payload offline
12:08:59 PM Topic wled/11020c/g Payload 128
12:08:59 PM Topic wled/11020c/c Payload #0D39FF
12:08:59 PM Topic wled/11020c/status Payload online
12:08:59 PM Topic wled/11020c/v Payload 1281357255000010160001281280-1010WLED0
12:09:58 PM Topic wled/11020c/api Payload PL=3
12:09:58 PM Topic wled/11020c/g Payload 14
12:09:58 PM Topic wled/11020c/c Payload #0D39FF
12:09:58 PM Topic wled/11020c/status Payload online
12:09:58 PM Topic wled/11020c/v Payload 1413572550000101600911281280-1030WLED0
12:11:29 PM Topic wled/11020c/status Payload offline
[WLED SERIAL]
N9[1D][01]:5[05]"[05]Q[05][01]"=�multiple clients.
JSON buffer released. (12)
---DEBUG INFO---
Runtime: 30000
Unix time: 30,000
Free heap: 181072
TX power: 75/78
Wifi state: 3
ESP-NOW state: 0
State time: 0
NTP last sync: 999000000
Client IP: 192.168.0.204
Loops/sec: 2034
Loop time[ms]: 0/717
UM time[ms]: 0/1
Strip time[ms]:0/26
Segments: 1 -> 68/0B
Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
Modes: 4187=748B
Data: 4187=748B
Map: 2*0=0B
Reconnecting MQTT
MQTT msg: wled/11020c/api
PL=2
JSON buffer locked. (15)
API req: win&PL=2
Playlist unloaded.
Request to apply preset: 2
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x401329d6 PS : 0x00060830 A0 : 0x8010b1b8 A1 : 0x3ffdd360
A2 : 0x00000000 A3 : 0x3ffdfa54 A4 : 0x3ffc3954 A5 : 0x0000003c
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x80123518 A9 : 0x3ffdd270
A10 : 0x000000ae A11 : 0x36943335 A12 : 0x36943335 A13 : 0x3ffc3954
A14 : 0x3ffdd2ac A15 : 0x3ffe1544 SAR : 0x00000004 EXCCAUSE: 0x0000001d
EXCVADDR: 0x0000000c LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000
ELF file SHA256: 0000000000000000
Backtrace: 0x401329d3:0x3ffdd360 0x4010b1b5:0x3ffdd3a0 0x40106646:0x3ffdd440 0x401c56c6:0x3ffdd4e0 0x40112a75:0x3ffdd500 0x401c589d:0x3ffdd570 0x40113cfe:0x3ffdd5a0 0x40112641:0x3ffdd5f0 0x401126d2:0x3ffdd660 0x40129d15:0x3ffdd680 0x40129d95:0x3ffdd6c0 0x4012a3c6:0x3ffdd6e0 0x4008cd1e:0x3ffdd710
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DOUT, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
---WLED 0.15.0-b7 2410270 INIT---
esp32 v3.3.6-16-gcc5440f6a2
arduino-esp32 v1.0.x
CPU: ESP32-D0WDQ6 rev.1, 2 core(s), 240 MHz.
FLASH: 4 MB, Mode 3 (DOUT), speed 40 MHz.
heap 308288
JSON buffer allocated: 32767
TX power: 78/78
PIN ALLOC: Pin 1 successfully allocated by 0x89.
PIN ALLOC: 0x00000000000002.
Registering usermods ...
heap 275276
Reading config
Reading settings from /wsec.json...
JSON buffer locked. (3)
JSON buffer released. (3)
JSON buffer locked. (1)
Reading settings from /cfg.json...
Heap before buses: 272960
Removing all.
Maximum LEDs on a bus: 30
Digital buses: 1
PIN ALLOC: Pin 16 successfully allocated by 0x82.
PIN ALLOC: 0x00000000010002.
Successfully inited strip 0 (len 30) with type 22 and pins 16,255 (itype 23). mA=55/850
LED buffer size: 270B
Heap after buses: 272032
PIN ALLOC: Pin 0 successfully allocated by 0x85.
PIN ALLOC: 0x00000000010003.
Starting usermod config.
JSON buffer released. (1)
heap 271988
Initializing strip
Loading custom palettes
Loading custom ledmaps
Playlist unloaded.
Request to apply preset: 1
heap 271784
Usermods setup
PIN ALLOC: Pin 15 successfully allocated by 0x20.
PIN ALLOC: 0x00000000018003.
PIN ALLOC: Pin 32 successfully allocated by 0x20.
PIN ALLOC: 0x00000100018003.
PIN ALLOC: Pin 14 successfully allocated by 0x20.
PIN ALLOC: 0x0000010001C003.
heap 266620
Defaulf WiFi used.
Ada
initServer
heap 211960
initIR
heap 211960
Initial connect or forced reconnect.
Defaulf WiFi used.
initConnection() called.
Access point disabled (init).
Connecting to Anthem...
JSON buffer locked. (9)
Applying preset: 1
JSON buffer released. (9)
Loop took 52ms.
Usermods took 0ms.
Strip took 26ms.
Loop took 717ms.
Usermods took 0ms.
Strip took 0ms.
Connected! IP address: 192.168.0.204
Init STA interfaces
mDNS started
Reconnecting MQTT
Reconnecting MQTT
Loop took 34ms.
Usermods took 0ms.
Strip took 0ms.
MQTT ready
Publish MQTT
---DEBUG INFO---
Runtime: 30000
Unix time: 30,000
Free heap: 181848
TX power: 76/78
Wifi state: 3
ESP-NOW state: 0
State time: 0
NTP last sync: 999000000
Client IP: 192.168.0.204
Loops/sec: 1862
Loop time[ms]: 0/717
UM time[ms]: 0/1
Strip time[ms]:0/26
Segments: 1 -> 68/0B
Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
Modes: 4187=748B
Data: 4187=748B
Map: 20=0B
Reconnecting MQTT
WS client connected.
JSON buffer locked. (12)
JSON buffer size: 2641 for WS request (1505).
heap 178884
Sending WS data to a single client.
JSON buffer released. (12)
Local time: 00:01
---DEBUG INFO---
Runtime: 60020
Unix time: 60,020
Free heap: 181096
TX power: 76/78
Wifi state: 3
ESP-NOW state: 0
State time: 0
NTP last sync: 999000000
Client IP: 192.168.0.204
Loops/sec: 1757
Loop time[ms]: 0/12
UM time[ms]: 0/1
Strip time[ms]:0/11
Segments: 1 -> 68/0B
Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
Modes: 4187=748B
Data: 4187=748B
Map: 20=0B
Reconnecting MQTT
---DEBUG INFO---
Runtime: 90040
Unix time: 90,040
Free heap: 181096
TX power: 76/78
Wifi state: 3
ESP-NOW state: 0
State time: 0
NTP last sync: 999000000
Client IP: 192.168.0.204
Loops/sec: 1792
Loop time[ms]: 0/3
UM time[ms]: 0/1
Strip time[ms]:0/1
Segments: 1 -> 68/0B
Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
Modes: 4187=748B
Data: 4187=748B
Map: 2*0=0B
MQTT msg: wled/11020c/api
PL=3
JSON buffer locked. (15)
API req: win&PL=3
Playlist unloaded.
Request to apply preset: 3
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x401329d6 PS : 0x00060230 A0 : 0x8010b1b8 A1 : 0x3ffdd360
A2 : 0x00000000 A3 : 0x3ffdff6c A4 : 0x3ffc3954 A5 : 0x0000003c
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x80123518 A9 : 0x3ffdd270
A10 : 0x000000ae A11 : 0xf85bc5dd A12 : 0xf85bc5dd A13 : 0x3ffc3954
A14 : 0x3ffdd2ac A15 : 0x3ffe1474 SAR : 0x00000010 EXCCAUSE: 0x0000001d
EXCVADDR: 0x0000000c LBEG : 0x4000c349 LEND : 0x4000c36b LCOUNT : 0x00000000
ELF file SHA256: 0000000000000000
Backtrace: 0x401329d3:0x3ffdd360 0x4010b1b5:0x3ffdd3a0 0x40106646:0x3ffdd440 0x401c56c6:0x3ffdd4e0 0x40112a75:0x3ffdd500 0x401c589d:0x3ffdd570 0x40113cfe:0x3ffdd5a0 0x40112641:0x3ffdd5f0 0x401126d2:0x3ffdd660 0x40129d15:0x3ffdd680 0x40129d95:0x3ffdd6c0 0x4012a3c6:0x3ffdd6e0 0x4008cd1e:0x3ffdd710
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DOUT, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
---WLED 0.15.0-b7 2410270 INIT---
esp32 v3.3.6-16-gcc5440f6a2
arduino-esp32 v1.0.x
CPU: ESP32-D0WDQ6 rev.1, 2 core(s), 240 MHz.
FLASH: 4 MB, Mode 3 (DOUT), speed 40 MHz.
heap 308292
JSON buffer allocated: 32767
TX power: 78/78
PIN ALLOC: Pin 1 successfully allocated by 0x89.
PIN ALLOC: 0x00000000000002.
Registering usermods ...
heap 275280
Reading config
Reading settings from /wsec.json...
JSON buffer locked. (3)
JSON buffer released. (3)
JSON buffer locked. (1)
Reading settings from /cfg.json...
Heap before buses: 272964
Removing all.
Maximum LEDs on a bus: 30
Digital buses: 1
PIN ALLOC: Pin 16 successfully allocated by 0x82.
PIN ALLOC: 0x00000000010002.
Successfully inited strip 0 (len 30) with type 22 and pins 16,255 (itype 23). mA=55/850
LED buffer size: 270B
Heap after buses: 272036
PIN ALLOC: Pin 0 successfully allocated by 0x85.
PIN ALLOC: 0x00000000010003.
Starting usermod config.
JSON buffer released. (1)
heap 271992
Initializing strip
Loading custom palettes
Loading custom ledmaps
Playlist unloaded.
Request to apply preset: 1
heap 271788
Usermods setup
PIN ALLOC: Pin 15 successfully allocated by 0x20.
PIN ALLOC: 0x00000000018003.
PIN ALLOC: Pin 32 successfully allocated by 0x20.
PIN ALLOC: 0x00000100018003.
PIN ALLOC: Pin 14 successfully allocated by 0x20.
PIN ALLOC: 0x0000010001C003.
heap 266624
Defaulf WiFi used.
Ada
initServer
heap 211964
initIR
heap 211964
Initial connect or forced reconnect.
Defaulf WiFi used.
initConnection() called.
Access point disabled (init).
Connecting to Anthem...
JSON buffer locked. (9)
Applying preset: 1
JSON buffer released. (9)
Loop took 53ms.
Usermods took 0ms.
Strip took 26ms.
Loop took 717ms.
Usermods took 0ms.
Strip took 0ms.
Connected! IP address: 192.168.0.204
Init STA interfaces
mDNS started
Reconnecting MQTT
Reconnecting MQTT
Loop took 35ms.
Usermods took 0ms.
Strip took 0ms.
MQTT ready
Publish MQTT
willmmiles commentedon Nov 10, 2024
A repeatable crash, my favorite kind!
handleSet: Fix incorrect response generation
willmmiles commentedon Nov 11, 2024
Thanks for the report! This was indeed my fault. ;) Fix is in PR #4271.
dosipod commentedon Nov 11, 2024
That was quick , thank you @willmmiles , I tested PL and other HTTP apis and they all worked without any crashes and unit is stable .
@mcsSolutions kindly test the same as you are technically the owner of this issue . Just out of curiosity why you are not using json apis ?
blazoncek commentedon Nov 11, 2024
Confirming crash in AWS.
handleSet: Fix incorrect response generation
Merge pull request #4271 from Aircoookie/4269-crashes-when-using-http…
handleSet: Fix incorrect response generation
handleSet: Fix incorrect response generation
handleSet: Fix incorrect response generation
handleSet: Fix incorrect response generation
handleSet: Fix incorrect response generation
Merge pull request wled#4271 from Aircoookie/4269-crashes-when-using-…