Skip to content

Fix silent crash when dragging invalid .oudep file onto window#2237

Open
KakaruHayate wants to merge 1 commit into
openutau:masterfrom
KakaruHayate:fix/oudep-drag-crash
Open

Fix silent crash when dragging invalid .oudep file onto window#2237
KakaruHayate wants to merge 1 commit into
openutau:masterfrom
KakaruHayate:fix/oudep-drag-crash

Conversation

@KakaruHayate

Copy link
Copy Markdown
Contributor

Problem

Dragging an invalid or malformed .oudep file onto the OpenUtau window causes a silent crash (application exit without error message).

Root cause: The OUDEP drag-and-drop handler in MainWindow.OnDrop calls PackageManager.InstallFromFileAsync without any try/catch. Since async void methods have no caller to catch exceptions, any validation failure (missing oudep.yaml, empty entrypoints, missing @class, invalid package id) becomes an unhandled exception that terminates the process.

Fix

Wrap the InstallFromFileAsync call in a try/catch block, log the error, and display a message box to the user — matching the same pattern already used in OnMenuInstallSinger (line 586-608 of the same file).

Testing

  • dotnet build OpenUtau.sln — 0 errors
  • Before: dragging an invalid .oudep → immediate crash
  • After: dragging an invalid .oudep → error message box with details, app continues running

The drag-and-drop OUDEP installer path in MainWindow.OnDrop lacked
error handling around PackageManager.InstallFromFileAsync. Any
validation failure (e.g. missing oudep.yaml, empty entrypoints,
invalid package id) threw an unhandled exception that crashed the
app because async void methods have no caller to catch.

Wrap the call in try/catch and show the error in a message box,
matching the pattern already used in OnMenuInstallSinger.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant