OmikronApexandClaude Fable 5 354052bc7c fix(audio): run device lifecycle ops on the JUCE message thread (Windows)
Tester crash (dump 2026-07-15, Focusrite USB ASIO): the driver's deferred
kAsioResetRequest fires a juce::Timer on the addon's JUCE message thread
(ASIOAudioIODevice::timerCallback -> reloadChannelNames) while the Node
thread concurrently destroys the device inside setAudioDevices/stopAudio —
use-after-free, ~5 minutes after every launch.

New runDeviceLifecycleOp() marshals every binding that can create or
destroy a juce::AudioIODevice (setDevice, device-type switches, start/stop,
stream output open/close, extra-input bind/unbind, add/removeSource) onto
the message thread on Windows, serialising them with those timers. Inline
on macOS (dispatch already inline) and Linux (ALSA main-thread contract
unchanged), and inline when already on the message thread to avoid
self-deadlock. Closures capture by value and return through shared_ptr so
a timed-out dispatch that runs late can't touch the caller's dead stack.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 22:34:36 +02:00
2026-06-16 18:48:12 +02:00
2026-06-16 18:48:12 +02:00
2026-06-16 18:48:12 +02:00
2026-06-16 18:48:12 +02:00
2026-06-16 18:48:12 +02:00
2026-06-16 18:48:12 +02:00
2026-06-16 18:48:12 +02:00
2026-06-16 18:48:12 +02:00
2026-06-16 18:48:12 +02:00
2026-06-16 18:48:12 +02:00
2026-06-16 18:48:12 +02:00
2026-06-16 18:48:12 +02:00
S
Description
No description provided
AGPL-3.0
2.8 MiB
Languages
C++ 52%
TypeScript 18.6%
JavaScript 17.9%
Shell 7.3%
CMake 2.4%
Other 1.8%