[self-interest] Font substitution crash in Linux

Russell Allen mail at russell-allen.com
Fri Jul 24 05:59:51 UTC 2009

Hmm.  I'll look to see if there is a better fix.

- Russell

On 24/07/2009, at 1:26 PM, Chris Double wrote:

> I sometimes get a crash in the UI running under Linux due to a font
> not being available. The crash prints in the console:
> Error: could not load substitute font:
> -*-times-medium-r-normal--9-*-*-*-*-*-*-*.
> Receiver is: a x11Globals fontDictionary.
> UI step failed twice in Self 1(type: worldMorph) -- starting debugger
> in new world
> Could not open display "localhost:0.0", error: primitiveFailedError
> 1. Try Again
> 2. Try Local Display
> 3. Give Up
> [Type the number of your selection]
> None of the available options allow resuming since the same error
> continuously occurs. It seems that the requested font is not available
> in the size of 9 points,
> The easiest way I can reproduce it is to evaluate something like 'foo'
> in a shell in the UI, where 'foo' does not exist. The debugger pops up
> and expanding the stack causes the error.
> As a temporary workaround I modified the method
> 'structForFontSpec:WindowCanvas:' in 'traits xFontDictionary' so that
> when it tries to use the substitute font it specifically uses a size
> of '10' - one I know that exists on my system.
> - substituteName: (fullNameFor: x11Globals scalableFont times Size:
> fSpec size).
> + substituteName: (fullNameFor: x11Globals scalableFont times Size:  
> 10).
> This stops the crash and lets me use the debugger and other tools (The
> inspectors in the Smalltalk application),
> Chris.
> -- 
> http://www.bluishcoder.co.nz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20090724/37cb399a/attachment.html>

More information about the Self-interest mailing list