[PD-dev] [ pure-data-Bugs-1469910 ] Stack overflow with Data Structure arrays saved in patch

IOhannes m zmoelnig zmoelnig at iem.at
Tue Apr 18 15:33:19 CEST 2006


hi.

SourceForge.net wrote:
> Initial Comment:
> Instances of data structure arrays that are saved in a
> patch can make that patch impossible to open again, if
> they are above a certain size. With attached patch, I
> can create and an array "cells" in the struct "ca" with
> up to 20 times 20 elements, 21 times 21 elements will
> give a message stack overflow on loading the patch.
> 
> Editing by hand or clearing the subpatch before saving
> can fix the patch, but it is not real solution.
> 
> The attached two patches show one patch with an empty
> subpatch (array-bug-empty.pd) and another one with an
> array of 21*21==441 elements, which I cannot open anymore.
> 
> Pd versions tested include 0.39.2 on Windows and
> current CVS on Linux, all show the same behaviour.

hmm, the array-bug-full.pd is very much the same as array-bug-empty.pd

anyhow, a quick workaround for this problem would be to rise the
MSTACKSIZE (in m_binbuf.c:383) to a value that fits your needs.
this however is no solution, as the problem will be just moved to some
point further away.

on the long run, we should try to not have a MSTACKSIZE at all but
rather detect the size needed at runtime. (i have no idea though, which
speed penalty this means)

mfg.asd.r
IOhannes




More information about the Pd-dev mailing list