Locking phone with iOS app open/in background causes WLED to crash when playlist is selected

Looks like you are using older ESP core…

---WLED 0.13.1-bl6 2201241 INIT---
esp32 v3.3.5-1-g85c43024c
heap 290408
Registering usermods ...
Reading config

Updating the ESP32 Platform in PlatformIO and will rebuild. I didn’t realize it would grab an older version, looks like the env:esp32dev in platformio.ini is set to platform = espressif32@2.0

Ok I changed it to espressif32@3.4 and rebuilt your dev branch, will play with it and see what happens

---WLED 0.13.1-bl6 2201231 INIT---
esp32 v3.3.5-1-g85c43024c
heap 292652
Registering usermods ...
Reading config
Reading settings from /wsec.json...
JSON buffer released. (3)
Reading settings from /cfg.json...
Removing all.
Successfully inited strip 0 (len 104) with type 30 and pins 3,255 (itype 20)
Successfully inited strip 1 (len 108) with type 30 and pins 16,255 (itype 20)
Starting usermod config.
JSON buffer released. (1)
Initializing strip
Usermods setup
lastReconnectAttempt == 0
Access point disabled (init).
Connecting to Making Wifi Great Again...
Apply preset JSON buffer requested.
Deserializing state
Playlist unloaded.
JSON buffer released. (9)
Local time: 01:28

Connected! IP address: 192.168.1.10
Init STA interfaces
mDNS started
JSON buffer size: 5662 for request: 0
JSON buffer released. (17)
Not-Found HTTP call:
URI: /presets.json
FileRead: /presets.json
WS JSON send buffer requested.
JSON buffer size: 1783 for WS request.
JSON buffer released. (12)
Sending WS data to a single client.
WS client connected.
JSON buffer size: 5662 for request: 0
JSON buffer released. (17)
Not-Found HTTP call:
URI: /presets.json
FileRead: /presets.json
WS JSON send buffer requested.
JSON buffer size: 1783 for WS request.
JSON buffer released. (12)
Sending WS data to a single client.

Trying to get it act up now. Playlists still arent working and it seems like its unloading according to the debug output, it opens the first preset in the list and stops.

JSON buffer released. (9)
WS JSON send buffer requested.
JSON buffer size: 1783 for WS request.
JSON buffer released. (12)
Sending WS data to multiple clients.
Apply preset JSON buffer requested.
Deserializing state
Playlist unloaded.
JSON buffer released. (9)
WS JSON send buffer requested.
JSON buffer size: 1783 for WS request.
JSON buffer released. (12)
{"0":{},"5":{"playlist":{"ps":[2,4],"dur":[20,20],"transition":[7,7],"repeat":0,"r":false,"end":0},"on":true,"n":"PlayTest"}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ,"2":{"n":"Rainbow","on":true,"bri":57,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":212,"grp":1,"spc":0,"of":0,"on":true,"bri":255,"cct":127,"col":[[255,255,255,0],[0,0,0,0],[0,0,0,0]],"fx":9,"sx":126,"ix":128,"pal":0,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"4":{"n":"Bounce","on":true,"bri":15,"transition":7,"tdd":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":212,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"col":[[255,0,0,0],[0,0,0,0],[0,0,0,0]],"fx":91,"sx":126,"ix":128,"pal":18,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,"1":{"n":"Uplighting","on":true,"bri":15,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":212,"grp":1,"spc":0,"of":0,"on":true,"bri":255,"cct":127,"col":[[255,255,255,0],[0,0,0,0],[0,0,0,0]],"fx":0,"sx":126,"ix":128,"pal":0,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]},"3":{"n":"TetrixWhite","on":true,"bri":15,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":212,"grp":1,"spc":0,"of":0,"on":true,"bri":255,"cct":127,"col":[[255,255,255,0],[0,0,0,0],[0,0,0,0]],"fx":44,"sx":115,"ix":164,"pal":0,"sel":true,"rev":false,"mi":false},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0},{"stop":0}]}}

Update: it’s been up 18 hours so far, I hammered it with changing stuff from the iOS app and HA last night and it didn’t miss a beat. I have also rebooted HA a few times which usually had a good chance of crashing WLED with it and nothing. Other then Playlists unloading immediately this seems to be quite solid.

I tried rebuilding based on the commits you had in 2201241 and have lost my /settings page. I can get to the sub pages individually but cant get the main settings index up. I had to flash back to the “regular” 13.0-b6 binary to get it back but flashing back to 2201231 or 2201241 I just get a blank page

The only thing that shows up in the serial output when I hit /settings is

FileRead: /favicon.ico

I can go to /settings/sec? to get the Security and Update page up as well as the other sub pages and in the serial output I see

settings resp6

I don’t even know how to explain this now :slightly_frowning_face:

May be related to recent merge from master where Aircoookie did some changes on settings page.
Unfortunately It may take a while until I get to my computer.

No worries! I appreciate all your help working through this. It’s odd because it works if I build out of Aircookies master branch on build 2201260 with the latest commits but any time I build out of your dev branch now it disappears. I have been running on 2201260 from Aircookie for 19 hours without any crashes as well now. HomeAssistant is still hammering presets.json every 10 seconds and playlists don’t work but the wife is happy for now since her kitchen lighting is not crashing :stuck_out_tongue:

We have quite a few differences behind the scene as far as UI is concerned.
It has been fixed today (settings).

And yes, found the playlist bug. Thanks.
Will fix it.

1 Like