[PD] expr compatibility with libdir format

Miller Puckette msp at ucsd.edu
Sun Oct 12 23:41:42 CEST 2014


HI all -

I tried making expr take just the filename without the path in the test,
and got an unintended consequence I can't understand (if you make both an 
expr and an expr~, for instance, the .so gets loaded twice).

So I backed off from that but t least fied the error message.  so for now
at least, in vanilla at least, it isn't possible to invoke expr (etc.)
via path.

I don't know if there are ther external objects like expr in that there
are symlinks (or copies) of the binary by different names that the object
uses to disambiguate itself.  I rather doubt it, but OTOH there's a lot of 
stuff out there.

cheers
Miller

On Sun, Oct 12, 2014 at 01:52:23PM -0700, Jonathan Wilkes via Pd-list wrote:
> Hi list,
> It seems expr isn't compatible with the libdir format.  The code in expr_new of vexp_if.c checks for unprefixed creator names, so if the user typed "expr~/expr~" or "extra/expr~" or even "the_libdir_that_I_put_in_my_patch_directory/expr~", the logic defaults to creating an expr_class instead of an expr_tilde_class.  It also outputs an error.
> 
> 
> Also, the error it outputs has a bug itself-- there is no corresponding variable for the %s in this line:
>                 post("expr_new: bad object name '%s'");
> 
> That will often cause a crash on 32-bit systems.  I wasn't able to crash on a 64-bit system, although that %s will output a bunch of garbage characters to the Pd window.
> 
> Obviously expr (and probably a lot of other code) expect the creator to be the same as what the class author specified in the setup routine.  So Pd should deliver that symbol without the libdir prefix to the *_new function for that class.
> 
> I tested on Pd 0.43 from Sourceforge on a 32-bit Wheezy machine, plus Pd-l2ork which forked at 0.42.  Has Pd Vanilla addressed this problem since then?
> 
> -Jonathan

> _______________________________________________
> 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