Summary: | Orphaned pointers when setting maximum voices limit | ||
---|---|---|---|
Product: | LinuxSampler | Reporter: | Grigor Iliev <gr.iliev> |
Component: | gig::Engine | Assignee: | Christian Schoenebeck <cuse> |
Status: | CLOSED FIXED | ||
Severity: | critical | CC: | andreas56 |
Priority: | P2 | ||
Version: | SVN Trunk | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | 118.patch.bz2 |
Description
Grigor Iliev
2009-02-12 14:26:14 CET
Attached patch. Note: to reproduce this bug load instrument to a sampler channel, change the maximum voice limit and start playing notes. Created attachment 47 [details]
118.patch.bz2
The patch works fine for me, but I think the ClearDimRegionsInUse part is unnecessary. (In reply to comment #3) > The patch works fine for me, but I think the ClearDimRegionsInUse part is > unnecessary. If you set the maximum voice limit while there are active streams pDimRegionsInUse will not be empty and, if you delete pDimRegionPool before clearing/deleting pDimRegionsInUse, in its destructor pDimRegionsInUse will try to push back the elements in the list to pDimRegionPool, which is already deleted. So in this case a memory corruption will occur. See bug #120 before testing this scenario. (In reply to comment #4) Ah, you're right of course. This is the part I missed when I looked at the code before: > its destructor pDimRegionsInUse will try > to push back the elements in the list to pDimRegionPool Applied the patch. |