LinuxSampler crashes when removing sampler channel with instrument loading in
The crash is due to orphaned pointers to the removed EngineChannel. Currently,
it is not easy to cancel already started instrument loading and the channel
removal shouldn't be time consuming. So I implemented a fix, which postpones the
deallocation of the EngineChannel object until the instrument is fully loaded.
Christian, take a look at the attached patch and let me know if this solution is
ok with you.
Created attachment 43 [details]
Looks fine with me Grigor!
The only two minor things I would adjust is the names of the Lock() and
Unlock() methods you added to the factory class. I think they're a bit
ambigious, considering them to be exported to the API. I think I would make
them one method like: setDeleteEnabled(bool b) or setDeleteAllowed(bool b) or
something like that. And the other even more minor thing is the comment in the
factory class: "// see bug #113", I think you can just copy the other comment
from EngineChannel.cpp, just to be make it a bit more verbose. ;-)
Beside that, fine! :-)