Below is my setup method. This object generates rhythmic phrases so it accesses the time scheduler in Pd as per the code [metro] or [delay], and outputs a bang. Perhaps this could be where it goes wrong?
Thanks for your time and help.
-Rob
-----------
void rhynamo_setup(void) {
rhynamo_class = class_new(gensym("rhynamo"),
(t_newmethod)rhynamo_new,
(t_method)delay_free, sizeof(t_rhynamo),
CLASS_DEFAULT,
A_GIMME, 0);
post("[rhynamo] a rhythmic generator v .02 : by Robert Esler 2014");
class_addbang (rhynamo_class, rhynamo_bang);
class_addfloat(rhynamo_class, (t_method)rhynamo_generate);
class_addsymbol(rhynamo_class, (t_method)rhynamo_set);
class_addmethod(rhynamo_class,
(t_method)rhynamo_set, gensym("set"), A_DEFSYMBOL, A_DEFFLOAT, 0);
class_addmethod(rhynamo_class,
(t_method)rhynamo_generate, gensym("generate"), A_FLOAT, 0);
class_sethelpsymbol(rhynamo_class, gensym("help-rhynamo"));
}
-------------Date: Thu, 27 Feb 2014 14:15:05 -0600From: Charles Z Henry <czhenry@gmail.com>Subject: Re: [PD] Strange behavior using custom externalTo: Robert Esler <robert@urbanstew.org>Cc: pd-list <pd-list@iem.at>Message-ID:Content-Type: text/plain; charset="utf-8"The difference probably indicates that something is going on in your_setup() function. Once you've loaded a class in a patch, it stays inmemory. If you close the patch, and open another patch without the class,you may still see the effects---but if you close pd, and reopen withoutusing the class, you should not see the effects at all.The backtrace shows a seg fault from calls in "binbuf_eval", which is thecode related to parsing and loading a patch. You might just have passed astruct as an argument, where it's expected to be an element of that struct.Although.... pointer type mismatches will definitely throw a compilerwarning you should have seen already. Would you post the _setup() function?Chuck