Without doubt, the vast majority of crash reports generated by Cantabile are related to plugin scanning. While Cantabile recovers and continues the scan if you restart it this is not very user friendly. To resolve this Cantabile now performs the scan in a separate process that can be monitored and automatically restarted if necessary.
Cantabile now uses what’s commonly called “isolation” for performing plugin scans. A separate process is started to load the plugin and fetch its meta data. Since much of the plugin scan process was already written and working, Cantabile still controls the scan process sending commands to the scan server to load a particular plugin read it’s meta data and send back the results.
In this log you can see Cantabile requesting a scan of Omnisphere and the returned results:
Mostly this new process worked flawlessly except for plugins that display a user-interface during a plugin scan (typically prompts to enter license details). Sime such plugins seemed to get confused by there being no active window in the program that’s loading them. To work around this, the scan server creates a little popup window that sits in the bottom right hand corner of the screen.
The nice side effect of this is if you have a lot of plugins to scan you can start the scan and switch away to something else while Cantabile chews through each plugin and the little popup will disappear when it’s done.
Bridged Plugins
Since Cantabile is loading the plugins in a separate process, it’s pretty easy to work out if the plugin is an x64 or x86 process and load it into the appropriate target process type. So there are two scan server processes: CantabileScanServer.x86.exe and CantabileScanServer.x64.exe.
If you’ve got jBridge installed (ie: Cantabile is able to load bridged plugins) Cantabile won’t use jBridge for the scan and just switch scan servers. jBridge is still used when loading the plugin into a session.
Caveats
So far, I think this new approach is working really well although there are a couple of caveats:
- If a plugin presents a user-interface but doesn’t set it’s parent windowto the correct active window it can sometimes appear behind other windows and go unnoticed. If you think the scan may have hung, first try minimizing all other windows.
- If the plugin being scanned hangs so will Cantabile — since it assumes the plugin is still busy. I could put in timeouts but that seemed dangerous if you’re trying to activate the license for a plugin and it’s just taking time. If the scan hangs the best way to recover is to launch Task Manager and kill the CantabileScanServer.x86.exe or CantabileScanServer.x64.exe tasks.
Improvements
Overall I think the new scan process is much better — I certainly haven’t been able to crash it which is a bit step in the right direction. It could still be improved by making the progress dialog more responsive and also handling hung plugins better (perhaps a Skip button) but that can wait for another day.
If you find problems or have comment, please let me know on this Trello card.