However waitForThreadToExit(-1) will in ~50% of the cases never finish, freezing the plugin and host. The other 50% it will make the titlebar of the plugin flash for a few seconds and then close.
I am really clueless what’s going on here, maybe I am opening the FileChooser wrong somehow?
Thanks for your answer! I built agains develop and I can confirm it works now.
In develop several parts of the API seem to be hidden behind a macro JUCE_MODAL_LOOPS_PERMITTED. I had to manually add this to my preprocessor definitions. Is this intended?
Also, is there a known date when this will be merged into the next stable JUCE version? My product is open source and I’m amidst a public beta. Changing my runners to built against develop right now might have unforseen consequences. Also, its is an extra step for users who want to build the project.
Yes, this is mentioned in the BREAKING CHANGES document in the repository. Modal loops are very dangerous in plugins, and are not supported on Android. Making this functionality opt-in rather than opt-out is intended to encourage users to write safer, more portable code by default, although the old modal functionality is still available if necessary.
We don’t have a concrete date, but we’re planning a new release in the next few weeks.