Release Kaleido Desktop 0.1.0-beta.11
All checks were successful
Validate Kaleido Desktop / validate (push) Successful in 1m22s
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:
parent
0eb8518927
commit
4985f1dde0
15 changed files with 362 additions and 10 deletions
|
|
@ -14,6 +14,10 @@ use tauri::{AppHandle, Emitter, Manager, Runtime, WebviewWindow};
|
|||
use crate::mpv::{self, Event, Mpv};
|
||||
use crate::platform::VideoSurface;
|
||||
|
||||
/// Both locks are taken by commands on background threads, and some window
|
||||
/// calls made while holding them (Tauri's getters, such as `hwnd()`) wait for
|
||||
/// the UI thread to answer. So the UI thread must never wait on these locks:
|
||||
/// window events hand their work to a background thread (lib.rs).
|
||||
#[derive(Default)]
|
||||
pub struct PlayerState {
|
||||
mpv: Mutex<Option<Arc<Mpv>>>,
|
||||
|
|
@ -60,6 +64,8 @@ fn emit<R: Runtime>(app: &AppHandle<R>, payload: Value) {
|
|||
fn create_player<R: Runtime>(app: &AppHandle<R>, window: &WebviewWindow<R>, opts: &InitOptions) -> Result<Arc<Mpv>, String> {
|
||||
let resource_dir = app.path().resource_dir().ok();
|
||||
let mpv = Mpv::load(&mpv::library_candidates(resource_dir))?;
|
||||
// libmpv's runtime may install its own crash filter as it loads; ours goes back on top.
|
||||
crate::platform::install_crash_handler();
|
||||
let surface = VideoSurface::create(window)?;
|
||||
let render_options = surface.mpv_options();
|
||||
*app.state::<PlayerState>().surface.lock() = Some(surface);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue