Auval doens't allow window creation

hi,

I’d like to display a progress bar when reloading a plugin state.
It works fine as long as the host allows opening the user interface.
However in auval I get an exception when creating the window.

How can I detect whether I can create a window?

There’s no way to know what the host wants you to do.

Surely the “correct” approach would be that if your plugin’s editor is visible, use that to show the progress, and if not, don’t. Opening other windows is a bad thing to do if you can avoid it.

sure, if the editor is visible that’s easy. but most of the time, when reloading a session, the editor is not visible and this is potentially the longest operation where a progress bar would be most wanted.

Maybe you can start another “messages” process when needed that will be a standalone application and will show the needed messages.

I really think that if you editor’s not visible, you really shouldn’t try to show anything on the screen.

That’s what we do now, but users are complaining about long loading times and not knowing how much time it will take.
The progress bar is already working in 99% of the situations, but the remaing 1% is still stopping us from adding that feature. :frowning:

If the problem happens only on auval, you can detect it using PluginHostType (you might need to add auval), and display the progess in stdout instead of a window. Though this could also fail in other command-line based tools (or when a DAW is scanning for plugins)…