fix(bridge): VSTi GUI crash on instrument switch — PostMessage WM_CLOSE instead of cross-thread DestroyWindow

- LOAD job posts WM_CLOSE to window created on main thread (DestroyWindow from worker crashed 0xc000041d, muting all tracks)
- handleOpenGui + attach jobs skip when Vst3Instrument::hasAttachedView() (state_ && guiAttached_)
- attach failure posts WM_CLOSE; post_close_gui erases entry only when it points at the same hwnd
- cap openVstGuiRetry at 5 to stop frontend retry spam
This commit is contained in:
2026-08-14 10:18:22 +07:00
parent f7f20e3a0a
commit 35499b614c
5 changed files with 54 additions and 12 deletions
+4
View File
@@ -635,6 +635,10 @@ bool Vst3Instrument::attachView(void* parentWindowHandle) {
#endif
}
bool Vst3Instrument::hasAttachedView() const {
return state_ != nullptr && guiAttached_;
}
bool Vst3Instrument::reload() {
#ifndef HAVE_VST3SDK
return false;