WLED: SyntaxError and sometimes a reset when changing presets in 2D.

What happened?

I made an illuminated sign for the back under my jersey for my favorite club.

1

There are 540 LEDs arranged irregularly on the sign. I configured WLED so that I use this in a 2D Matrix. When I choose a presets I often got a syntax error or a reset of the ESP32, even with the simplest configuration.

https://github.com/Aircoookie/WLED/assets/43117741/fbf7413b-02f8-4a3f-a8ca-c2a9140e20a4

To Reproduce Bug

Use the attached cfg and preset file.

preset_cfg.zip

Select the “Start” preset several times.

Expected Behavior

I expected that there would be no reset or error when changing the preset.

Install Method

Self-Compiled

What version of WLED?

WLED v0.14.0-b5 “Hoshi” (Build 2309100)

Which microcontroller/board are you seeing the problem on?

ESP32, ESP32-S3

Relevant log/trace output

---- Opened the serial port COM4 ----
WS FileRead: /index.htm
Not-Found HTTP call:
URI: /skin.css
WS FileRead: /skin.css
JSON buffer locked. (17)
JSON buffer size: 7890 for request: 6
JSON content length: 5285
JSON buffer released. (17)
JSON buffer locked. (17)
JSON buffer size: 4801 for request: 8
JSON content length: 2184
JSON buffer released. (17)
JSON buffer locked. (17)
JSON buffer size: 11798 for request: 3
JSON content length: 6665
JSON buffer released. (17)
Not-Found HTTP call:
URI: /presets.json
WS FileRead: /presets.json
WS client connected.
JSON buffer locked. (12)
JSON buffer size: 10967 for WS request (6665).
heap 181664
Sending WS data to a single client.
JSON buffer released. (12)
JSON buffer locked. (14)
JSON buffer released. (14)
JSON buffer locked. (17)
JSON buffer size: 11799 for request: 3
JSON content length: 6673
JSON buffer released. (17)
JSON buffer locked. (12)
JSON buffer size: 10968 for WS request (6673).
heap 154840
Sending WS data to multiple clients.
JSON buffer released. (12)
Loop took 45ms.
Usermods took 0ms.
Strip took 7ms.
Local time: 13:19
Local time: 13:20
JSON buffer locked. (14)
JSON buffer released. (14)
JSON buffer locked. (17)
JSON buffer size: 11799 for request: 3
JSON content length: 6673
JSON buffer released. (17)
JSON buffer locked. (12)
JSON buffer size: 10968 for WS request (6673).
heap 173916
Sending WS data to multiple clients.
JSON buffer released. (12)
Loop took 68ms.
Usermods took 0ms.
Strip took 8ms.
---DEBUG INFO---
Runtime: 30000
Unix time: 1695475204,000
Free heap: 176456
Wifi state: 3
State time: 0
NTP last sync: 999000000
Client IP: XXX.XXX.XXX.XXX
Loops/sec: 1727
Loop time[ms]: 0/721
UM time[ms]: 0/9
Strip time[ms]: 0/160
Segments: 16 -> 1088B
Modes: 4*187=748B
Data: 4*187=748B
Map: 2*1024=2048B
Buffer: 3*1024=3072B
---- Closed the serial port COM4 ----

Anything else?

No response

Code of Conduct

  • I agree to follow this project’s Code of Conduct

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 47

Commits related to this issue

Most upvoted comments

For me it’s okay if the error can’t be completely fixed. Since I don’t use more than 13 segments, I’ve found ways to avoid the error.

There are much more importent things to do. Let’s go …

I’m running out of ideas. Seems that we should check through the ~75 open PRs for asyncWebServer, maybe someone already invented a fix that makes the library more thread-safe… and if we find something, let’s ask @Aircoookie to update his branch for WLED.

It means we will keep this bug open in 0.14.0, as the test results are still “inconclusive” and the risk to accidentally break some other functions is just too high.