V45.43: fix Ozone 11 GUI crash on Intel UHD 630 + load diagnostics
Root-cause hypothesis: fx_vst_bridge parked embed window offscreen (-20000,-20000) during VST3 editor attach; Ozone 11 GL init null-derefs (c0000005 in iZOzone11Core.dll+18f6b92) on Intel ICD. Reaper hosts window on-screen -> OK. - RenderFxJob.cpp: env toggle SF_FXGUI_ATTACH_ONSCREEN=1 -> SetWindowPos(100,100) before fxGuiLoadAttach, park back offscreen after attach succeeds - main_fx.cpp: FxCrashDumpHandler prints [CRASH] in <module>+0x<offset> and [CRASH] minidump: <path> so logs name the faulting plugin DLL directly - app.jsx VstGuiEmbed: frameLoadedRef + 90s watchdog -> onDead if bridge alive but no frame (no more infinite 'Dang tai plugin VST...' flash); clearer onDead toasts with %TEMP%\sf_dumps\fx_bridge_crash_*.dmp hint (track + master) - rebuild fx_vst_bridge + daw_vst_bridge, NSIS/MSI v=202609021809
This commit is contained in:
+14
-4
@@ -13382,11 +13382,13 @@ const ExportProgressModal = ({ open, exportProgress, isExporting, onClose }) =>
|
||||
const screenRectRef = React.useRef(null);
|
||||
const [, setDead] = React.useState(false);
|
||||
const [frameLoaded, setFrameLoaded] = React.useState(false);
|
||||
const frameLoadedRef = React.useRef(false);
|
||||
const post = (payload) => { try { fetch(url + '/input', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }).catch(() => {}); } catch (e) {} };
|
||||
React.useEffect(() => {
|
||||
deadRef.current = false;
|
||||
setDead(false);
|
||||
setFrameLoaded(false);
|
||||
frameLoadedRef.current = false;
|
||||
const tick = setInterval(() => {
|
||||
const img = imgRef.current;
|
||||
if (!img || deadRef.current) return;
|
||||
@@ -13407,8 +13409,16 @@ const ExportProgressModal = ({ open, exportProgress, isExporting, onClose }) =>
|
||||
// re-shows the native window at its last position, and the ~500ms
|
||||
// rect refresh below re-anchors it over the panel.
|
||||
try { fetch(url + '/show', { method: 'POST' }).catch(() => {}); } catch (e) {}
|
||||
// Watchdog: plugin load is allowed up to 90s; if no frame arrived and
|
||||
// the bridge did not die (ping alive = process stuck in plugin init/attach),
|
||||
// give up so the panel does not flash "Đang tải plugin VST..." forever.
|
||||
const watchdog = setTimeout(() => {
|
||||
if (!deadRef.current && !frameLoadedRef.current) {
|
||||
deadRef.current = true; setDead(true); onDead && onDead();
|
||||
}
|
||||
}, 90000);
|
||||
return () => {
|
||||
clearInterval(tick); clearInterval(ping); preloadRef.current = null;
|
||||
clearInterval(tick); clearInterval(ping); clearTimeout(watchdog); preloadRef.current = null;
|
||||
// Panel closed -> hide the native window (bridge stays alive so
|
||||
// reopening is fast); POST /hide chứ không /close.
|
||||
try { fetch(url + '/hide', { method: 'POST' }).catch(() => {}); } catch (e) {}
|
||||
@@ -13486,7 +13496,7 @@ const ExportProgressModal = ({ open, exportProgress, isExporting, onClose }) =>
|
||||
<span className="text-[11px] text-slate-500 font-mono animate-pulse">Đang tải plugin VST — GUI embed sẽ hiện khi plugin sẵn sàng...</span>
|
||||
</div>
|
||||
)}
|
||||
<img ref={imgRef} alt="VST GUI" className="w-full h-full object-contain select-none pointer-events-none" draggable={false} onLoad={() => setFrameLoaded(true)} />
|
||||
<img ref={imgRef} alt="VST GUI" className="w-full h-full object-contain select-none pointer-events-none" draggable={false} onLoad={() => { setFrameLoaded(true); frameLoadedRef.current = true; }} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -14019,7 +14029,7 @@ const addVst = (path) => { const fx = (fxList || []).find(f => f.path === path);
|
||||
{fxGuiOpen ? (
|
||||
<div className="flex-1 min-h-0">
|
||||
<VstGuiEmbed url={fxGuiOpen.url} onClose={closeFxGui}
|
||||
onDead={() => { window.showToast && window.showToast('Bridge VST GUI đã mất kết nối — trả về graph', 'error'); closeFxGui(); }} />
|
||||
onDead={() => { window.showToast && window.showToast('Plugin VST GUI lỗi khi mở (bridge chết/treo — check %TEMP%\\sf_dumps\\fx_bridge_crash_*.dmp) — đã trả về graph', 'error'); closeFxGui(); }} />
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
@@ -15097,7 +15107,7 @@ const addMasterVst = (path) => { const fx = (masterFxList || []).find(f => f.pat
|
||||
{masterGuiOpen ? (
|
||||
<div className="flex-1 flex flex-col bg-slate-950 relative min-h-0">
|
||||
<VstGuiEmbed url={masterGuiOpen.url} onClose={closeMasterGui}
|
||||
onDead={() => { window.showToast && window.showToast('Bridge VST GUI đã mất kết nối — trả về graph', 'error'); closeMasterGui(); }} />
|
||||
onDead={() => { window.showToast && window.showToast('Plugin VST GUI lỗi khi mở (bridge chết/treo — check %TEMP%\\sf_dumps\\fx_bridge_crash_*.dmp) — đã trả về graph', 'error'); closeMasterGui(); }} />
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex-1 flex flex-col bg-slate-950 relative overflow-y-auto oz-scrollbar">
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -51,7 +51,7 @@
|
||||
<script src="/static/js/services/promptTemplateManager.js?v=202608290945"></script>
|
||||
<script src="/static/js/services/undoRedoEngine.js?v=202608290945"></script>
|
||||
<script src="/static/js/services/chordTheory.js?v=202608290945"></script>
|
||||
<script src="/static/js/app.precompiled.js?v=202609021810" defer></script>
|
||||
<script src="/static/js/app.precompiled.js?v=202609022050" defer></script>
|
||||
<link rel="stylesheet" href="/static/css/styles.css?v=202608290945">
|
||||
<style>
|
||||
:root {
|
||||
|
||||
@@ -1906,9 +1906,23 @@ int run_fx_gui_server(const std::string& jobPath) {
|
||||
fxGuiShmSetName(shm); // EARLY — frontend may /shm push before load finishes
|
||||
|
||||
int loadRc = 0;
|
||||
const bool attachOnscreen = std::getenv("SF_FXGUI_ATTACH_ONSCREEN") != nullptr;
|
||||
const int srv = fxGuiServerLoop(hwnd, [&]() {
|
||||
// Some plugin GL editors (e.g. iZotope Ozone 11 on Intel UHD 630) crash
|
||||
// when their editor window is parked offscreen during attach. Env toggle
|
||||
// SF_FXGUI_ATTACH_ONSCREEN=1: show the window on-screen first, then park
|
||||
// it back once the editor attached. Visible for one frame max (feeder is
|
||||
// started only after attach succeeds).
|
||||
if (attachOnscreen)
|
||||
SetWindowPos(hwnd, nullptr, 100, 100, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
loadRc = fxGuiLoadAttach(&fx, path, name, hwnd, presetB64);
|
||||
if (loadRc == 0) fxGuiStartFeederThread(&fx, hwnd); // after load+attach only
|
||||
if (loadRc == 0) {
|
||||
fxGuiStartFeederThread(&fx, hwnd); // after load+attach only
|
||||
if (attachOnscreen)
|
||||
SetWindowPos(hwnd, nullptr, -20000, -20000, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
}
|
||||
if (loadRc != 0) PostMessageA(hwnd, WM_CLOSE, 0, 0); // exit; port already printed
|
||||
});
|
||||
RemovePropA(hwnd, "FXGUI_FX");
|
||||
|
||||
@@ -35,6 +35,18 @@ static LONG WINAPI FxCrashDumpHandler(EXCEPTION_POINTERS* ep) {
|
||||
std::cerr << "[CRASH] fx_vst_bridge exception code=0x" << std::hex
|
||||
<< (er ? er->ExceptionCode : 0) << " addr=0x"
|
||||
<< (er ? (void*)er->ExceptionAddress : nullptr) << std::dec << std::endl;
|
||||
if (er) {
|
||||
HMODULE hMod = nullptr;
|
||||
DWORD_PTR crashAddr = (DWORD_PTR)er->ExceptionAddress;
|
||||
if (GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
|
||||
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
|
||||
(LPCSTR)er->ExceptionAddress, &hMod) && hMod) {
|
||||
char modPath[MAX_PATH];
|
||||
if (GetModuleFileNameA(hMod, modPath, MAX_PATH))
|
||||
std::cerr << "[CRASH] in " << modPath << "+0x" << std::hex
|
||||
<< (crashAddr - (DWORD_PTR)hMod) << std::dec << std::endl;
|
||||
}
|
||||
}
|
||||
char dumpDir[MAX_PATH];
|
||||
if (GetTempPathA(MAX_PATH, dumpDir)) {
|
||||
std::strncat(dumpDir, "sf_dumps", MAX_PATH - std::strlen(dumpDir) - 1);
|
||||
@@ -63,6 +75,7 @@ static LONG WINAPI FxCrashDumpHandler(EXCEPTION_POINTERS* ep) {
|
||||
hFile, MiniDumpNormal, &mei, nullptr,
|
||||
nullptr);
|
||||
CloseHandle(hFile);
|
||||
std::cerr << "[CRASH] minidump: " << dumpPath << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user