Cog VM problem?

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

Cog VM problem?

Raymond Asselin-4
Cog.app-15.19.3336.tgz
gave me a Debugger window

 

with these artefacts
This is a MauiDomainMorph




SqueakDebug.log (15K) Download Attachment
=?utf-8?Q?a_MauiDomainMorph=3Ca_CalepinSante=CC=81=3E=283500=29?= =?utf-8?Q?=2Ejpeg?= (44K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cog VM problem?

Karl Ramberg
You can test this workaround:

SimpleBorder>>width
^width ifNil:[0]

Open image with an earlier VM and modify that method so it does not return a nil.

Karl

On Thu, May 14, 2015 at 5:13 PM, Raymond Asselin <[hidden email]> wrote:
Cog.app-15.19.3336.tgz
gave me a Debugger window

 

with these artefacts
This is a MauiDomainMorph







Reply | Threaded
Open this post in threaded view
|

Re: Cog VM problem?

Raymond Asselin-4
When I open image with an earlier VM everything is fine. Changing de method #width doesn't do anything.
And I must select each small panel and do:  'start drawing again'.  So for now I will stuck to the previous VM. 
Thank Karl for the suggestion.


Le 2015-05-14 à 11:26, karl ramberg <[hidden email]> a écrit :

You can test this workaround:

SimpleBorder>>width
^width ifNil:[0]

Open image with an earlier VM and modify that method so it does not return a nil.

Karl




Reply | Threaded
Open this post in threaded view
|

Re: Cog VM problem?

Karl Ramberg
Ah, ok
I method 
BorderedMorph>>borderStyle
add this to top of method:
    true ifTrue:[^BorderStyle default].

On Thu, May 14, 2015 at 6:12 PM, Raymond Asselin <[hidden email]> wrote:
When I open image with an earlier VM everything is fine. Changing de method #width doesn't do anything.
And I must select each small panel and do:  'start drawing again'.  So for now I will stuck to the previous VM. 
Thank Karl for the suggestion.


Le 2015-05-14 à 11:26, karl ramberg <[hidden email]> a écrit :

You can test this workaround:

SimpleBorder>>width
^width ifNil:[0]

Open image with an earlier VM and modify that method so it does not return a nil.

Karl








Reply | Threaded
Open this post in threaded view
|

Re: Cog VM problem?

marcel.taeumel
In reply to this post by Karl Ramberg
Still, this is only vaguely related to the given stack trace and Eliot should take a look at the real problem here. :-)

Let me reprint the problem:

...
ByteSymbol(Object)>>doesNotUnderstand: #width:color:
MauiMessageMorph(BorderedMorph)>>borderStyle
...

The code in BorderedMorph >> borderStyle includes this part:

...
BorderStyle width: borderWidth color: borderColor.
...

Which should be a class and not a byte symbol. (The whole method looks quite spooky...)

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Cog VM problem?

Raymond Asselin-4
In reply to this post by Karl Ramberg
With this " true ifTrue:[^BorderStyle default]"  the problem is gone now. Thank but the source code is'nt too clear in my opinion and for what I understand this code shadow all the rest of the method.

I can't say that I understand what Marcel is saying. It is supposed to be a class and it is not but a symbol….That you can see it is a symbol not a class is magic for me…a symbol is precede by # is'nt it?

Be patient I will finish by understand….




Le 2015-05-14 à 12:56, karl ramberg <[hidden email]> a écrit :

Ah, ok
I method 
BorderedMorph>>borderSemtyle
add this to top of method:
    true ifTrue:[^BorderStyle default].

On Thu, May 14, 2015 at 6:12 PM, Raymond Asselin <[hidden email]> wrote:
When I open image with an earlier VM everything is fine. Changing de method #width doesn't do anything.
And I must select each small panel and do:  'start drawing again'.  So for now I will stuck to the previous VM. 
Thank Karl for the suggestion.


Le 2015-05-14 à 11:26, karl ramberg <[hidden email]> a écrit :

You can test this workaround:

SimpleBorder>>width
^width ifNil:[0]

Open image with an earlier VM and modify that method so it does not return a nil.

Karl










Reply | Threaded
Open this post in threaded view
|

Re: Cog VM problem?

Eliot Miranda-2
In reply to this post by Raymond Asselin-4
Hi Raymond,

    yes, thanks.  We have a regression in the code generator due to recent changes to #== compilation.  We're working on it.  I hope to have a fix soon.  Apologies for the inconvenience.

For those of you curious why this only affects the V3 VM, not the Spur VM, the reason is that in Spur the Cogit passes up to 2 argument sends in registers but in V3 it passes only up to 1 arg sends in registers.  In 

(borderWidth = style width and: 
["Hah! Try understanding this..."

borderColor == style style or: 
["#raised/#inset etc"

#simple == style style and: [borderColor = style color]]]) 
ifFalse: 
[style := borderColor isColor 
ifTrue: [BorderStyle width: borderWidth color: borderColor]
ifFalse: [(BorderStyle perform: borderColor) width: borderWidth "argh."].
self setProperty: #borderStyle toValue: style].

#simple erroneously ends up getting spilled to the stack, so that when the send of width:color: to BorderStyle occurs the code generator emits code to access what it thinks is BorderWidth, but ends up accessing #simple instead.

As I say we're working on it and should have a fix soon.

On Thu, May 14, 2015 at 8:13 AM, Raymond Asselin <[hidden email]> wrote:
Cog.app-15.19.3336.tgz
gave me a Debugger window

 

with these artefacts
This is a MauiDomainMorph







--
best,
Eliot