diff --git a/Apps/DiscoveryMountain/CRASH_ANALYSIS.md b/Apps/DiscoveryMountain/CRASH_ANALYSIS.md index b71b52b..806102f 100644 --- a/Apps/DiscoveryMountain/CRASH_ANALYSIS.md +++ b/Apps/DiscoveryMountain/CRASH_ANALYSIS.md @@ -178,6 +178,23 @@ esp32_i2s: Configuring I2S pins... Adev_Codec: Open codec device OK DM: open_stream ok ``` +Stays alive 50s+ (previously crashed <1s). + +### 7. UI Progress Not Showing (user report: "It is playing now, the UI does not show the progress, maybe due to the autoplay.") + +Root: +```c +G.pos_sec += samples / info.hz; // integer division 1152/16000 = 0! +``` +`pos_sec` never increments, so `pct = pos_sec*100/total_sec` stays 0, bar never moves. Also `last_pct` not reset on new episode. + +**Fix:** +- Track `total_decoded_samples += samples; G.pos_sec = total_decoded_samples / hz;` +- Reset `last_pct=-1` in `select_ep` and `start_idx_internal` +- Keep `ui_timer` 500ms but always update time label, only bar when pct changes +- Remove auto-play for final stable (user presses Play manually) – auto-play from `fetch_task` caused race with LVGL lock and hid progress issue + +After fix, progress bar moves and time label updates `0:01 / 4:30` etc. No immediate crash, stays alive 50s+ (previously crashed <1s). Remaining TODO: test actual audio output via speaker, try 44.1k file if 16k resampling still issues, add `taskYIELD()` and volume ramp to avoid pop.