When trying to update my trunk image I got problems with StrikeFont
useUnderscore. It seems to me that when a characterToGlyphMap is'nt there StrikeFont try to create one with createCharacterToGlyphMap but this does'nt seem to happen on my system so code break on 'nil' .... This is what I understand..may be I'm totaly wrong. ============= Error: Instances of UndefinedObject are not indexable 6 August 2009 11:37:20.388 am VM: Mac OS - a SmalltalkImage Image: Squeak3.10.2 [latest update: #7179] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /Users/ray1/Documents/PROGRAMMATION/ATELIER TRUNK/ Squeak3102Trunk Trusted Dir /foobar/tooBar/forSqueak/bogus Untrusted Dir /Users/ray1/Library/Preferences/Squeak/Internet/My Squeak UndefinedObject(Object)>>error: Receiver: nil Arguments and temporary variables: aString: 'Instances of UndefinedObject are not indexable' Receiver's instance variables: nil UndefinedObject(Object)>>errorNotIndexable Receiver: nil Arguments and temporary variables: Receiver's instance variables: nil UndefinedObject(Object)>>at:put: Receiver: nil Arguments and temporary variables: index: 96 value: 129 Receiver's instance variables: nil StrikeFont>>useUnderscore Receiver: a StrikeFont(Japanese10 12) Arguments and temporary variables: Receiver's instance variables: characterToGlyphMap: nil xTable: a SparseLargeTable(-1 0 12 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1...etc... glyphs: Form(225480x12x1) name: 'Japanese10' type: 0 minAscii: 92 maxAscii: 65533 maxWidth: 12 strikeLength: nil ascent: 10 descent: 2 xOffset: nil raster: nil subscript: -3 superscript: 2 emphasis: 0 derivativeFonts: #(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil ...etc... pointSize: 9 fallbackFont: nil charIndex: nil --- The full stack --- UndefinedObject(Object)>>error: UndefinedObject(Object)>>errorNotIndexable UndefinedObject(Object)>>at:put: StrikeFont>>useUnderscore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [] in StrikeFont class>>useUnderscore Array(SequenceableCollection)>>do: StrikeFont class>>useUnderscore StrikeFont class>>installDejaVu UndefinedObject>>DoIt Compiler>>evaluate:in:to:notifying:ifFail:logged: Compiler class>>evaluate:for:notifying:logged: Compiler class>>evaluate:for:logged: Compiler class>>evaluate: MCPostscriptDefinition(MCScriptDefinition)>>evaluate MCPostscriptDefinition>>postload MCPostscriptDefinition(MCDefinition)>>postloadOver: [] in [] in [] in MCPackageLoader>>basicLoad [] in [] in OrderedCollection(SequenceableCollection)>>do:displayingProgress: OrderedCollection(SequenceableCollection)>>withIndexDo: [] in OrderedCollection(SequenceableCollection)>>do:displayingProgress: [] in [] in ProgressInitiationException>>defaultMorphicAction BlockClosure>>on:do: [] in ProgressInitiationException>>defaultMorphicAction BlockClosure>>ensure: ProgressInitiationException>>defaultMorphicAction ProgressInitiationException>>defaultAction UndefinedObject>>handleSignal: MethodContext(ContextPart)>>handleSignal: MethodContext(ContextPart)>>handleSignal: MethodContext(ContextPart)>>handleSignal: MethodContext(ContextPart)>>handleSignal: ProgressInitiationException(Exception)>>signal ProgressInitiationException>>display:at:from:to:during: ProgressInitiationException class>>display:at:from:to:during: ByteString(String)>>displayProgressAt:from:to:during: OrderedCollection(SequenceableCollection)>>do:displayingProgress: [] in [] in MCPackageLoader>>basicLoad BlockClosure>>on:do: [] in MCPackageLoader>>basicLoad BlockClosure>>ensure: MCPackageLoader>>basicLoad [] in MCPackageLoader>>loadWithNameLike: [] in MCPackageLoader>>useChangeSetNamed:during: BlockClosure>>ensure: MCPackageLoader>>useChangeSetNamed:during: MCPackageLoader>>useNewChangeSetNamedLike:during: MCPackageLoader>>loadWithNameLike: MCThreeWayMerger(MCMerger)>>loadWithNameLike: MCVersionMerger>>mergeWithNameLike: MCVersionMerger class>>mergeVersion: MCDiffyVersion(MCVersion)>>merge [] in [] in MCConfiguration>>upgrade BlockClosure>>on:do: [] in MCConfiguration>>upgrade [] in MCConfiguration>>depsSatisfying:versionDo:displayingProgress: [] in [] in OrderedCollection(SequenceableCollection)>>do:displayingProgress: OrderedCollection(SequenceableCollection)>>withIndexDo: [] in OrderedCollection(SequenceableCollection)>>do:displayingProgress: [] in [] in ProgressInitiationException>>defaultMorphicAction BlockClosure>>on:do: [] in ProgressInitiationException>>defaultMorphicAction -- and more not shown -- |
Raymond Asselin wrote:
> When trying to update my trunk image I got problems with StrikeFont > useUnderscore. > It seems to me that when a characterToGlyphMap is'nt there StrikeFont > try to create one with createCharacterToGlyphMap but this does'nt seem > to happen on my system so code break on 'nil' .... > > This is what I understand..may be I'm totaly wrong. Looks like you've got a font named "Japanese10" loaded and it causes this problem (it doesn't have a characterToGlyphMap). You can work around this by doing this: 1) Execute the following before loading updates: StrikeFont allInstances do:[:font| font characterToGlyphMap ifNil:[ font characterToGlyphMap: (0 to: 256 collect:[:i| i]). ]. ]. 2) Load updates. 3) Execute the following after loading updates: StrikeFont allInstances do:[:font| font maxAscii > 256 ifTrue:[ font characterToGlyphMap: nil. ]. ]. This should get you through the updates; a proper fix will have to be devised. Thanks for reporting the problem! Cheers, -Andreas |
Le 09-08-06 à 12:13, Andreas Raab a écrit : > StrikeFont allInstances do:[:font| > font characterToGlyphMap ifNil:[ > font characterToGlyphMap: (0 to: 256 collect:[:i| i]). > ]. > ]. as #to:collect: does not exist on my system, StrikeFont allInstances do:[:font| font characterToGlyphMap ifNil:[ font characterToGlyphMap: ((0 to: 256) collect:[:i| i]). ]. ]. works better... Thank you very much this snippet of code solve my problem. But I still does not understand how that japanese font went there! This was a super fast answer... :) |
Le 09-08-06 à 12:31, Raymond Asselin a écrit : > > Le 09-08-06 à 12:13, Andreas Raab a écrit : > >> StrikeFont allInstances do:[:font| >> font characterToGlyphMap ifNil:[ >> font characterToGlyphMap: (0 to: 256 collect:[:i| i]). >> ]. >> ]. snip... > Thank you very much this snippet of code solve my problem. > But I still does not understand how that japanese font went there! > > This was a super fast answer... :) Just to be sure to understand correctly ... ===== createCharacterToGlyphMap "Private. Create the character to glyph mapping for a font that didn't have any before. This is basically equivalent to what the former setStopCondition did, only based on indexes." maxAscii < 256 ifTrue: [^ (1 to: 256) collect: [:i | i - 1]]. ^ nil. ===== is not applied on fonts where maxAscii is > 255 as in Japanese fonts thus must be changed ? |
In reply to this post by Andreas.Raab
Hi Folks,
Even if what Andreas says is right, the problem was made evident by me #useUnderscore on StrikeFont allInstances during the install of DejaVu. This is a mistake. Please update from the trunk again. This will set the underscore and caret glyphs only for the new fonts, and will fix the characterToGlyphMap that could be recently been broken by me on the rest. Cheers, Juan Vuletich Andreas Raab wrote: > Raymond Asselin wrote: >> When trying to update my trunk image I got problems with StrikeFont >> useUnderscore. >> It seems to me that when a characterToGlyphMap is'nt there StrikeFont >> try to create one with createCharacterToGlyphMap but this does'nt >> seem to happen on my system so code break on 'nil' .... >> >> This is what I understand..may be I'm totaly wrong. > > Looks like you've got a font named "Japanese10" loaded and it causes > this problem (it doesn't have a characterToGlyphMap). You can work > around this by doing this: > > 1) Execute the following before loading updates: > > StrikeFont allInstances do:[:font| > font characterToGlyphMap ifNil:[ > font characterToGlyphMap: (0 to: 256 collect:[:i| i]). > ]. > ]. > > 2) Load updates. > > 3) Execute the following after loading updates: > > StrikeFont allInstances do:[:font| > font maxAscii > 256 ifTrue:[ > font characterToGlyphMap: nil. > ]. > ]. > > This should get you through the updates; a proper fix will have to be > devised. Thanks for reporting the problem! > > Cheers, > -Andreas > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.392 / Virus Database: 270.13.45/2285 - Release Date: 08/06/09 05:57:00 > > |
Free forum by Nabble | Edit this page |