<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="">Seems to work in libpd_init(). Thanks<div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">--------<br class="">Dan Wilcox<br class=""><a href="https://twitter.com/danomatika" class="">@danomatika</a><br class=""><a href="http://danomatika.com" class="">danomatika.com</a><br class=""><div class=""><a href="http://robotcowboy.com" class="">robotcowboy.com</a></div></div>

</div>
<br class=""><div style=""><blockquote type="cite" class=""><div class="">On Sep 24, 2016, at 11:35 AM, Dan Wilcox <<a href="mailto:danomatika@gmail.com" class="">danomatika@gmail.com</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="">Thanks. Good catch! I’ll try it now.<div class=""><br class=""><div class="">
<div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">--------<br class="">Dan Wilcox<br class=""><a href="https://twitter.com/danomatika" class="">@danomatika</a><br class=""><a href="http://danomatika.com/" class="">danomatika.com</a><br class=""><div class=""><a href="http://robotcowboy.com/" class="">robotcowboy.com</a></div></div>

</div>
<br class=""><div style="" class=""><blockquote type="cite" class=""><div class="">On Sep 24, 2016, at 11:34 AM, Pierre Guillot <<a href="mailto:guillotpierre6@gmail.com" class="">guillotpierre6@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi Dan, </div><div class="">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 class=""><div class="gmail_quote">2016-09-24 19:26 GMT+02:00 Dan Wilcox <span dir="ltr" class=""><<a href="mailto:danomatika@gmail.com" target="_blank" class="">danomatika@gmail.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Digging further, looks like sys_zoomfontwidth() & sys_zoomfontheight() are returning 0 in glist_fontwith()/glist_<wbr class="">fontheight().<div class=""><span class=""><br class=""><div class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class="">--------<br class="">Dan Wilcox<br class=""><a href="https://twitter.com/danomatika" target="_blank" class="">@danomatika</a><br class=""><a href="http://danomatika.com/" target="_blank" class="">danomatika.com</a><br class=""><div class=""><a href="http://robotcowboy.com/" target="_blank" class="">robotcowboy.com</a></div></div>

</div>
<br class=""></span><div class=""><div class="h5"><div class=""><blockquote type="cite" class=""><div class="">On Sep 24, 2016, at 11:20 AM, Dan Wilcox <<a href="mailto:danomatika@gmail.com" target="_blank" class="">danomatika@gmail.com</a>> wrote:</div><br class=""><div class=""><div style="word-wrap:break-word" class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Adding the following before the findx & findy math works as a quick fix to keep the divide by zero error:</div><div class=""><br class=""></div><div class="">if (fontwidth <= 0) fontwidth = 1;</div><div class="">if (fontheight <= 0) fontheight = 1;<br class=""><div class=""><br class=""></div><div class="">I’m wondering if there is a better way to catch this...</div><div class=""><br class=""><div class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">--------<br class="">Dan Wilcox<br class=""><a href="https://twitter.com/danomatika" target="_blank" class="">@danomatika</a><br class=""><a href="http://danomatika.com/" target="_blank" class="">danomatika.com</a><br class=""><div class=""><a href="http://robotcowboy.com/" target="_blank" class="">robotcowboy.com</a></div></div>

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