1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-03 03:30:06 +00:00
JUCE/modules/juce_audio_processors/scanning
reuk 5c34248d00
PluginListComponent: Wait for current scan to complete before calling owner.scanFinished()
I observed a deadlock when scanning AU plugins in-process in the
AudioPluginHost, and then clicking the "cancel" button in the scan
progress alert window.

The cause of the deadlock seems to be that JUCE uses async messages to
create and destroy AU plugins on the main thread. When running a plugin
scanner on a background thread, it was possible to end up in a situation
where the background thread was waiting on the message thread to process
a create/destroy message; and, at the same time, the main thread was
blocked waiting for all scan jobs to complete. This seemed to happen
because scanFinished() was called directly from the Scanner's
timerCallback as soon as the progress window was cancelled, even if
there was still a scan in progress at that point.

To avoid the deadlock, we now wait until the current scan has completely
finished before allowing the timerCallback to call scanFinished(). If no
scan is in progress, then the main thread can safely destroy the scanner
ThreadPool without needing to wait at that point.
2025-06-06 23:12:16 +01:00
..
juce_KnownPluginList.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_KnownPluginList.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_PluginDirectoryScanner.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_PluginDirectoryScanner.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_PluginListComponent.cpp PluginListComponent: Wait for current scan to complete before calling owner.scanFinished() 2025-06-06 23:12:16 +01:00
juce_PluginListComponent.h Update licensing information 2024-04-16 11:39:35 +01:00