esp32 esp-idf v4.4.4 mongoose.ws 7.10 crashes during websocket update #2232
-
Hi folks, As I see it, the error only happens when another websocket client connects. Guru Meditation Error: Core 1 panic'ed (LoadStoreError). Exception was unhandled. Core 1 register dump: Backtrace: 0x4000c3f2:0x3ffd7fd0 0x400e5ef9:0x3ffd7ff0 0x400e5f52:0x3ffd8030 0x400e5f9a:0x3ffd8060 0x400db55b:0x3ffd80b0 0x40090f6a:0x3ffd8130 0x400e5f52: mg_ws_vprintf at /home/user/Dokumente/esp32_projekte/websocket_mqtt/main/mongoose.c:6056 0x400e5f9a: mg_ws_printf at /home/user/Dokumente/esp32_projekte/websocket_mqtt/main/mongoose.c:6064 0x400db55b: WebSocketTask at /home/user/Dokumente/esp32_projekte/websocket_mqtt/main/WebSocketTask.c:98 0x40090f6a: vPortTaskWrapper at /home/user/Dokumente/esp-idf/components/freertos/port/xtensa/port.c:142 WebSocketTask,c:
L98 size_t send = mg_ws_printf(c, WEBSOCKET_OP_TEXT, "%s", out); |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I can't guess what you are doing, nevertheless the word 'Task' above sends shivers down my spine. From the docs
If you absolutely need multi-threading, take the time to go through the user guide (linked above) and tutorials, there is one that shows you how to do multi-threading. If my guessing was wrong, please open an issue, fill the issue template, and provide the minimum piece of code to reproduce your issue. |
Beta Was this translation helpful? Give feedback.
-
@steff2000 Note: mongoose's *printf functions can print JSON. You don't need cJSON or any other JSON library. |
Beta Was this translation helpful? Give feedback.
I can't guess what you are doing, nevertheless the word 'Task' above sends shivers down my spine.
From the docs
If you absolutely need multi-threading, take the time to go through the user guide (linked above) and tutorials, there is one that shows you how to do multi-threading.
If my guessing was wrong, please open an issue, fill the issue template, and provide the minimum piece of code to reproduce your issue.