I have some code that seems to crash from time to time. It adds 32 samples from the beginning of the array and adds them at the end:
void addOverlapSamples(Array *sampleData)
int count = 0;
while (count < 32 && sampleData->size() > count)
The error stack:
Thread 29 Crashed:
0x0000000118541e86 juce::Array<float, juce::DummyCriticalSection, 0>::add(float const&) + 62
I’m almost sure that i haven’t any multi threading issues because i don’t see any other thread that does access the array or is near that code. And i also have a lock that avoids this.
My guess is that it has something to do with the memory allocation inside the array. Can this be and do i have to copy the values to a temporary array to avoid this?
Any help is welcome.