Hi,
I am attempting to use the plugin~ object to load LLADSPA plugins. Unfortunately, it crashes every time PD attempts too free it. Through a suitable application of printfs, it seems each object gets the "free" function (plugin_tilde_free) called twice. Naturally, this causes a crash.
Is there some documentation on the PD externals interface? All I have found are some examples, which do not allow me to determine why a free function might get called on the same object more than once...
Thanks, Andrew
Andrew Archibald writes:
Hi,
I am attempting to use the plugin~ object to load LLADSPA plugins. Unfortunately, it crashes every time PD attempts too free it. Through a suitable application of printfs, it seems each object gets the "free" function (plugin_tilde_free) called twice. Naturally, this causes a crash.
Is there some documentation on the PD externals interface? All I have found are some examples, which do not allow me to determine why a free function might get called on the same object more than once...
sounds funny after all, programming externals is sometimes tricky, because the compiler doesn't tell you that much about mistakes you made. Especially if you use dynamic number of signal channels and the like. Just a guess, I think debugging it may be a little bit of work, but it is definitely worth it.
Guenter
Hi all,
One thing this might be: in your "free" callback you shouldn't call pd_free -- it's the other way around, pd_free() calls your "freeing" function before it deletes the object.
On Tue, Dec 05, 2000 at 03:51:17PM +0100, Guenter Geiger wrote:
Andrew Archibald writes:
Hi,
I am attempting to use the plugin~ object to load LLADSPA plugins. Unfortunately, it crashes every time PD attempts too free it. Through a suitable application of printfs, it seems each object gets the "free" function (plugin_tilde_free) called twice. Naturally, this causes a crash.
Is there some documentation on the PD externals interface? All I have found are some examples, which do not allow me to determine why a free function might get called on the same object more than once...
sounds funny after all, programming externals is sometimes tricky, because the compiler doesn't tell you that much about mistakes you made. Especially if you use dynamic number of signal channels and the like. Just a guess, I think debugging it may be a little bit of work, but it is definitely worth it.
Guenter
Miller,
I know you have been looking for a way to turn off float denormalization on intel chips for a while and this appeared on the linux audio development list the other day:
#ifdef HAVE_FPU_CONTROL_H #include <fpu_control.h> #endif #ifdef HAVE_FPU_CONTROL_H #if __GLIBC_MINOR__ < 1 /* in linux there's <fpu_control.h> with __setfpucw which Clisp calls as __setfpucw(_FPU_IEEE); */ /* this appears to be useful in getting rid of idiotic NaN's */ __setfpucw(_FPU_IEEE); #else #ifndef __alpha__ int __fpu_ieee = _FPU_IEEE; _FPU_SETCW(__fpu_ieee); /* this bugfix thanks to Paul Barton-Davis */ #else int __fpu_ieee = 0; #endif #endif #endif
I think this is from snd.
Karl
| Karl W. MacMillan | | Computer Music Department | | Peabody Institute of the Johns Hopkins University | | karlmac@peabody.jhu.edu | | www.peabody.jhu.edu/~karlmac |
On Tue, Dec 05, 2000 at 09:33:25AM -0800, Miller Puckette wrote:
Hi all,
One thing this might be: in your "free" callback you shouldn't call pd_free -- it's the other way around, pd_free() calls your "freeing" function before it deletes the object.
Thank you. That appears to be the problem. In fact, I think this solves a problem that someone posted about a month or two ago; creation of plugin~ objects fails gracefully now if the name of the plugin is not provided.
Is it safe to call free() on an object constructed with pd_new? If not, how should I arrange for an object to be deleted if the constructor fails?
If anyone is interested, I can post my (small) patches to plugin~ once I've tested it a little better.
Thanks, Andrew
Hi,
I am receiving these notices from your org but didn't request them, could you please unsubscribe me?
Cheers, Barrie
Barrie, Carl and Lillian Frieden-Collins and Ad Hoc Graphics 7 Blaxland Avenue, Leura NSW 2780 Tel + Fax: 02 4784 1224 Mobile: 0409 449 138 Email: adhocgraphics@bigpond.com Website: http://users.bigpond.com/adhocgraphics/
Subject: plugin~ crashes on free Resent-Date: Tue, 05 Dec 2000 15:51:09 +0100 Resent-From: pd-list@iem.mhsg.ac.at Date: Tue, 5 Dec 2000 15:51:17 +0100 From: Guenter Geiger geiger@epy.co.at To: Andrew Archibald archibal@scylla.math.mcgill.ca CC: pd-list@iem.kug.ac.at References: 1
Guenter Geiger wrote:
Andrew Archibald writes:
Hi,
I am attempting to use the plugin~ object to load LLADSPA plugins. Unfortunately, it crashes every time PD attempts too free it. Through a suitable application of printfs, it seems each object gets the "free" function (plugin_tilde_free) called twice. Naturally, this causes a crash.
Is there some documentation on the PD externals interface? All I have found are some examples, which do not allow me to determine why a free function might get called on the same object more than once...
sounds funny after all, programming externals is sometimes tricky, because the compiler doesn't tell you that much about mistakes you made. Especially if you use dynamic number of signal channels and the like. Just a guess, I think debugging it may be a little bit of work, but it is definitely worth it.
Guenter
etc, etc
I've put a linuxppc version of pd-032 up at http://mambo.peabody.jhu.edu/~karlmac/download for anyone who is interested. It is fairly well tested but not garuntees. Most likely you will have to specify -frags n to get it to work with the built-in sound. Hopefully I will get alsa to work on my G4 soon so that I can test full duplex (the only extra card I have is only full duplex with alsa). Is anyone else using linuxppc?
Karl