[PD] [expr] external crashing pd

Miller Puckette msp at ucsd.edu
Tue May 20 21:44:10 CEST 2014


I just now patched the Pd source to fix this (simply by enforcing the
maximum number of $ args expr can deal with).  The patch is from pd_l2orc.

It will take a while for this to perclate to compiled versions of Pd but
you can 'git' the source and get the fix now if you want.

Of course it would be cool if expr could take more arguments.  I don't know
if there are hidden gotchas there or not.

BTW the expr code I believe is a direct descendent from the original
expr that appeared in Max about 1988.  Not bad for code longevity :)

cheers
Miller

On Tue, May 20, 2014 at 11:08:19AM -0700, Kim Cascone wrote:
> >-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2014-05-16
> >21:12, Kim Cascone wrote:
> >>two situations are crashing pd:
> >>
> >>- when I try to change an expression in the object, like multiply
> >>a ratio by 2 or something it crashes pd
> >unable to reproduce.
> ok thanks for checking :)
> 
> does anyone else work on Mint 14 using [0-43.4-extended<
> ???
> if so, could you test this by editing the contents of the [expr]
> external in the patch I provided, i.e., make the app crash?
> 
> >
> >>- when I attempt to create 10 ratio divisions with outlets (try
> >>adding one to the patch I've attached below) it crashes the app as
> >>well
> >>
> >>is this a known bug?
> >kind of.
> >looking at the sources of expr i see (extra/expr~/vexp.h):
> >
> ><snip>
> >/*
> >  * Currently the maximum number of variables (inlets) that are supported
> >  * is 10.
> >  */
> >#define MAX_VARS        9
> ></snip>
> >
> >and later (showing that not only the "inlets" are limited, but also
> >the number of outlets is hardcoded to MAX_VARS):
> ><snap>
> >   t_outlet *exp_outlet[MAX_VARS];
> ></snap>
> >
> >so you cannot have more than 9 inlets.
> >expr should not crash though, and instead print something to the
> >pd-console, that tells you about that problem.
> yeah - rather impolite that this bug takes down the entire app when
> attempting to add a 10th outlet
> :\
> 
> 
> >
> >so for now, my hint would be to not use [expr] and instead do explicit
> >patching.
> >in your case this is pretty straightforward (see attached patch...)
> will use multiple [expr]'s as a workaround until this is fixed
> 
> thanks for your help!
> kc
> 
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list



More information about the Pd-list mailing list