<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">The specific line in libpd is:<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">int</span> canvas_suspend_dsp(<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">void</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">{</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">    </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">int</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> rval = </span>pd_this<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">-></span>pd_dspstate<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">; <- This one gives the EXC_BAD_ACCESS</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span> (rval) <span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">canvas_stop_dsp</span>();</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">return</span> (rval);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">}</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">in pure-data/src/g_canvas.c</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On 19 Feb 2016, at 06:55, Matti Viljamaa <<a href="mailto:mviljamaa@kapsi.fi" class="">mviljamaa@kapsi.fi</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’m trying to test libpd out by merely having it read a patch with [osc~ 440] -> [dac~]<div class=""><br class=""></div><div class="">I’m currently doing:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>pdengine<span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">new</span><span style="" class=""> </span>pd<span style="" class="">::</span>PdBase<span style="" class="">();</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(79, 129, 135);" class="">  </div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span class="Apple-tab-span" style="white-space:pre">      </span>pdengine<span style="" class="">-></span><span style="color: rgb(49, 89, 93);" class="">init</span><span style="" class=""> (</span><span style="color: rgb(0, 132, 0);" class="">/*NInChannels()*/</span><span style="" class=""> </span><span style="color: rgb(39, 42, 216);" class="">0</span><span style="" class="">, </span><span style="color: rgb(39, 42, 216);" class="">2</span><span style="" class="">, </span><span style="color: rgb(49, 89, 93);" class="">GetSampleRate</span><span style="" class="">());</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class=""><span class="Apple-tab-span" style="white-space:pre">      </span>patch</span><span style="" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">pdengine</span><span style="" class="">-></span><span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">openPatch</span><span style="" class="">(</span>"testpatches/sine.pd"<span style="" class="">, </span>"."<span style="" class="">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span class="Apple-tab-span" style="white-space:pre">       </span>// audio processing on</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(49, 89, 93);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class=""><span class="Apple-tab-span" style="white-space:pre">   </span>pdengine</span><span style="" class="">-></span>computeAudio<span style="" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">true</span><span style="" class="">);</span></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(49, 89, 93);" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">and so on.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">The line:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px;" class=""><div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(209, 47, 27);" class=""><span style="color: rgb(79, 129, 135);" class=""><span class="Apple-tab-span" style="white-space:pre">     </span>patch</span><span style="" class=""> = </span><span style="color: rgb(79, 129, 135);" class="">pdengine</span><span style="" class="">-></span><span style="color: rgb(49, 89, 93);" class="">openPatch</span><span style="" class="">(</span>"testpatches/sine.pd"<span style="" class="">, </span>"."<span style="" class="">);</span></div><div style="font-family: Menlo; font-size: 11px;" class=""><span style="" class=""><br class=""></span></div><div style="font-family: Menlo; font-size: 11px;" class=""><span style="" class="">gives</span></div><div style="font-family: Menlo; font-size: 11px;" class=""><span style="" class=""><br class=""></span></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Thread 1: EXC_BAD_ACCESS (code=1, address=0x28) on pdengine->openPatch()</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">the testpatches folder exists at “." and contains sine.pd.</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">What’s wrong?</span></font></div></div></div>_______________________________________________<br class=""><a href="mailto:Pd-list@lists.iem.at" class="">Pd-list@lists.iem.at</a> mailing list<br class="">UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" class="">http://lists.puredata.info/listinfo/pd-list</a><br class=""></div></blockquote></div><br class=""></div></body></html>