{"record":{"id":"28df917ca0715498","repo":"sxyazi/yazi","slug":"uninitialized-ueberzugpp","errorCode":null,"errorMessage":"uninitialized ueberzugpp","messagePattern":"uninitialized ueberzugpp","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"yazi-adapter/src/drivers/ueberzug.rs","lineNumber":49,"sourceCode":"\t\t\twhile let Some(cmd) = rx.recv().await {\n\t\t\t\tlet exit = child.as_mut().and_then(|c| c.try_wait().ok());\n\t\t\t\tif exit != Some(None) {\n\t\t\t\t\tchild = None;\n\t\t\t\t}\n\t\t\t\tif child.is_none() {\n\t\t\t\t\tchild = Self::create_demon(driver).ok();\n\t\t\t\t}\n\t\t\t\tif let Some(c) = &mut child {\n\t\t\t\t\tSelf::send_command(driver, c, cmd).await.ok();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tDEMON.init(Some(tx))\n\t}\n\n\tpub(super) async fn image_show(path: PathBuf, max: Rect) -> Result<Rect> {\n\t\tlet Some(tx) = &*DEMON else {\n\t\t\tbail!(\"uninitialized ueberzugpp\");\n\t\t};\n\n\t\tlet (w, h, path) = tokio::task::spawn_blocking(move || {\n\t\t\tImageReader::open(&path)?.with_guessed_format()?.into_dimensions().map(|(w, h)| (w, h, path))\n\t\t})\n\t\t.await??;\n\n\t\tlet area = Dimension::cell_size()\n\t\t\t.map(|(cw, ch)| Rect {\n\t\t\t\tx:      max.x,\n\t\t\t\ty:      max.y,\n\t\t\t\twidth:  max.width.min((w.min(YAZI.preview.max_width as _) as f64 / cw).ceil() as _),\n\t\t\t\theight: max.height.min((h.min(YAZI.preview.max_height as _) as f64 / ch).ceil() as _),\n\t\t\t})\n\t\t\t.unwrap_or(max);\n\n\t\ttx.send(Some((path, area)))?;\n\t\tADAPTOR.shown_store(area);","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/sxyazi/yazi/blob/5f901b886b14de1f17460b6e52e9de5d67f8aba9/yazi-adapter/src/drivers/ueberzug.rs#L31-L67","documentation":"The ueberzugpp daemon channel (`DEMON`) was never initialized when `image_show` was called, meaning the background task holding the child process and its sender was not started. The guard is a `let-else` on the global `DEMON` slot; the fault is calling show before the driver's init ran (or after it failed).","triggerScenarios":"Thrown at yazi-adapter/src/drivers/ueberzug.rs:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure ueberzug is enabled in the adapter layer before showing images.","Check that ueberzugpp is installed and the daemon task spawned successfully at startup.","Fall back to another preview adapter when the daemon is unavailable."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5f901b886b14de1f17460b6e52e9de5d67f8aba9","analyzedAt":"2026-09-02T18:38:25.566Z","contentChangedAt":"2026-09-02T18:38:25.566Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}