<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hmm.  I'll look to see if there is a better fix.<div><br></div><div>- Russell</div><div><br><div><div>On 24/07/2009, at 1:26 PM, Chris Double wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="background-color: rgb(255, 255, 255); "><div id="ygrp-mlmsg" style="font-size: 13px; font-family: arial, helvetica, clean, sans-serif; width: 655px; position: relative; "><div id="ygrp-msg" style="line-height: 1.22em; width: 470px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 25px; padding-bottom: 0px; padding-left: 0px; float: left; z-index: 1; "><div id="ygrp-text" style="line-height: 1.22em; font-family: Georgia; "><p style="line-height: 1.22em; margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; ">I sometimes get a crash in the UI running under Linux due to a font<br style="line-height: 1.22em; ">not being available. The crash prints in the console:<br style="line-height: 1.22em; "><br style="line-height: 1.22em; ">Error: could not load substitute font:<br style="line-height: 1.22em; ">-*-times-medium-<wbr style="line-height: 1.22em; ">r-normal-<wbr style="line-height: 1.22em; ">-9-*-*-*-<wbr style="line-height: 1.22em; ">*-*-*-*.<br style="line-height: 1.22em; ">Receiver is: a x11Globals fontDictionary.<br style="line-height: 1.22em; ">UI step failed twice in Self 1(type: worldMorph) -- starting debugger<br style="line-height: 1.22em; ">in new world<br style="line-height: 1.22em; ">Could not open display "localhost:0.<wbr style="line-height: 1.22em; ">0", error: primitiveFailedErro<wbr style="line-height: 1.22em; ">r<br style="line-height: 1.22em; ">1. Try Again<br style="line-height: 1.22em; ">2. Try Local Display<br style="line-height: 1.22em; ">3. Give Up<br style="line-height: 1.22em; ">[Type the number of your selection]<br style="line-height: 1.22em; "><br style="line-height: 1.22em; ">None of the available options allow resuming since the same error<br style="line-height: 1.22em; ">continuously occurs. It seems that the requested font is not available<br style="line-height: 1.22em; ">in the size of 9 points,<br style="line-height: 1.22em; "><br style="line-height: 1.22em; ">The easiest way I can reproduce it is to evaluate something like 'foo'<br style="line-height: 1.22em; ">in a shell in the UI, where 'foo' does not exist. The debugger pops up<br style="line-height: 1.22em; ">and expanding the stack causes the error.<br style="line-height: 1.22em; "><br style="line-height: 1.22em; ">As a temporary workaround I modified the method<br style="line-height: 1.22em; ">'structForFontSpec:<wbr style="line-height: 1.22em; ">WindowCanvas:<wbr style="line-height: 1.22em; ">' in 'traits xFontDictionary' so that<br style="line-height: 1.22em; ">when it tries to use the substitute font it specifically uses a size<br style="line-height: 1.22em; ">of '10' - one I know that exists on my system.<br style="line-height: 1.22em; "><br style="line-height: 1.22em; ">- substituteName: (fullNameFor: x11Globals scalableFont times Size:<br style="line-height: 1.22em; ">fSpec size).<br style="line-height: 1.22em; ">+ substituteName: (fullNameFor: x11Globals scalableFont times Size: 10).<br style="line-height: 1.22em; "><br style="line-height: 1.22em; ">This stops the crash and lets me use the debugger and other tools (The<br style="line-height: 1.22em; ">inspectors in the Smalltalk application)<wbr style="line-height: 1.22em; ">,<br style="line-height: 1.22em; "><br style="line-height: 1.22em; ">Chris.<br style="line-height: 1.22em; ">--<span class="Apple-converted-space"> </span><br style="line-height: 1.22em; "><a href="http://www.bluishcoder.co.nz" style="line-height: 1.22em; color: rgb(30, 102, 174); font-family: Verdana; ">http://www.bluishco<wbr style="line-height: 1.22em; ">der.co.nz</a><br style="line-height: 1.22em; "></p></div><div width="1" style="line-height: 1.22em; color: white; clear: both; "></div></div></span></blockquote></div><br></div></body></html>