dfilaretti / WeirdDrums

Open Source Drum Synth plugin
MIT License
18 stars 3 forks source link

Random crash in FL studio #75

Open dfilaretti opened 5 years ago

dfilaretti commented 5 years ago

CPU meter seems to spike up to 100% (red) for an instant, then everything freezes.

Sometimes it happens, sometimes it doesn't.

PROBABLY introduced after #33 (exponential envelopes) but not sure honestly, since it appears to be a rare issue.

dfilaretti commented 5 years ago

Not 100% sure if the following is related to this: I managed to crash it in Juce's Plugin Host (after a good 10 mins of playing). It appears we get stuck in a loop in juce_Phase.h, following code:

    Type advance (Type increment) noexcept
    {
        jassert (increment >= 0); // cannot run this value backwards!

        auto last = phase;
        auto next = last + increment;

        while (next >= MathConstants<Type>::twoPi)
            next -= MathConstants<Type>::twoPi; // ************** LOOP HERE ****************

        phase = next;
        return last;
    }