Fix UI freeze/reboots: LVGL pool to PSRAM, dangling SSID buttons, scan policy
Firmware / build (push) Successful in 4m24s
Firmware / build (push) Successful in 4m24s
- lv_conf: LVGL widget pool 48 KB internal -> 512 KB PSRAM (LV_MEM_POOL_ALLOC). It ran out after a few Settings visits (87% used, 31% frag, 4.5 KB biggest block; lv_mem_buf_get() failed in a label draw - decoded backtrace). Also frees 48 KB of internal RAM: free 16 -> 69 KB, largest block 7.6 -> 31.7 KB - lv_conf: LV_ASSERT_HANDLER abort() instead of while(1), which spun inside the task holding the LVGL lock and froze the UI + console - wifi_manager: SSID buttons clear their g_ssid_buttons[] slot on LV_EVENT_DELETE (SquareLine deletes the Settings screen on leave; stale pointers were lv_obj_del()'d on the next scan). Scan only while the list is on screen and not connected - 10 s background scans caused the display dots - main: `mem` console command (internal heap, PSRAM, LVGL pool) - docs: board page lessons, open-questions #13/#14, ota-updates, CLAUDE.md, log Verified: 10 Settings visits + 9 list rebuilds, pool peak 4%, 0 crashes; user confirms no freeze, no reboot, no dots, swipes better. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -133,3 +133,7 @@ v0.1.3 released (OTA download loop no longer aborts on a momentary TLS connected
|
||||
## [2026-09-27] lint | Session sweep: OTA status, board gotchas, Wi-Fi follow-ups
|
||||
|
||||
Brought the wiki in line with the whole 2026-09-26 session. ota-updates: status table of every cycle (dev->v0.1.1->v0.1.2, forced reinstall with the 570 B abort + clean failure path, v0.1.3 published but not installed), "installs are done by the running firmware" rule, flicker cause marked verified, Wi-Fi lost on reboot, console-without-reset recipe, B repo now public. esp32-s3-touch-lcd-5b: removed the unmeasured "~50 FPS" claim, USB serial is native CDC (not UART0) with the DTR/RTS reset gotcha, new lessons (flash-write flicker, fade stutter, internal RAM, never power the radio off, dual-slot partitions). dual-controller-architecture: ESP-NOW/Wi-Fi radio sharing + the disconnect(true) bug, B updates via A over ESP-NOW. open-questions #14: Wi-Fi UX redesign, remember network, delete v0.1.0 release. Pending user confirmations: dark-screen OTA shows no flicker; version label placement; instant swipes; Tuning taps.
|
||||
|
||||
## [2026-09-27] build | UI freeze + reboots fixed: LVGL pool to PSRAM, dangling SSID buttons, scans (v0.1.4)
|
||||
|
||||
User: swiping main<->Settings 3x froze the UI; random flickering dots on all screens. Board state while frozen: link task alive (UART+ESP-NOW), loop()/console dead -> LVGL lock held forever. Causes found: (1) LV_ASSERT_HANDLER `while(1);` spins inside the task holding the LVGL lock; (2) g_ssid_buttons[] dangled after SquareLine deleted the Settings screen -> lv_obj_del() on freed objects; (3) with (1) replaced by abort(), the next run rebooted after ~5 round trips and the decoded backtrace showed the real limit: lv_mem_buf_get() failing in a label draw - the 48 KB LVGL pool at 87% / 31% frag / 4.5 KB biggest block; (4) Wi-Fi scanned every 10 s on every screen, connected or not. Fixes: abort() handler, LV_EVENT_DELETE clears button slots, scanning only with the list on screen and not connected, LVGL pool 512 KB in PSRAM (frees 48 KB internal: internal free 16 -> 69 KB), `mem` console command. Verified: 10 Settings visits + 9 list rebuilds, pool peak 4%, 0 crashes; user: swipes better, no dots, no freeze, no reboot. Updated esp32-s3-touch-lcd-5b, open-questions #13/#14, ota-updates, CLAUDE.md.
|
||||
|
||||
Reference in New Issue
Block a user