The destructor of juce::FileChooser does not close its open file chooser dialog.
(We updated JUCE to version 6 from 5 and this problem started to occur.)
Our VST plugin opens the native file chooser in windows. If the user decide to quite our plugin by removing it from the DAW the file chooser dialog stays open. In case the user choose a file everything works as expected. We use launchAsync to open the file chooser dialog and in case the plugin is terminated while the dialog is open the destructor of juce::FileChooser is called.
Just for testing I tried to use browseForFileToOpen and removed the plugin form the DAW (tested with Ableton Live). This leads to a crash of the DAW.
I tested to delete the file chooser object (just by a timer) during the dialog is open: The dialog stays open.
In the description of method juce::FileChooser::launchAsync its says:
“… To abort the file selection, simply delete the FileChooser object. …”
Somehow this does not work.