[BUG] InterpreterSimulator

stéphane ducasse ducasse at iam.unibe.ch
Thu Mar 31 19:24:08 UTC 2005


ned

I do not have the time to try that but thanks this looks great.
By any chance did dan gave you his fix? The last time I saw him he told  
me that while doing the 64bits port
he fixed a lot of problems and since then I tried to chase him so that  
he released these fixes.
So when 3.8 is officially out I will restart, but you could help me  
there :)

Stef

On 31 mars 05, at 20:10, Ned Konz wrote:

> On Thursday 31 March 2005 4:52 am, Noury Bouraqadi wrote:
>
>> I run in Squeak 3.7 full
>> (InterpreterSimulator new openOn: Smalltalk imageName) test
>>
>> But it failed quickly.
>
> Can you give us more details? The stack traces of the intpreter and  
> the stack
> trace of the interpreted image, perhaps (you can get the stack from the
> InterpreterSimulator by calling printStack).
>
>> I searched the web and found that Nathanel alreardy pointed this bug  
>> in
>> may 2004. But, found no fix. Any hint?
>
> Yes. I was able to run the InterpreterSimulator in a recent 3.8g image  
> (using
> a very recent VM) on a stock 3.7 image (prepared as described below)  
> as the
> target image (with an MVC project open in the target image). Other  
> than not
> seeing all the fonts rendered, it worked well enough to debug (very  
> well, if
> you don't need the UI to work). I've attached a screenshot.
>
> I got more or less the same results on a 3.8g target image prepared as  
> below
> (i.e. no fonts displayed).
>
> Follow the process below if you're interested:
>
> I'd recommend trying a smaller image first (with the fonts changed as
> described below). In the target image (the one to be run in the
> InterpreterSimulator):
>
>  Revert the change to Project class>>interruptName: in the  
> LowSpaceWatcherFix
> changeset if you have a recent image.
>
>  Change all the system fonts in the image that you're going to  
> simulate to
> non-Truetype fonts. Close every window and save the image.
>
>  Make a new MVC or Morphic project (MVC will be faster, of course).
>
>  Destroy all the flaps if it's a Morphic project.
>
>  Load the MVCSupport.cs.gz fixes that Yoshiki posted on 14 March if  
> you'd like
> to run MVC and have a recent image.
>
>  Change the desktop background color to something different than the  
> host
> image's desktop color.
>
>  Save and quit.
>
> In the host image:
>
>  First, get a 3.8 image and load the latest VMMaker package for 3.8  
> into it.
>
>  Revert the change in the LowSpaceWatcherFix changeset.
>
>  Save the image.
>
>  Open a Transcript
>
>  Then run the InterpreterSimulator as above on the target image:
>
>   (InterpreterSimulator new openOn: 'myTest.image') test
>
>  or if you run out of memory:
>
>     (InterpreterSimulator new openOn: 'myTest.image' extraMemory:  
> 10000000)
> test
>
> You may have to fiddle with the extraMemory setting.
>
> Everything seems to work more or less well (that is, the  
> InterpreterSimulator
> mostly works and keeps going; there may be some minor problems with
> individual plugins (like for instance the FloatArrayPlugin, which is  
> why I
> suggested to eliminate TrueType fonts).
>
> To find out what's going on:
>
> Interrupt the running simulator using alt-.
>
> Debug the interrrupted simulator.
>
> Select a stack frame that has the InterpreterSimulator as a receiver.
>
> Do-it:
>  self printAllStacks
>
> And you'll see all the stacks in the target image on the Transcript.
>
>
> When I tried it the first time (in a Morphic project, with the default  
> fonts),
> I didn't see a quick failure. It actually ran for a while before  
> having a
> problem.
>
> What I got is a walkback on trying to store a float (which in  
> Smalltalk is 2
> words) into the memory with #longAt:put:
>
> Bitmap(Object)>>error:
> Bitmap(Object)>>errorImproperStore
> Bitmap(Object)>>at:put:
> InterpreterSimulatorLSB(InterpreterSimulator)>>longAt:put:
> CArray>>at:put:
> FloatArrayPlugin>>primitiveAtPut
> InterpreterSimulatorLSB(InterpreterSimulator)>>callExternalPrimitive:
> InterpreterSimulatorLSB(Interpreter)>>primitiveExternalCall
> InterpreterSimulatorLSB(InterpreterSimulator)>>dispatchFunctionPointer:
> InterpreterSimulatorLSB(Interpreter)>>internalExecuteNewMethod
> InterpreterSimulatorLSB(InterpreterSimulator)>>internalExecuteNewMethod
> InterpreterSimulatorLSB(Interpreter)>>commonSend
> InterpreterSimulatorLSB(Interpreter)>>normalSend
> InterpreterSimulatorLSB(Interpreter)>>bytecodePrimAtPut
> InterpreterSimulatorLSB(InterpreterSimulator)>>dispatchOn:in:
> InterpreterSimulatorLSB(InterpreterSimulator)>>test
>
> And the stack of the interpreter is:
>
> 16r0269FA8C MatrixTransform2x3>>#a11:
> 16r0269FA30 MatrixTransform2x3>>#setScale:
> 16r0269F9D4 MatrixTransform2x3 class>>#withScale:
> 16r0269FCF0
> TTGlyph>>#asFormWithScale:ascender:descender:fgColor:bgColor:depth: 
> replaceColor:lineGlyph:lingGlyphWidth:empha
> 16r0269FBF4
> TTGlyph>>#asFormWithScale:ascender:descender:fgColor:bgColor:depth: 
> replaceColor:
> 16r0269F978
> TTGlyph>>#asFormWithScale:ascender:descender:fgColor:bgColor:depth:
> 16r0269F2E8 TTCFont>>#computeForm:
> 16r0269F28C TTCFont>>#widthOf:
> 16r0269F230 AbstractFont>>#widthOfString:from:to:
> 16r0269F1D4 AbstractFont>>#widthOfString:
> 16r0269F178 StringMorph>>#measureContents
> 16r0269F0C0 StringMorph>>#fitContents
> 16r0269F064 StringMorph>>#font:emphasis:
> 16r0269E358 SystemWindow>>#initializeLabelArea
> 16r0269D3A0 SystemWindow>>#initialize
> 16r0269D344 PreDebugWindow>>#initialize
> 16r0269D2E8 SystemWindow class>>#labelled:
> 16r02656684 Debugger>>#buildMorphicNotifierLabelled:message:
> 16r02656604 Debugger>>#openNotifierContents:label:
> 16r02656338 [] in Debugger  
> class>>#openOn:context:label:contents:fullView:
> 16r026562DC BlockContext>>#on:do:
> 16r02656118 [] in Debugger  
> class>>#openOn:context:label:contents:fullView:
> 16r02656214 [] in BlockContext>>#newProcess
>
> -- 
> Ned Konz
> http://bike-nomad.com/squeak/
> <interpreterSimulator.png>




More information about the Squeak-dev mailing list