Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CompressorEffect::msToCoeff - SIGFPE #7340

Closed
1 task done
zonkmachine opened this issue Jun 23, 2024 · 2 comments · Fixed by #7343
Closed
1 task done

CompressorEffect::msToCoeff - SIGFPE #7340

zonkmachine opened this issue Jun 23, 2024 · 2 comments · Fixed by #7343
Labels

Comments

@zonkmachine
Copy link
Member

zonkmachine commented Jun 23, 2024

System Information

Ubuntu 22.04

LMMS Version(s)

a1f7753

Bug Summary

SIGFPE received in project compiled with cmake .. -DCMAKE_BUILD_TYPE=Debug -DWANT_DEBUG_FPE=ON

I had interacted with the drum track by unmuting the kick before the project hung. Technically this was on the lv2-ui branch (f230921) and with my own stuff on top but nothing of this is really related to the compressor so I belieave the issue belongs on master. Unfortunately the FPE flags don't report on precisely which floating point error it is and I don't have all the related variables to step through the math of it.

Here is where it happens:

float CompressorEffect::msToCoeff(float ms)
{
// Convert time in milliseconds to applicable lowpass coefficient
return exp(m_coeffPrecalc / ms);
}

CompressorEffect::msToCoeff() is called from here:

? msToCoeff(2.f * m_compressorControls.m_attackModel.value() / (crestFactorValTemp))

Steps To Reproduce

I haven't been able to reproduce the issue.

Logs

Thread 37 "AudioEngine::fi" received signal SIGFPE, Arithmetic exception.
Thread 37 "AudioEngine::fi" received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7fff797fc640 (LWP 9821)]
xflow (sign=0, y=inf) at ../sysdeps/ieee754/dbl-64/math_err.c:41
41	../sysdeps/ieee754/dbl-64/math_err.c: No such file or directory.
(gdb) bt full
#0  xflow (sign=0, y=inf) at ../sysdeps/ieee754/dbl-64/math_err.c:41
#1  0x00007ffff5fd6f03 in __GI___exp (x=74658594816) at ./w_exp_template.c:32
        z = 
#2  0x00007fff78599657 in lmms::CompressorEffect::msToCoeff(float) (this=0x5555593dd680, ms=-6.68196618e-13) at /home/zonkmachine/builds/lmmsold/lmms/plugins/Compressor/Compressor.cpp:100
#3  0x00007fff7859aaf9 in lmms::CompressorEffect::processAudioBuffer(std::array*, short) (this=0x5555593dd680, buf=0x5555591ba140, frames=256)
    at /home/zonkmachine/builds/lmmsold/lmms/plugins/Compressor/Compressor.cpp:333
        crestFactorValTemp = -1.79737524e+13
        att = 1.72174845e+16
        inputValue = 0.337529868
        t = 0.337529868
        scVal = 0.337529868
        currentPeakDbfs = -9.44711876
        i = 0
        drySignal = {_M_elems = {-0.360438466, -0.360438466}}
        s = {_M_elems = {-0.360438466, -0.360438466}}
        temp1 = -0.361685067
        delayedDrySignal = {_M_elems = {-0.361685067, -0.361685067}}
        temp2 = -0.361685067
        f = 164
        outSum = 28.4061737
        d = 0.50999999
        w = 0.48999998
        lOutPeak = 0
        rOutPeak = 0
        lInPeak = 0
        rInPeak = 0
        midside = false
        peakmode = false
        inBalance = 0
        outBalance = 0
        limiter = false
        blend = 1
        stereoBalance = 0
        autoMakeup = false
        stereoLink = 1
        audition = false
        feedback = false
        lookahead = false
#4  0x000055555588de2e in lmms::EffectChain::processAudioBuffer(std::array*, short, bool) (this=0x55555a74aca0, _buf=0x5555591ba140, _frames=256, hasInputNoise=true)
    at /home/zonkmachine/builds/lmmsold/lmms/src/core/EffectChain.cpp:201
        effect = @0x555558ed78e0: 0x5555593dd680
        __for_range = std::vector of length 1, capacity 1 = {0x5555593dd680}
        __for_begin = 0x5555593dd680
        __for_end = 0x0
        moreEffects = false
#5  0x0000555555899110 in lmms::MixerChannel::doProcessing() (this=0x55555a74ac90) at /home/zonkmachine/builds/lmmsold/lmms/src/core/Mixer.cpp:172
        v = 0.451000035
        peakSamples = {left = 0, right = 0}
        fpp = 256
        __PRETTY_FUNCTION__ = "virtual void lmms::MixerChannel::doProcessing()"

Screenshots / Minimum Reproducible Project

Minimal save of the project: compressor-sigfpe.mmp.txt

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

  • I have searched all existing issues and confirmed that this is not a duplicate.
@zonkmachine
Copy link
Member Author

@LostRobotMusic

@LostRobotMusic
Copy link
Contributor

I can't reproduce the bug, but I fixed it anyway in #7343.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants