[squeak-dev] Re: [Vm-dev] [Fwd: StarMorph busted in Cuis 850 + Cog r2361]

Eliot Miranda eliot.miranda at gmail.com
Mon Mar 7 02:16:21 UTC 2011


Hi Juan,

I have a fix.  It was a stack off-by-one (missing pop) bug in the StackToRegisterMappingCogit's store  remote temp compilation.  Alas my Mac doesn't like SFO's free wifi and so I can't commit a fix.  I'll see what I can do @ INRIA.

Thanks for the bug!

Best
Eliot (phone)

On Mar 6, 2011, at 9:26 AM, Juan Vuletich <juan at jvuletich.org> wrote:

> Hi Folks,
> 
> (Steven, I hope you don't mind me forwarding this to public lists)
> 
> I got this bug report from Steven. It is a problem with Cog. This works ok with the interpreter, but fails with Cog. If I copy this method to Squeak trunk, the same happens. Please see that a message is sent to class Point, but it looks as if the receiver is an instance of Float. See that in the trace, it reads "Float(Point class)>>r:degrees:" which makes no sense at all.
> 
> It looks like in this case, a pointer is pointing to the wrong object.
> 
> Something very strange is that evaluating 'StarMorph new openInWorld' seems to work ok, but creating a StarMorph from the 'new morph' menu fails most times (but not always!).
> 
> Any help from VM gurus is greately appreciated. Just copy the method to Squeak and try.
> 
> Cheers,
> Juan Vuletich
> 
> -------- Original Message --------
> As a gesture of appreciation for Cuis, here's a big report of a small bug.  :)
> 
> ===========================================
> 
> Reproduce via 'Add a new morph' -> Widgets -> StarMorph.
> 
> ===========================================
> 
> StarMorph>>initialize from Squeak 4.2 (works)
> 
> initialize
> "initialize the state of the receiver"
> super initialize.
> self
> makeVertices: self defaultSides
> starRatio: self defaultStarRatio
> withCenter: self defaultCenter
> withPoint: self defaultFirstVertex.
> self computeBounds
> 
> StarMorph>>initialize from Cuis (MNU)
> 
> initialize
> "initialize the state of the receiver"
> | pt ext oldR points |
> super initialize.
> ""
> pt := 10 @ 10.
> ext := pt r.
> oldR := ext.
> points := 5.
> vertices := (0 to: 359 by: 360 // points // 2)
> collect: [:angle | (Point r: (oldR := oldR = ext
> ifTrue: [ext * 5 // 12]
> ifFalse: [ext]) degrees: angle + pt degrees)
> + (45 @ 45)].
> self computeBounds
> 
> ===========================================
> 
> MessageNotUnderstood: Float>>new
> 6 March 2011 6:43:13.424 am
> 
> VM: Mac OS - Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.47] Croquet Cog 3.0.0
> Image: Cuis 3.1 [latest update: #850]
> 
> Float(Object)>>doesNotUnderstand: #new
> Receiver: 14.14213562373095
> Arguments and temporary variables: aMessage: new
> exception: MessageNotUnderstood: Float>>new
> resumeValue: nil
> Receiver's instance variables: 14.14213562373095
> Float(Point class)>>r:degrees:
> Receiver: 14.14213562373095
> Arguments and temporary variables: rho: 14.14213562373095
> degrees: 81.0
> Receiver's instance variables: 14.14213562373095
> [] in StarMorph>>initialize
> Receiver: a StarMorph(2314)



More information about the Squeak-dev mailing list