<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div><div style="font-family: Consolas; font-size: medium; "><p style="margin: 0px; font-size: 11px; font-family: Menlo; ">Below is my setup method. &nbsp;This object generates rhythmic phrases so it accesses the time scheduler in Pd as per the code [metro] or [delay], and outputs a bang. &nbsp;Perhaps this could be where it goes wrong? &nbsp;</p><p style="margin: 0px; font-size: 11px; font-family: Menlo; ">&nbsp; Thanks for your time and help. &nbsp;</p><p style="margin: 0px; font-size: 11px; font-family: Menlo; ">-Rob</p><p style="margin: 0px; font-size: 11px; font-family: Menlo; ">-----------&nbsp;</p><p style="margin: 0px; font-size: 11px; font-family: Menlo; "><span style="color: #bb2ca2">void</span> rhynamo_setup(<span style="color: #bb2ca2">void</span>) {</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; ">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #4f8187">rhynamo_class</span> = <span style="color: #31595d">class_new</span>(<span style="color: #31595d">gensym</span>(<span style="color: #d12f1b">"rhynamo"</span>),</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (<span style="color: #4f8187">t_newmethod</span>)<span style="color: #31595d">rhynamo_new</span>,</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (<span style="color: #4f8187">t_method</span>)<span style="color: #31595d">delay_free</span>, <span style="color: #bb2ca2">sizeof</span>(<span style="color: #4f8187">t_rhynamo</span>),</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #78492a">CLASS_DEFAULT</span>,</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #31595d">A_GIMME</span>, <span style="color: #272ad8">0</span>);</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(209, 47, 27); "><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #31595d">post</span><span style="color: #000000">(</span>"[rhynamo] a rhythmic generator v .02 : by Robert Esler 2014"<span style="color: #000000">);</span></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; ">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #78492a">class_addbang</span>&nbsp; (<span style="color: #4f8187">rhynamo_class</span>, <span style="color: #31595d">rhynamo_bang</span>);</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(79, 129, 135); "><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #78492a">class_addfloat</span><span style="color: #000000">(</span>rhynamo_class<span style="color: #000000">, (</span>t_method<span style="color: #000000">)</span><span style="color: #31595d">rhynamo_generate</span><span style="color: #000000">);</span></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(79, 129, 135); "><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #78492a">class_addsymbol</span><span style="color: #000000">(</span>rhynamo_class<span style="color: #000000">, (</span>t_method<span style="color: #000000">)</span><span style="color: #31595d">rhynamo_set</span><span style="color: #000000">);</span></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(49, 89, 93); "><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span>class_addmethod<span style="color: #000000">(</span><span style="color: #4f8187">rhynamo_class</span><span style="color: #000000">,</span></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (<span style="color: #4f8187">t_method</span>)<span style="color: #31595d">rhynamo_set</span>, <span style="color: #31595d">gensym</span>(<span style="color: #d12f1b">"set"</span>), <span style="color: #78492a">A_DEFSYMBOL</span>, <span style="color: #31595d">A_DEFFLOAT</span>, <span style="color: #272ad8">0</span>);</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(49, 89, 93); "><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span>class_addmethod<span style="color: #000000">(</span><span style="color: #4f8187">rhynamo_class</span><span style="color: #000000">,</span></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (<span style="color: #4f8187">t_method</span>)<span style="color: #31595d">rhynamo_generate</span>, <span style="color: #31595d">gensym</span>(<span style="color: #d12f1b">"generate"</span>), <span style="color: #31595d">A_FLOAT</span>, <span style="color: #272ad8">0</span>);</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(49, 89, 93); "><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span>class_sethelpsymbol<span style="color: #000000">(</span><span style="color: #4f8187">rhynamo_class</span><span style="color: #000000">, </span>gensym<span style="color: #000000">(</span><span style="color: #d12f1b">"help-rhynamo"</span><span style="color: #000000">));</span></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; ">&nbsp; &nbsp; }</p><div>-------------</div></div><div style="font-family: Consolas; font-size: medium; "><br></div><div style="font-family: Consolas; font-size: medium; ">Date: Thu, 27 Feb 2014 14:15:05 -0600</div><div style="font-family: Consolas; font-size: medium; ">From: Charles Z Henry &lt;<a href="mailto:czhenry@gmail.com">czhenry@gmail.com</a>&gt;</div><div style="font-family: Consolas; font-size: medium; ">Subject: Re: [PD] Strange behavior using custom external</div><div style="font-family: Consolas; font-size: medium; ">To: Robert Esler &lt;<a href="mailto:robert@urbanstew.org">robert@urbanstew.org</a>&gt;</div><div style="font-family: Consolas; font-size: medium; ">Cc: pd-list &lt;<a href="mailto:pd-list@iem.at">pd-list@iem.at</a>&gt;</div><div style="font-family: Consolas; font-size: medium; ">Message-ID:</div><div style="font-family: Consolas; font-size: medium; "><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;<a href="mailto:CAPfmNOFA_cprs4Ux0Yg1YY7hFsgrpt79B+FeLj5kzf1FRD0R4Q@mail.gmail.com">CAPfmNOFA_cprs4Ux0Yg1YY7hFsgrpt79B+FeLj5kzf1FRD0R4Q@mail.gmail.com</a>&gt;</div><div style="font-family: Consolas; font-size: medium; ">Content-Type: text/plain; charset="utf-8"</div><div style="font-family: Consolas; font-size: medium; "><br></div><div style="font-family: Consolas; font-size: medium; ">The difference probably indicates that something is going on in your</div><div style="font-family: Consolas; font-size: medium; ">_setup() function.&nbsp;&nbsp;Once you've loaded a class in a patch, it stays in</div><div style="font-family: Consolas; font-size: medium; ">memory.&nbsp;&nbsp;If you close the patch, and open another patch without the class,</div><div style="font-family: Consolas; font-size: medium; ">you may still see the effects---but if you close pd, and reopen without</div><div style="font-family: Consolas; font-size: medium; ">using the class, you should not see the effects at all.</div><div style="font-family: Consolas; font-size: medium; "><br></div><div style="font-family: Consolas; font-size: medium; ">The backtrace shows a seg fault from calls in "binbuf_eval", which is the</div><div style="font-family: Consolas; font-size: medium; ">code related to parsing and loading a patch.&nbsp;&nbsp;You might just have passed a</div><div style="font-family: Consolas; font-size: medium; ">struct as an argument, where it's expected to be an element of that struct.</div><div style="font-family: Consolas; font-size: medium; "><br></div><div style="font-family: Consolas; font-size: medium; ">Although.... pointer type mismatches will definitely throw a compiler</div><div style="font-family: Consolas; font-size: medium; ">warning you should have seen already.&nbsp;&nbsp;Would you post the _setup() function?</div><div style="font-family: Consolas; font-size: medium; "><br></div><div style="font-family: Consolas; font-size: medium; ">Chuck</div></div></body></html>