Fix eject hanging the tab on ROM-based tables

Bump @valknar/vpinball-wasm to 0.3.3, which fixes a genuine infinite
busy-wait in the PinMAME plugin's Controller::Stop() under Emscripten
(no OS thread ever clears the flag it spins on) — this fired from
dispose()'s synchronous script Exit event on any ROM-based table,
hanging the tab permanently.

Sequence unmount cleanup as stop() then two animation frames then
dispose(), instead of dispose() alone, matching the consumer pattern
the engine fix expects (stop() only takes effect on its next internal
step, so disposing immediately after can still race it).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-24 10:27:35 +02:00
co-authored by Claude Sonnet 5
parent 53c8ea03ac
commit 44504c718d
5 changed files with 22 additions and 13 deletions
+2 -5
View File
@@ -64,11 +64,8 @@ export default function CoinDoorHud({ instanceRef, tableInfo, loadTimeMs }: Coin
};
const handleEject = () => {
// dispose() (called by usePinballInstance's unmount cleanup, triggered by
// this navigation) tears the instance down immediately. Calling stop()
// here too raced it — stop() defers teardown to the engine's next
// internal step, and dispose() freeing WASM memory before that step runs
// hung the tab.
// usePinballInstance's unmount cleanup (triggered by this navigation)
// handles stop()+dispose() itself, sequenced to avoid hanging the tab.
router.push("/");
};