<div dir="ltr"><div>Hi Dan, </div><div>I think I had the same issue with my plugin and PD 0.47. If I remember well, the solution was to call "sys_startgui(NULL)" after "pd_init()" (it should be in libpd_init() I think).</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-24 19:26 GMT+02:00 Dan Wilcox <span dir="ltr"><<a href="mailto:danomatika@gmail.com" target="_blank">danomatika@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Digging further, looks like sys_zoomfontwidth() & sys_zoomfontheight() are returning 0 in glist_fontwith()/glist_<wbr>fontheight().<div><span class=""><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">--------<br>Dan Wilcox<br><a href="https://twitter.com/danomatika" target="_blank">@danomatika</a><br><a href="http://danomatika.com" target="_blank">danomatika.com</a><br><div><a href="http://robotcowboy.com" target="_blank">robotcowboy.com</a></div></div>

</div>
<br></span><div><div class="h5"><div><blockquote type="cite"><div>On Sep 24, 2016, at 11:20 AM, Dan Wilcox <<a href="mailto:danomatika@gmail.com" target="_blank">danomatika@gmail.com</a>> wrote:</div><br><div><div style="word-wrap:break-word">I’m playing with removing the @synchronized locks in the libpd Obj-C layer since the updates to the libpd ringbuffer seem to be working now.<div><br></div><div>Long story short, I’m only running into one issue: divide by 0s in g_rtext.c rtext_senditup() when opening a file. It seems that the findx & findy computations on line 215 & 216 fails since the previous glist_fontwidth() & glist_fontheight() calls return 0. Could this be an execution order issue where removing the lock is making something happen earlier than it should?</div><div><br></div><div>Adding the following before the findx & findy math works as a quick fix to keep the divide by zero error:</div><div><br></div><div>if (fontwidth <= 0) fontwidth = 1;</div><div>if (fontheight <= 0) fontheight = 1;<br><div><br></div><div>I’m wondering if there is a better way to catch this...</div><div><br><div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">--------<br>Dan Wilcox<br><a href="https://twitter.com/danomatika" target="_blank">@danomatika</a><br><a href="http://danomatika.com/" target="_blank">danomatika.com</a><br><div><a href="http://robotcowboy.com/" target="_blank">robotcowboy.com</a></div></div>

</div>
<br></div></div></div></div></blockquote></div><br></div></div></div></div><br>______________________________<wbr>_________________<br>
Pd-dev mailing list<br>
<a href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a><br>
<a href="https://lists.puredata.info/listinfo/pd-dev" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-dev</a><br>
<br></blockquote></div><br></div>