<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="">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="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></div></body></html>