LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.14k stars 1.01k forks source link

Granular Pitch Shifter - Glide 0, SIGFPE #7347

Closed zonkmachine closed 4 months ago

zonkmachine commented 4 months ago

System Information

Ubuntu 22.04

LMMS Version(s)

6634cec127a2ad8365148269c542cecb90255148

Bug Summary

I'm guessing division with zero with glide setting 0. https://github.com/LMMS/lmms/blob/6634cec127a2ad8365148269c542cecb90255148/plugins/GranularPitchShifter/GranularPitchShifterEffect.cpp#L90

Steps To Reproduce

cmake .. -DCMAKE_BUILD_TYPE=Debug -DWANT_DEBUG_FPE=ON Add a pitch shifter and turn glide to 0. Play a note.

Logs

Click to expand
Thread 28 "lmms::AudioEngi" received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7fffaf7fe640 (LWP 15231)]
0x00007fffc4023079 in lmms::GranularPitchShifterEffect::processAudioBuffer (this=0x55555aa25540, buf=0x555559e14440, frames=256) at /home/zonkmachine/builds/lmmsold/lmms/plugins/GranularPitchShifter/GranularPitchShifterEffect.cpp:90
90          m_glideCoef = std::exp(-1 / (glide * m_sampleRate));
(gdb) bt full
#0  0x00007fffc4023079 in lmms::GranularPitchShifterEffect::processAudioBuffer(std::array*, short) (this=0x55555aa25540, buf=0x555559e14440, frames=256)
    at /home/zonkmachine/builds/lmmsold/lmms/plugins/GranularPitchShifter/GranularPitchShifterEffect.cpp:90
        d = 0.560000002
        w = 0.439999998
        pitchBuf = 0x0
        pitchSpreadBuf = 0x0
        size = 1000
        shape = 2
        jitter = 0
        twitch = 0.875999987
        spray = 0
        spraySpread = 1
        density = 1
        glide = 0
        minLatency = 23461
        densityInvRoot = 1
        feedback = 0.0199999996
        fadeLength = 1
        prefilter = true
        shapeK = 9.18340949e-41
        sizeSamples = 5
        waitMult = 7.90904054e+15

@LostRobotMusic

Please search the issue tracker for existing bug reports before submitting your own.

LostRobotMusic commented 4 months ago

My bad, I fixed this in my personal build but completely forgot to move it into the PR.

LostRobotMusic commented 4 months ago

Fixed in #7348.