From 69a6a1360d9462562e387d512087d6a0106f76f6 Mon Sep 17 00:00:00 2001 From: Yun Chan Date: Wed, 6 May 2026 14:50:32 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=B9=A0=EB=A5=B8=20=EB=B3=80=ED=99=98?= =?UTF-8?q?=20=ED=9B=84=20=ED=94=84=EB=A1=9C=EC=84=B8=EC=8A=A4=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=20=EC=A2=85=EB=A3=8C=20+=20=EC=A7=84=EB=8B=A8=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ShutdownMode를 OnExplicitShutdown → OnLastWindowClose 로 변경 변환 끝나도 WPF가 안 닫혀 좀비 프로세스로 남던 문제. 사용자 입장에선 "결과가 안 보임"으로 인지됐음. 이제 GUI 닫히면 자동 종료(1초 내) - RunQuickAsync에 %TEMP%\EverythingToJpeg_quick.log 진단 로그 추가 (소스 경로, 결과 상태, 출력 경로, 예외 스택을 모두 기록) Co-Authored-By: Claude Opus 4.7 (1M context) --- src/EverythingToJpeg.App/App.xaml | 2 +- src/EverythingToJpeg.App/App.xaml.cs | 25 ++++++++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/EverythingToJpeg.App/App.xaml b/src/EverythingToJpeg.App/App.xaml index 1510506..430b975 100644 --- a/src/EverythingToJpeg.App/App.xaml +++ b/src/EverythingToJpeg.App/App.xaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" xmlns:local="clr-namespace:EverythingToJpeg.App" - ShutdownMode="OnExplicitShutdown"> + ShutdownMode="OnLastWindowClose"> diff --git a/src/EverythingToJpeg.App/App.xaml.cs b/src/EverythingToJpeg.App/App.xaml.cs index 95b0549..4796741 100644 --- a/src/EverythingToJpeg.App/App.xaml.cs +++ b/src/EverythingToJpeg.App/App.xaml.cs @@ -79,6 +79,11 @@ public partial class App : Application private async Task RunQuickAsync(IReadOnlyList files) { + var logPath = Path.Combine(Path.GetTempPath(), "EverythingToJpeg_quick.log"); + var log = new System.Text.StringBuilder(); + log.AppendLine($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}] Quick start, {files.Count} file(s)"); + foreach (var f in files) log.AppendLine($" src: {f}"); + var progress = new QuickProgressWindow(files.Count); progress.Show(); @@ -87,14 +92,28 @@ public partial class App : Application var options = ConvertOptions.Quick(); var reporter = new Progress(p => progress.Report(p)); var results = await Engine.ConvertManyAsync(files, options, reporter); + + foreach (var r in results) + { + log.AppendLine($" [{r.Status}] {Path.GetFileName(r.SourcePath)} → {r.OutputPaths.Count} output(s)"); + if (r.Message is { Length: > 0 }) log.AppendLine($" msg: {r.Message}"); + if (r.Error is not null) log.AppendLine($" err: {r.Error}"); + foreach (var o in r.OutputPaths) log.AppendLine($" out: {o}"); + } + progress.Finish(results); } catch (Exception ex) { - MessageBox.Show($"변환 중 오류: {ex.Message}", "EverythingToJpeg", + log.AppendLine($" EXCEPTION {ex.GetType().Name}: {ex.Message}"); + log.AppendLine(ex.ToString()); + try { progress.Close(); } catch { } + MessageBox.Show($"변환 중 오류: {ex.Message}\n\n로그: {logPath}", "EverythingToJpeg", MessageBoxButton.OK, MessageBoxImage.Error); - progress.Close(); - Shutdown(1); + } + finally + { + try { File.WriteAllText(logPath, log.ToString()); } catch { } } } }