[etoys-notify] [JIRA] Created: (SQ-880) Possible infinite loop in FixedFaceFont
Xin Wang (JIRA)
tracker at squeakland.org
Wed Oct 27 10:31:02 EDT 2010
Possible infinite loop in FixedFaceFont
---------------------------------------
Key: SQ-880
URL: http://tracker.squeakland.org/browse/SQ-880
Project: squeakland
Issue Type: Bug
Components: etoys
Reporter: Xin Wang
Attachments: FixedFaceFont-possible-infinite-loop-bugfix.xinwang.1.cs
How to reproduce:
1. Using following code to set Arial as fallback font of BistreamVeraSans.
TTCFont newTextStyleFromTTFile: 'C:\Windows\Fonts\arial.ttf'.
(TTCFont allInstances select: [ :a | a familyName = 'BitstreamVeraSans' ]) do: [:i | i setupDefaultFallbackFontTo: (TextStyle named: 'Arial')].
2. Open "choose language " menu, then Etoys will get stuck.
It is caused by a circular reference of fallbackFont. In circumstance of previous example, Arial is fallbackFont of BitstreamVeraSans, and a FixedFaceFont instance with BitstreamVeraSans as baseFont is fallbackFont of Arial. When TTCFont>>ascent is called, it also asks fallbackFont's ascent, then Etoys get into an infinite loop.
Attached changeset change FixedFaceFont>>fontSize: to do a shallowCopy of baseFont, and then set its fallbackFont to be nil, so that TTCFont>>ascent call can be returned.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.squeakland.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the etoys-notify
mailing list