Since we worked out the installation issue, I can continue on this one...
I got a preliminary version running. More or less. Sometimes.
The problems are a bit hard to describe...
Let's start with the basics: I've created a set of base classes, modeled after the CBase* classes in CopperVex, just with increased capabilities (dynamic setup of inputs, creation / destruction of subdevices, liberally sprinkled with debug output, etc.).
Based on these, I've created a set of classes:
- an "engine" class that talks to VSTHost's User Exit interface on one side, and is a derived "CopperLan engine" on the other side. This engine creates:
- a "root device", which has an input set for the "Engine"-specific VSTHost parameters (only BPM at the moment). This root device creates:
- a "Track" subdevice for each of the tracks defined in the host application (currently only one, as already written). This subdevice has an input set for the track-specific VSTHost parameters (Bank / Performance loaded), and creates:
- "PlugIn" (sub-)subdevices for each of the PlugIns that are loaded into the track. Each PlugIn subdevice has two input sets: one for the PlugIn's global parameters (currently, only the program loaded into the PlugIn), and one for the PlugIn's parameters (varying number for each PlugIn).
So far, so good...
sometimes, this setup even works. Mostly it doesn't.
- First of all, it only works if the local CopperLan Manager (i.e., the one on the same machine) is running before VSTHost with this setup is started. If the CopperLan Manager is started after VSTHost, or if it is running on another machine in the network, VSTHost freezes (somewhere in CHAI, as far as I could determine) - see below for details.
- If it works, it works nicely... on Windows 7 x64. On Windows XP, it tends to work once, and after I close and restart it, it freezes regularly, most of the time even kills XP (something hangs - windows refuse to close or accept input, and I can't even shut down and restart the machine any more - blessed be the Reset button!).
- If it freezes, the symptoms are like that: in the CopperLan Manager, a "VSTHost" device appears (as it should). If I click on it on the "Editor" tab, only the subdevice for the Master Track is shown (no Engine Inputs); at this moment, VSTHost seems to enter an endless loop somewhere in CHAI - I trace each and every "Onxxx" method invocation; nothing reaches this level, but VSTHost suddenly consumes the complete CPU time of one core. VSTHost as a whole still works, as long as nothing is done that would cause an interaction with CHAI. Clicking on the "Master" subdevice in the CopperLan manager sometimes shows the two preloaded {In} and {Out} subdevices - but that's all. No Inputs.
- If I try to close VSTHost in this state, the first call into any of the CHAI functions causes the VSTHost UI thread to lock up, and I have to close it from the Task Manager. In XP, this also means "Bye, bye, Windows."
As said, it's modeled on the CopperVex helper classes (version from Jan 2012, IIRC) - which works, but is much simpler (only 1 device with 4 input sets - so quite some functionality is missing).
Do you have any idea what this could be? And what (kind of) additional input would you need for a diagnosis?