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
- SandboxVst2Host::loadSerializedState: queuePreset non-blocking (byte-identical
echo never matched -> waitApply always burned 20s TIMEOUT on the audio thread;
VST2 restore runs via runOnMain so every startup silenced ALL audio ~20s = Qin
'failed that su'). Bridge now holds reloading + defers saveStateJob until the
child republishes a different chunk (clobber protection, no audio block).
- sf-fx-realtime clear_queue('loop'): truncate old tail to KEEP=4 blocks
(~21ms) instead of keeping FILL 24 (~128ms) -> wrap downbeat no longer ~110ms
late; skipFade crossfade masks the truncation jump, seam crossfade recount.
- bump ?v= 202608291721 (app.jsx x2, index.html x2); deploy 3 _internal + dist.
- RealtimeFxLoop: timeBeginPeriod(1) + sleep_until thay Sleep(1) -> loopMax 32.9->24.8ms
- plugins.py _pump_output: stall-fade 8 block gain 1->0 khi gap > 5.5*block_sec (~29ms),
burst send, fade-in 0->1 khi resume; poll dung asyncio.to_thread(time.sleep) vi asyncio.sleep
bi cap 15.6ms tren Win11 (IOCP) du timeBeginPeriod
- fx_realtime.py: stats dem publish/drop/stale/read cho diagnostics
- rebuild bridge binary
Real-input clicks were landing in whatever window sat above the anchored
plugin window (foreground Chrome in tests) — WindowFromPoint at the click
point returned the browser, so the editor never saw the input. Attach to
the foreground thread, SetForegroundWindow + BringWindowToTop before the
click (still non-TOPMOST — no floating regression from 80c663e).
- GUI process peek ring SHM đầu vào (không consume, không tranh chấp RealtimeFxLoop)
- gọi fx->processAudio() trên instance GUI để meter/UI plugin chuyển động theo âm thật
- performEdit forward sang controller -> meter điều khiển bởi param cũng cập nhật
- bridge /shm: frontend đẩy tên session live vào mỗi GUI đang mở (start/stop/open)
- tests: 127 passed
- Bỏ push setFxChain xuống native bridge (T2.4) — SHM fxRt loop (fx_vst_bridge
--realtime-fx) là nơi xử lý live master mix duy nhất; trước đây MIDI/VSTi
instrument bị xử lý 2 lần (native bridge + SHM loop) → over-process,
âm bể/crackle. setFxChain vẫn dùng khi Export/Offline render.
- closeMasterGui/closeFxGui: POST /close (kill process) thay vì /hide —
không còn cửa sổ floating always-on-top lơ lửng, tắt được dứt điểm.
- openFxGui already_running kèm embed_url → mở lại embed panel thay vì chỉ toast.
- open_fx_gui (plugins.py): spawn fx-gui với SF_PARENT_PID=<engine pid>.
- RenderFxJob.cpp: watchdog thread trong run_open_fx_gui/run_fx_gui_server —
engine chết → WM_CLOSE, GUI process tự thoát, không để lại cửa sổ mồ côi.
- RenderFxJob: safeScanModule chay tren worker thread + TerminateThread neu
Module::create treo >30s (Ozone 11 Clarity treo vinh vien, SEH khong bat
hang) -> scan khong bao gio ket thuc -> list_fx() timeout -> fx_paths rong
-> filter /available vo hieu -> nut Synth hien ca VST FX
- Module crash/hang -> emit is_fx=false,is_instrument=false (UNKNOWN) thay vi
is_instrument=true (truoc day xep VST FX crash vao danh sach instrument)
- vst_engine: list_scan_all() tra toan bo (FX+instrument+unknown); list_fx()
loc is_fx tu cache chung
- plugins.py /available: loai ca fx_paths lan unknown_paths khoi
vst_instruments -> nut Synth chi hien VSTi that
- calibrate: probe sandbox (jbridge) theo real-time pacing — child render qua SHM
consumer-sync, probe µs-speed chỉ đo được silence/attack → makeup=1.0 mọi channel.
Thêm virtual probeNeedsRealtime() (SandboxVst2Host → true), calibrate() Sleep
~1 block/5.8ms để child kịp nhận MIDI + render steady-state → makeup đo peak thật
(3 channel Qin ≈ 2.6, trước đây = 1.0 → âm lượng đồng đều giữa các track/VSTi).
- OPEN_GUI: SetWindowPos(HWND_TOPMOST) + SetForegroundWindow + BringWindowToTop
→ GUI VSTi hiển thị ở top window, tương tác ngay.
- /api/v1/plugins/available: filter vst_instruments + extra theo is_fx của
fx_vst_bridge --scan (trước merge entry) — modal Select Instrument chỉ còn
soundfont + VSTi, không hiện VST FX (90 → 33).