This is an obscure edge case, but it may indicate a bug that could occur under other circumstances.
Steps to reproduce:
- In the Settings dialog, set the buffer size to 4ms and the step size to 8ms
- Set the Analysis type to "MPM + Modified Cepstrum"
- Open the file tests/example.wav
The app crashes at line 388 of mytransforms.cpp in MyTransforms::findNSDFsubMaximum():
387: //should never get here
388: myassert(0);
The issue is that:
I think this is because MyTransforms::findNSDFMaxima() is making some assumptions that don't hold:
//find the first negitive zero crossing
while(l_pos < (p_len - 1) / 3 && p_input[l_pos] > 0.0f)
{
l_pos++;
}
This assumes that the first zero crossing will occur in the first third of the chunk. But what if it doesn't? And why does it only check the first third of the chunk?
Here is the backtrace:
#3 0x0000000100089d54 in MyTransforms::findNSDFsubMaximum(float*, int, float) at tartini/general/mytransforms.cpp:388
#4 0x000000010008bb74 in MyTransforms::doChannelDataFFT(Channel*, float*, int) at tartini/general/mytransforms.cpp:908
#5 0x000000010008a035 in MyTransforms::calculateAnalysisData(int, Channel*) at tartini/general/mytransforms.cpp:411
#6 0x000000010001065c in SoundFile::calculateAnalysisData(int, Channel*) at tartini/sound/soundfile.hpp:186
#7 0x0000000100010477 in Channel::processNewChunk(FilterState*) at tartini/sound/channel.cpp:324
#8 0x0000000100025d05 in SoundFile::readChunk(int) at tartini/sound/soundfile.cpp:533
#9 0x000000010002610f in SoundFile::preProcess() at tartini/sound/soundfile.cpp:645
#10 0x0000000100049f98 in MainWindow::openFile(char const*) at tartini/widgets/mainwindow/mainwindow.cpp:731
This is an obscure edge case, but it may indicate a bug that could occur under other circumstances.
Steps to reproduce:
The app crashes at line 388 of
mytransforms.cppinMyTransforms::findNSDFsubMaximum():The issue is that:
I think this is because
MyTransforms::findNSDFMaxima()is making some assumptions that don't hold:This assumes that the first zero crossing will occur in the first third of the chunk. But what if it doesn't? And why does it only check the first third of the chunk?
Here is the backtrace: