Debugging Help Please (Memory Issues)

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Debugging Help Please (Memory Issues)

Post by ssj71 »

I'm porting the rakarrack plugins as you probably know and keep finding weird memory bugs. Currently I have Ring ported but it consistently segfaults on this line. This part is when the auto-freq option is selected. It filters the input then tried to identify the fundamental frequency. It seems like something is corrupting the instance of the filter. The function is being called here I've been trying to figure out what is going on all day with gdb but I'm hitting a wall. I've found that some of the filters work sometimes so perhaps the bug is in AnalogFilter.C.

Hopefully its something obvious and I'm just being dumb, but if anyone could offer either look into it or offer some extra pointers on how to go about debugging it, I could use a hand.

Thanks.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
tramp
Established Member
Posts: 2347
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 466 times

Re: Debugging Help Please (Memory Issues)

Post by tramp »

Hi

I've a short look, maybe I oversee something, but I miss the call to
void Recognize::schmittInit (int size)
to initialize the internal schmittBuffer and schmittPointer, which are used by schmittS16LE
On the road again.
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: Debugging Help Please (Memory Issues)

Post by ssj71 »

its in the initializer of the Recognize class. https://sourceforge.net/p/rkrlv2/code/c ... Note.C#l67

Thanks for looking. I'll keep trying.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: Debugging Help Please (Memory Issues)

Post by ssj71 »

Whew! Man these bugs can be buggers. Turns out an array was overstepping its bounds in update_freqs. I introduced the bug when I was removing the globals. Fix 3 bugs, introduce 2. Oh well. At least I got it.

Thanks for looking.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
Post Reply