fix(plugin-manager): xoa/add dir luu dung dir moi (stale closure); loc plugin file da mat khoi disk; scan VST3 giam timeout module con lai 4s va subprocess 300s
This commit is contained in:
@@ -1565,7 +1565,10 @@ bool safeScanModule(const std::string& path, std::vector<ScanEntry>& out) {
|
||||
ScanCtx ctx{&path, &out};
|
||||
HANDLE hThread = CreateThread(nullptr, 0, scanWorker, &ctx, 0, nullptr);
|
||||
if (!hThread) { std::cerr << "[Scan] skip (thread fail): " << path << std::endl; return false; }
|
||||
const DWORD timeoutMs = 12000; // 12s/module — Ozone treo vĩnh viễn, đủ phân biệt
|
||||
const DWORD timeoutMs = 4000; // 4s/module — module hợp lệ load 1-3s (đo
|
||||
// thực tế); module treo thì treo vĩnh viễn nên 4s đủ phân biệt. Trước đây
|
||||
// 12s × ~15 module Ozone 11 treo = 180s+ vượt timeout Python → mất CẢ dir
|
||||
// → MASTERING PANEL rỗng.
|
||||
DWORD wait = WaitForSingleObject(hThread, timeoutMs);
|
||||
if (wait == WAIT_TIMEOUT) {
|
||||
TerminateThread(hThread, 0);
|
||||
|
||||
Reference in New Issue
Block a user