On Mittwoch, 5. Januar 2022 11:26:57 CET Andrew C wrote:
> Hi Christian,
> 
> Ah ok, that was my issue with the instrument editor not opening after all!

I disabled this behaviour for now as a workaround, so it no longer unloads 
instrument editor plugins on a LSCP "RESET" command:
http://svn.linuxsampler.org/cgi-bin/viewvc.cgi?view=revision&revision=4021

> I might be missing something, but once the plugins are closed and that
> destructor code is run (i.e a RESET is sent), how can linuxsampler open
> them up again?
> At that point, sending the LSCP commands to create a new audio interface,
> load a gig file and open it for editing  again gives the 'cannot find
> instrument editor' message.

IIRC The original intended behaviour was to unload all instrument editor 
plugins to prevent them causing a crash if they were still open, as a sampler 
reset basically wipes away everything from RAM editors are working on.

ClosePlugin() then resets bPluginsLoaded, which would cause the next time 
instrument editors were requested, to automatically reload the plugins. And it 
did that actually there.

However AFAICS the subsequent LSCP "CHANNEL EDIT" command was issued so fast 
on your side that it apparently caused a race condition:

1. now missing plugins were reloaded

2. previous DLL instance was unloaded and immediately deleted the new plugin 
   instances of step (1.) again (due to the InnerFactoryDestructor being 
   executed deferred)

At least that's what I assume ATM. I currently don't have plans to address 
this potential race, from my comments in the svn diff you probably see that it 
would not be a quick and easy to fix, e.g. Windows would be tricky. Hence my 
decision for this workaround for now.

CU
Christian




_______________________________________________
Linuxsampler-devel mailing list
Linuxsampler-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel

Reply via email to