Bug 113 - Crash when removing sampler channel
Summary: Crash when removing sampler channel
Alias: None
Product: LinuxSampler
Classification: Unclassified
Component: gig::Engine (show other bugs)
Version: SVN Trunk
Hardware: PC Linux
: P2 normal
Assignee: Grigor Iliev
Depends on:
Reported: 2009-01-08 16:55 CET by Grigor Iliev
Modified: 2009-03-02 15:07 CET (History)
0 users

See Also:

113.patch.bz2 (1.82 KB, patch)
2009-01-24 02:46 CET, Grigor Iliev

Note You need to log in before you can comment on or make changes to this bug.
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