Bug 113

Summary: Crash when removing sampler channel
Product: LinuxSampler Reporter: Grigor Iliev <gr.iliev>
Component: gig::EngineAssignee: Grigor Iliev <gr.iliev>
Status: CLOSED FIXED    
Severity: normal    
Priority: P2    
Version: SVN Trunk   
Hardware: PC   
OS: Linux   
Attachments: 113.patch.bz2

Description Grigor Iliev 2009-01-08 16:55:56 CET
LinuxSampler crashes when removing sampler channel with instrument loading in
Comment 1 Grigor Iliev 2009-01-24 02:44:53 CET
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.
Comment 2 Grigor Iliev 2009-01-24 02:46:45 CET
Created attachment 43 [details]
Comment 3 Christian Schoenebeck 2009-01-24 09:31:00 CET
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! :-)
Comment 4 Grigor Iliev 2009-01-24 15:35:21 CET