[PD-dev] signal nan values

Andrew Hassall a.r.hassall at gmail.com
Fri Apr 15 09:43:58 CEST 2011


On Thu, Apr 14, 2011 at 1:55 PM, katja <katjavetter at gmail.com> wrote:
>
> Andrew Hassal wrote:
>>> I'm writing 2 externals that implement an LPC algorithm, to make the
>>> results as acurate as possible I need to record some values from the
>>> previous frame, I've found that after doing this I sometimes as far as
>>> I can tell randomly get the output values of nan (for the values in
>>> the output signal vector)
> ...
>>> It happens at random times but it seems that I can make it happen
>>> when I open a patch with a graph in it (whilst the signal is running)
>
> Did you already find the answer? The fact that the problem specially arises
> when you open a patch with a graph in it, may indicate that your code is
> accessing memory locations which are not allocated to it. Stand alone
> executables would by definition exit with segmentation fault, but with Pd
> externals I have experienced more than once that the problem was only
> revealed in a conflict with another object in the Pd process, notably when
> using multiple instances of the newly written class.
>
> Katja

No not yet, it doesn't specifically just appear when there is a graph,
but it virtually always triggers it when a patch with a graph is
opened, but not immediately often the graph flashes up a few blocks of
signal then it breaks.
I'm not currently using multiple instances, but is there any easy way
of testing if I'm using memory not allocated to the external? I've
tried to do some basic tests and they all seem to be working
correctly, as far as I can tell.

Andy



More information about the Pd-dev mailing list