[Fwd: StarMorph busted in Cuis 850 + Cog r2361]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Fwd: StarMorph busted in Cuis 850 + Cog r2361]

Juan Vuletich-4
 
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)
Reply | Threaded
Open this post in threaded view
|

Re: [Fwd: StarMorph busted in Cuis 850 + Cog r2361]

Eliot Miranda-2
 
Hi Juan,

On Sun, Mar 6, 2011 at 9:26 AM, Juan Vuletich <[hidden email]> 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.

Yes, this is a bug with the new StackToRegisterMappingCogit code generator.  The bug dies not show up with the SimpleStackBasedCogit.  The issue is bad register contents management on inline cache misses.  I'll keep you posted.

best,
Eliot

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)

Reply | Threaded
Open this post in threaded view
|

Re: [Fwd: StarMorph busted in Cuis 850 + Cog r2361]

Eliot Miranda-2
 


On Sun, Mar 6, 2011 at 10:46 AM, Eliot Miranda <[hidden email]> wrote:
Hi Juan,

On Sun, Mar 6, 2011 at 9:26 AM, Juan Vuletich <[hidden email]> 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.

Yes, this is a bug with the new StackToRegisterMappingCogit code generator.  The bug dies not show up with the SimpleStackBasedCogit.  The issue is bad register contents management on inline cache misses.  I'll keep you posted.

Nothing to do with register contents.  It's a code generator bug which is miscompiling the reference to Point in the below:

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 

best,
Eliot

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)


Reply | Threaded
Open this post in threaded view
|

Re: [Fwd: StarMorph busted in Cuis 850 + Cog r2361]

Eliot Miranda-2
In reply to this post by Juan Vuletich-4

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 <[hidden email]> 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)
Reply | Threaded
Open this post in threaded view
|

Re: [Fwd: StarMorph busted in Cuis 850 + Cog r2361]

Juan Vuletich-4
 
Hi Eliot,

Thank you for addressing the problem, and Steven Elkins for finding it!

Cheers,
Juan Vuletich

Eliot Miranda wrote:

>  
> 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 <[hidden email]> 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)
>>    
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1204 / Virus Database: 1435/3483 - Release Date: 03/05/11
>
>
>
>