Skip to content

SyntaxError and sometimes a reset when changing presets in 2D. #3382

Closed as not planned

Description

@MOVE1904

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.

0923.1.mp4

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

Activity

  1. added
    needs investigation
    on Sep 23, 2023
  2. MOVE1904 commented on Sep 23, 2023

    @MOVE1904
    Author

    preset_cfg_2.zip

    ledmap1.zip

    Here is a bigger configuration with more frequent errors. Switch between preset 23 (PixelsFire) and preset 14 (Start).

  3. blazoncek commented on Sep 23, 2023

    @blazoncek
    Contributor

    For JSON errors you need browser's developer tools and see console log.

  4. blazoncek commented on Sep 23, 2023

    @blazoncek
    Contributor

    Also preset file in the movie does not correspond to attached presets.

  5. MOVE1904 commented on Sep 23, 2023

    @MOVE1904
    Author

    Also preset file in the movie does not correspond to attached presets.

    Did You use the preset file from my first post?

    preset_cfg.zip

  6. MOVE1904 commented on Sep 23, 2023

    @MOVE1904
    Author

    For JSON errors you need browser's developer tools and see console log.

    like this?

    image
  7. blazoncek commented on Sep 23, 2023

    @blazoncek
    Contributor

    Now check each GET JSON response to see content. One will have error.
    Screenshot 2023-09-23 at 21 10 31

  8. MOVE1904 commented on Sep 23, 2023

    @MOVE1904
    Author

    No JSON. Only 1 CSS maybe?

    image

    image
  9. MOVE1904 commented on Sep 23, 2023

    @MOVE1904
    Author

    O.K. I got it. CSS is enable custom CSS in User Settings. So I diabled it.

    So where can I find the GET JSON with an error?

  10. blazoncek commented on Sep 24, 2023

    @blazoncek
    Contributor

    Any file with JSON type. I.e. effects, fxdata, etc.

  11. MOVE1904 commented on Sep 24, 2023

    @MOVE1904
    Author

    This looks strange

    image
  12. blazoncek commented on Sep 24, 2023

    @blazoncek
    Contributor

    Yes. That's corrupt JSON.
    Why that happens is still a mystery.

  13. blazoncek commented on Sep 24, 2023

    @blazoncek
    Contributor

    If you are not using ESP8266 then check if you flashed your ESP with non-standard flash or CPU speed (lowering the values to standard specs).

    If you are using ESP8266 I've seen such behaviour after we upgraded core to 3.1.2 but is transient in nature. Some responses may be corrupted. I am guessing some out-of-order new/free behaviour of AsyncWebServer or its components.

  14. MOVE1904 commented on Sep 24, 2023

    @MOVE1904
    Author

    I'm flashing the ESP32 with the standard option of VS Code. Upload port is set to "auto".
    I try it with 6 different ESP32-WROOM-32 an 2 different ESP32-S3-WROOM-1.
    Always the same errors. Most of them with position 5533.

    Here ESP32-S3
    image

    And here ESP32-WROOM-32
    image

  15. 41 remaining items

  16. MOVE1904 commented on Dec 31, 2023

    @MOVE1904
    Author

    Here is a simpler configuration of my Christmas lights:

    WLED_cfg_preset.zip

    Screenshot 2023-12-31 132002
  17. blazoncek commented on Dec 31, 2023

    @blazoncek
    Contributor

    One more thing.
    Reviewing configuration (again), I am baffled with total LED count of 1024 while the sum of all lengths yields only 540. How is that so?
    And if you are using matrix (as evident from config) and custom ledmap (ledmap1.json) where is your default ledmap?
    Do you switch ledmaps often?

  18. blazoncek commented on Dec 31, 2023

    @blazoncek
    Contributor

    And what is the last response from WLED (network tab, click on the last message).

  19. MOVE1904 commented on Dec 31, 2023

    @MOVE1904
    Author

    One more thing. Reviewing configuration (again), I am baffled with total LED count of 1024 while the sum of all lengths yields only 540. How is that so? And if you are using matrix (as evident from config) and custom ledmap (ledmap1.json) where is your default ledmap? Do you switch ledmaps often?

    In order to not use so many segments and still be able to display a graphic, I created an LED-MAP. Since I only use 2 colors, I first have all white and then all blue LEDs in the LED-MAP.

    And what is the last response from WLED (network tab, click on the last message).

    Sorry, I'm not that good with Chrome. I hope that's correct. It is with the simpler configuration.

    Screenshot 2023-12-31 133516
  20. MOVE1904 commented on Dec 31, 2023

    @MOVE1904
    Author

    In general, I have to say that I see these errors more and more often in my projects. It doesn't matter whether I use an ESP32 or D1Mini and whether I use LED MAPs or not.
    It doesn't matter whether I use a ready to use image or whether I compiled it myself.
    These errors even appear in the Android app.

  21. added
    needs investigation
    and removed
    waiting for feedback
    on Dec 31, 2023
  22. blazoncek commented on Dec 31, 2023

    @blazoncek
    Contributor

    In order to not use so many segments and still be able to display a graphic, I created an LED-MAP. Since I only use 2 colors, I first have all white and then all blue LEDs in the LED-MAP.

    That does not explain total having 1024. There is no way you could achieve that using UI and the configuration you posted.

    I give up. You'll need to debug your issue on your own and if you indeed find a bug please report back.

  23. MOVE1904 commented on Dec 31, 2023

    @MOVE1904
    Author

    I give up, too.
    Maybe it's another type of the Fritz!Box error.
    I just think it's a shame that you only pay attention to the strange arrangement of my LED lighting, but don't address the fact that the error now appears even in the simplest configurations.
    I only implemented the idea with the LED-Map to reduce the crashes. At least the paylists are stable with this solution.

  24. added a commit that references this issue on Apr 9, 2024
  25. blazoncek commented on Dec 29, 2025

    @blazoncek
    Contributor

    Anyone stumbling on this: Presets on ESP32 get corrupted (99.999%) on save by incompatible flash mode used when flashing ESP for the first time.
    To resolve the issue you will need to flash new bootloader using DIO or DOUT mode.

  26. added 2 commits that reference this issue on Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugconfirmedneeds investigationnot_planned

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions