From bfe010a19259b11480a72c0a551b55a8ea2106d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 11 Sep 2026 18:55:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A9=E8=A7=86=E8=A7=89=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E9=A2=84=E8=A7=88=E5=86=99=E5=85=A5=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E5=8F=AF=E9=99=8D=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调试 PNG 写入失败时记录警告并继续绑定流程。 --- .../src/ui_editor/commands/separation/image_preprocess.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/image_preprocess.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/image_preprocess.rs index d3615ef4f..d04782faf 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/image_preprocess.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/image_preprocess.rs @@ -44,8 +44,12 @@ fn preprocess_for_visual_binding_blocking( .write_to(&mut Cursor::new(&mut png), ImageFormat::Png) .map_err(|error| format!("编码视觉绑定预览失败:{error}"))?; let debug_name = format!("binding-{}.png", uuid::Uuid::new_v4().simple()); - fs::write(sidecar.join(&debug_name), &png) - .map_err(|error| format!("写入视觉绑定预览失败:{error}"))?; + if let Err(error) = fs::write(sidecar.join(&debug_name), &png) { + app_log!( + "ui_separation.warning stage=visual_binding_preview_write file={} error={error}", + debug_name + ); + } Ok(format!( "data:image/png;base64,{}", base64::engine::general_purpose::STANDARD.encode(png)