Release Kaleido Desktop 0.1.0-beta.11
All checks were successful
Validate Kaleido Desktop / validate (push) Successful in 1m22s

Fix a UI-thread deadlock between the player and window resizes: player_rect
held the video-surface lock while Tauri's hwnd() waited for the UI thread,
and on_resize, running on the UI thread, waited for that lock. Leaving full
screen for the miniplayer could freeze the window while mpv kept playing.
Resize handling now runs off the UI thread, and the Windows surface keeps its
HWND instead of asking the UI thread for it.

Add local diagnostics: a watchdog writes a dump of every thread when the UI
thread stops answering for 5 s, unhandled exceptions write a crash dump and
log the faulting module (Windows), and panics are logged. Windows release
builds keep function names in kaleido.pdb, archived per version in
.tools/symbols/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-11-04 17:04:07 -07:00
parent 0eb8518927
commit 4985f1dde0
15 changed files with 362 additions and 10 deletions

View file

@ -47,6 +47,32 @@ Playback tests change real Plex progress; resume an in-progress title near its s
position, or restore it afterwards. Selecting audio or subtitle tracks is saved to Plex
for that file.
## Diagnostics
`src-tauri/src/diagnostics.rs` writes to the app's log folder
(`%LOCALAPPDATA%\tv.kaleido.desktop\logs` on Windows); nothing is uploaded.
- **Hangs**: a watchdog asks the UI thread to answer every second. After 5 seconds of
silence it writes `kaleido-hang-<time>-v<version>.dmp` with every thread's stack (once
per stall) and notes the stall and the recovery in `diagnostics.log`.
- **Crashes** (Windows): an unhandled exception writes `kaleido-crash-…dmp` and logs the
exception and faulting module, e.g. `access violation at libmpv-2.dll+0x1234`.
- **Panics** are logged with a backtrace.
The newest five dumps of each kind are kept. To read one, open it in WinDbg with the
symbols of the exact build that wrote it: `scripts/build.ps1` keeps each release's
`kaleido.exe` and `kaleido.pdb` in `.tools/symbols/<version>/` (release builds keep
function names and line tables in the `.pdb`; the installer doesn't change). In WinDbg:
`.sympath+ <that folder>`, `.reload`, then `~*k` for every thread's stack.
Development builds have two test commands: `debug_freeze_ui` (`{ seconds }`, holds the
UI thread) and `debug_crash` (an access violation); both refuse to run in release builds.
Threading rule learned the hard way: Tauri's window getters (`hwnd()`, sizes…) called
off the UI thread wait for it to answer, so never call one while holding a lock the UI
thread might wait on, and keep window-event handlers from waiting on the player's locks
(they run on the UI thread; `lib.rs` hands resize handling to a background thread).
## App icon
`src-tauri/icons/app-icon.svg` is the source. Render it to a 1024×1024 `app-icon.png`