StandaloneFilterWindow problem


#1

I’m using StandaloneFilterWindow to make my plugin standalone.

Upon quit the debugger jumps into the following code of the Thread class:

// very bad karma if this point is reached, as
// there are bound to be locks and events left in
// silly states when a thread is killed by force…
jassertfalse
Logger::writeToLog ("!! killing thread by force !!");

I noticed that this only happens when:

  1. 2 MIDI Input devices must be selected
  2. application must have been closed and launched again after selecting at least 2 MIDI Input devices for it to crash.

I’m using JUCE146. What could I be doing wrong here?

FYI here’s the call stack:

topoVSTi_standalone_debug.exe!juce::Thread::stopThread(const int timeOutMilliseconds=0x00001388)  Line 196 + 0x30 bytes	C++
topoVSTi_standalone_debug.exe!juce::MidiInThread::stop()  Line 247	C++
topoVSTi_standalone_debug.exe!juce::MidiInThread::~MidiInThread()  Line 79	C++
topoVSTi_standalone_debug.exe!juce::MidiInThread::`scalar deleting destructor'()  + 0x2b bytes	C++
topoVSTi_standalone_debug.exe!juce::MidiInput::~MidiInput()  Line 412 + 0x34 bytes	C++
topoVSTi_standalone_debug.exe!juce::MidiInput::`scalar deleting destructor'()  + 0x2b bytes	C++
topoVSTi_standalone_debug.exe!juce::OwnedArray<juce::MidiInput,juce::DummyCriticalSection>::clear(const bool deleteObjects=true)  Line 99 + 0x45 bytes	C++
topoVSTi_standalone_debug.exe!juce::OwnedArray<juce::MidiInput,juce::DummyCriticalSection>::~OwnedArray<juce::MidiInput,juce::DummyCriticalSection>()  Line 88	C++

topoVSTi_standalone_debug.exe!juce::AudioDeviceManager::~AudioDeviceManager() Line 80 + 0xb4 bytes C++
topoVSTi_standalone_debug.exe!AudioFilterStreamingDeviceManager::~AudioFilterStreamingDeviceManager() Line 151 + 0xf bytes C++
topoVSTi_standalone_debug.exe!AudioFilterStreamingDeviceManager::scalar deleting destructor'() + 0x2b bytes C++ topoVSTi_standalone_debug.exe!StandaloneFilterWindow::~StandaloneFilterWindow() Line 132 + 0x3a bytes C++ topoVSTi_standalone_debug.exe!StandaloneFilterWindow::scalar deleting destructor’() + 0x2b bytes C++
topoVSTi_standalone_debug.exe!AppClass::shutdown() Line 32 + 0x37 bytes C++
topoVSTi_standalone_debug.exe!juce::JUCEApplication::shutdownAppAndClearUp(const bool useMaximumForce=false) Line 245 + 0xf bytes C++
topoVSTi_standalone_debug.exe!juce::JUCEApplication::main(juce::String & commandLine={…}, juce::JUCEApplication * const app=0x08db5e78) Line 227 + 0xa bytes C++