Hi Chris,<br><br><div class="gmail_quote">On Thu, Jan 20, 2011 at 8:55 AM, Chris Muller <span dir="ltr"><<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
One of the tests only fails in Cog, with a very strange phenomena.<br>
<br>
It's easy to reproduce with the line of code from the test:<br>
<br>
ObjectsTool initializedInstance showAll openCenteredInWorld<br>
<br>
the strange part is in the passing of the "(colors at: i)" argument<br>
from ColorForm>>colormapIfNeededForDepth:. As you can see in the<br>
stack trace below (or in debugger from above expression), the third<br>
element is definitely an instance of Color.<br>
<br>
Yet, the message ends up being sent to a LargePositiveInteger,<br>
4278192128 to be exact.<br></blockquote><div><br></div><div>This bug is understood and fixed in my sources and I'll roll out new VMs over the weekend. The bug is the result of the ColorArray leaking into the VM's atCache which means that later on it responds to at: in the Interpreter using the at: primitive that answers the integer value in the ColorArray without converting the value into a color. This was a regression introduced when I fixed the objects-as-methods issues late last year. Thanks to Matthew Fulmer for creating the reproducible case.</div>
<div><br></div><div>best</div><div>Eliot</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
- Chris<br>
<br>
<br>
<br>
Subject: [BUG]LargePositiveInteger(Object)>>doesNotUnderstand:<br>
#pixelValueForDepth:<br>
19 January 2011 7:59:01.819 pm<br>
<br>
VM: unix - Smalltalk<br>
Image: Squeak4.2alpha [latest update: #10910]<br>
<br>
SecurityManager state:<br>
Restricted: false<br>
FileAccess: true<br>
SocketAccess: true<br>
<br>
LargePositiveInteger(Object)>>doesNotUnderstand: #pixelValueForDepth:<br>
Receiver: 4278192128<br>
Arguments and temporary variables:<br>
aMessage: pixelValueForDepth: 32<br>
exception: MessageNotUnderstood: LargePositiveInteger>>pixelValueForDepth:<br>
resumeValue: nil<br>
Receiver's instance variables:<br>
4278192128<br>
<br>
ColorForm>>colormapIfNeededForDepth:<br>
Receiver: ColorForm(52x29x8)<br>
Arguments and temporary variables:<br>
destDepth: 32<br>
newMap: a Bitmap of length 256<br>
i: 3<br>
iLimiT: 256<br>
Receiver's instance variables:<br>
bits: #[225 121 17 227 23 227 219 212 205 189 188 174 187 185 156<br>
164 156 157 1...etc...<br>
width: 52<br>
height: 29<br>
depth: 8<br>
offset: 0@0<br>
colors: a ColorArray(Color transparent (Color r: 0.0 g: 0.0 b:<br>
0.031) (Color r:...etc...<br>
cachedDepth: nil<br>
cachedColormap: nil<br>
<br>
ColorForm>>colormapIfNeededFor:<br>
Receiver: ColorForm(52x29x8)<br>
Arguments and temporary variables:<br>
destForm: Form(212x49x32)<br>
newMap: nil<br>
color: nil<br>
pv: nil<br>
i: nil<br>
iLimiT: nil<br>
Receiver's instance variables:<br>
bits: #[225 121 17 227 23 227 219 212 205 189 188 174 187 185 156<br>
164 156 157 1...etc...<br>
width: 52<br>
height: 29<br>
depth: 8<br>
offset: 0@0<br>
colors: a ColorArray(Color transparent (Color r: 0.0 g: 0.0 b:<br>
0.031) (Color r:...etc...<br>
cachedDepth: nil<br>
cachedColormap: nil<br>
<br>
FormCanvas>>image:at:sourceRect:rule:<br>
Receiver: a FormCanvas on: Form(212x49x32)<br>
Arguments and temporary variables:<br>
aForm: ColorForm(52x29x8)<br>
aPoint: 131@10<br>
sourceRect: 0@0 corner: 52@29<br>
rule: 24<br>
Receiver's instance variables:<br>
target: nil<br>
filterSelector: nil<br>
origin: 0@0<br>
clipRect: 0@0 corner: 212@49<br>
form: Form(212x49x32)<br>
port: a GrafPort<br>
shadowColor: nil<br>
<br>
FormCanvas(Canvas)>>translucentImage:at:sourceRect:<br>
Receiver: a FormCanvas on: Form(212x49x32)<br>
Arguments and temporary variables:<br>
aForm: ColorForm(52x29x8)<br>
aPoint: 131@10<br>
sourceRect: 0@0 corner: 52@29<br>
Receiver's instance variables:<br>
target: nil<br>
filterSelector: nil<br>
origin: 0@0<br>
clipRect: 0@0 corner: 212@49<br>
form: Form(212x49x32)<br>
port: a GrafPort<br>
shadowColor: nil<br>
<br>
FormCanvas(Canvas)>>translucentImage:at:<br>
Receiver: a FormCanvas on: Form(212x49x32)<br>
Arguments and temporary variables:<br>
aForm: ColorForm(52x29x8)<br>
aPoint: 131@10<br>
Receiver's instance variables:<br>
target: nil<br>
filterSelector: nil<br>
origin: 0@0<br>
clipRect: 0@0 corner: 212@49<br>
form: Form(212x49x32)<br>
port: a GrafPort<br>
shadowColor: nil<br>
<br>
ThreePhaseButtonMorph>>drawOn:<br>
Receiver: 3PButton(#goUp:with: 3545)<br>
Arguments and temporary variables:<br>
aCanvas: a FormCanvas on: Form(212x49x32)<br>
Receiver's instance variables:<br>
bounds: 131@10 corner: 183@39<br>
owner: an AlignmentMorph<script controls>(2589)<br>
submorphs: #()<br>
fullBounds: 131@10 corner: 183@39<br>
color: Color blue<br>
extension: a MorphExtension (3716) [balloonText] [externalName =<br>
Go Button ]<br>
image: ColorForm(52x29x8)<br>
offImage: ColorForm(52x29x8)<br>
pressedImage: ColorForm(52x29x8)<br>
state: #off<br>
target: a StandardScriptingSystem<br>
actionSelector: #goUp:with:<br>
arguments: {nil . 3PButton(#goUp:with: 3545)}<br>
actWhen: #buttonUp<br>
<br>
FormCanvas(Canvas)>>draw:<br>
Receiver: a FormCanvas on: Form(212x49x32)<br>
Arguments and temporary variables:<br>
anObject: 3PButton(#goUp:with: 3545)<br>
Receiver's instance variables:<br>
target: nil<br>
filterSelector: nil<br>
origin: 0@0<br>
clipRect: 0@0 corner: 212@49<br>
form: Form(212x49x32)<br>
port: a GrafPort<br>
shadowColor: nil<br>
<br>
FormCanvas(Canvas)>>drawMorph:<br>
Receiver: a FormCanvas on: Form(212x49x32)<br>
Arguments and temporary variables:<br>
aMorph: 3PButton(#goUp:with: 3545)<br>
Receiver's instance variables:<br>
target: nil<br>
filterSelector: nil<br>
origin: 0@0<br>
clipRect: 0@0 corner: 212@49<br>
form: Form(212x49x32)<br>
port: a GrafPort<br>
shadowColor: nil<br>
<br>
[] in ThreePhaseButtonMorph(Morph)>>fullDrawOn:<br>
Receiver: 3PButton(#goUp:with: 3545)<br>
Arguments and temporary variables:<br>
aCanvas: a FormCanvas on: Form(212x49x32)<br>
Receiver's instance variables:<br>
bounds: 131@10 corner: 183@39<br>
owner: an AlignmentMorph<script controls>(2589)<br>
submorphs: #()<br>
fullBounds: 131@10 corner: 183@39<br>
color: Color blue<br>
extension: a MorphExtension (3716) [balloonText] [externalName =<br>
Go Button ]<br>
image: ColorForm(52x29x8)<br>
offImage: ColorForm(52x29x8)<br>
pressedImage: ColorForm(52x29x8)<br>
state: #off<br>
target: a StandardScriptingSystem<br>
actionSelector: #goUp:with:<br>
arguments: {nil . 3PButton(#goUp:with: 3545)}<br>
actWhen: #buttonUp<br>
<br>
FormCanvas>>roundCornersOf:in:during:<br>
Receiver: a FormCanvas on: Form(212x49x32)<br>
Arguments and temporary variables:<br>
aMorph: 3PButton(#goUp:with: 3545)<br>
bounds: 131@10 corner: 183@39<br>
aBlock: [closure] in ThreePhaseButtonMorph(Morph)>>fullDrawOn:<br>
Receiver's instance variables:<br>
target: nil<br>
filterSelector: nil<br>
origin: 0@0<br>
clipRect: 0@0 corner: 212@49<br>
form: Form(212x49x32)<br>
port: a GrafPort<br>
shadowColor: nil<br>
<br>
FormCanvas(Canvas)>>roundCornersOf:during:<br>
Receiver: a FormCanvas on: Form(212x49x32)<br>
Arguments and temporary variables:<br>
aMorph: 3PButton(#goUp:with: 3545)<br>
aBlock: [closure] in ThreePhaseButtonMorph(Morph)>>fullDrawOn:<br>
Receiver's instance variables:<br>
target: nil<br>
filterSelector: nil<br>
origin: 0@0<br>
clipRect: 0@0 corner: 212@49<br>
form: Form(212x49x32)<br>
port: a GrafPort<br>
shadowColor: nil<br>
<br>
ThreePhaseButtonMorph(Morph)>>fullDrawOn:<br>
Receiver: 3PButton(#goUp:with: 3545)<br>
Arguments and temporary variables:<br>
aCanvas: a FormCanvas on: Form(212x49x32)<br>
Receiver's instance variables:<br>
bounds: 131@10 corner: 183@39<br>
owner: an AlignmentMorph<script controls>(2589)<br>
submorphs: #()<br>
fullBounds: 131@10 corner: 183@39<br>
color: Color blue<br>
extension: a MorphExtension (3716) [balloonText] [externalName =<br>
Go Button ]<br>
image: ColorForm(52x29x8)<br>
offImage: ColorForm(52x29x8)<br>
pressedImage: ColorForm(52x29x8)<br>
state: #off<br>
target: a StandardScriptingSystem<br>
actionSelector: #goUp:with:<br>
arguments: {nil . 3PButton(#goUp:with: 3545)}<br>
actWhen: #buttonUp<br>
<br>
FormCanvas(Canvas)>>fullDraw:<br>
Receiver: a FormCanvas on: Form(212x49x32)<br>
Arguments and temporary variables:<br>
anObject: 3PButton(#goUp:with: 3545)<br>
Receiver's instance variables:<br>
target: nil<br>
filterSelector: nil<br>
origin: 0@0<br>
clipRect: 0@0 corner: 212@49<br>
form: Form(212x49x32)<br>
port: a GrafPort<br>
shadowColor: nil<br>
<br>
FormCanvas(Canvas)>>fullDrawMorph:<br>
Receiver: a FormCanvas on: Form(212x49x32)<br>
Arguments and temporary variables:<br>
aMorph: 3PButton(#goUp:with: 3545)<br>
Receiver's instance variables:<br>
target: nil<br>
filterSelector: nil<br>
origin: 0@0<br>
clipRect: 0@0 corner: 212@49<br>
form: Form(212x49x32)<br>
port: a GrafPort<br>
shadowColor: nil<br>
<br>
[] in [] in AlignmentMorph(Morph)>>drawSubmorphsOn:<br>
Receiver: an AlignmentMorph<script controls>(2589)<br>
Arguments and temporary variables:<br>
<<error during printing><br>
Receiver's instance variables:<br>
bounds: 25@8 corner: 185@41<br>
owner: an AlignmentMorph(1206)<br>
submorphs: {3PButton(#stopUp:with: 2931) .<br>
3PButton(#stepStillDown:with: 3201) ...etc...<br>
fullBounds: 25@8 corner: 185@41<br>
color: Color transparent<br>
extension: a MorphExtension (2601) [externalName = script controls<br>
] [other: ...etc...<br>
borderWidth: 0<br>
borderColor: Color black<br>
<br>
Array(SequenceableCollection)>>reverseDo:<br>
Receiver: {3PButton(#stopUp:with: 2931) .<br>
3PButton(#stepStillDown:with: 3201) . 3PButton(#goUp:with:...etc...<br>
Arguments and temporary variables:<br>
aBlock: [closure] in [] in AlignmentMorph(Morph)>>drawSubmorphsOn:<br>
index: 3<br>
Receiver's instance variables:<br>
{3PButton(#stopUp:with: 2931) . 3PButton(#stepStillDown:with: 3201) .<br>
3PButton(#goUp:with:...etc...<br>
<br>
[] in AlignmentMorph(Morph)>>drawSubmorphsOn:<br>
Receiver: an AlignmentMorph<script controls>(2589)<br>
Arguments and temporary variables:<br>
<<error during printing><br>
Receiver's instance variables:<br>
bounds: 25@8 corner: 185@41<br>
owner: an AlignmentMorph(1206)<br>
submorphs: {3PButton(#stopUp:with: 2931) .<br>
3PButton(#stepStillDown:with: 3201) ...etc...<br>
fullBounds: 25@8 corner: 185@41<br>
color: Color transparent<br>
extension: a MorphExtension (2601) [externalName = script controls<br>
] [other: ...etc...<br>
borderWidth: 0<br>
borderColor: Color black<br>
<br>
AlignmentMorph(Morph)>>drawSubmorphsOn:<br>
Receiver: an AlignmentMorph<script controls>(2589)<br>
Arguments and temporary variables:<br>
aCanvas: a FormCanvas on: Form(212x49x32)<br>
drawBlock: [closure] in AlignmentMorph(Morph)>>drawSubmorphsOn:<br>
Receiver's instance variables:<br>
bounds: 25@8 corner: 185@41<br>
owner: an AlignmentMorph(1206)<br>
submorphs: {3PButton(#stopUp:with: 2931) .<br>
3PButton(#stepStillDown:with: 3201) ...etc...<br>
fullBounds: 25@8 corner: 185@41<br>
color: Color transparent<br>
extension: a MorphExtension (2601) [externalName = script controls<br>
] [other: ...etc...<br>
borderWidth: 0<br>
borderColor: Color black<br>
<br>
<br>
--- The full stack ---<br>
LargePositiveInteger(Object)>>doesNotUnderstand: #pixelValueForDepth:<br>
ColorForm>>colormapIfNeededForDepth:<br>
ColorForm>>colormapIfNeededFor:<br>
FormCanvas>>image:at:sourceRect:rule:<br>
FormCanvas(Canvas)>>translucentImage:at:sourceRect:<br>
FormCanvas(Canvas)>>translucentImage:at:<br>
ThreePhaseButtonMorph>>drawOn:<br>
FormCanvas(Canvas)>>draw:<br>
FormCanvas(Canvas)>>drawMorph:<br>
[] in ThreePhaseButtonMorph(Morph)>>fullDrawOn:<br>
FormCanvas>>roundCornersOf:in:during:<br>
FormCanvas(Canvas)>>roundCornersOf:during:<br>
ThreePhaseButtonMorph(Morph)>>fullDrawOn:<br>
FormCanvas(Canvas)>>fullDraw:<br>
FormCanvas(Canvas)>>fullDrawMorph:<br>
[] in [] in AlignmentMorph(Morph)>>drawSubmorphsOn:<br>
Array(SequenceableCollection)>>reverseDo:<br>
[] in AlignmentMorph(Morph)>>drawSubmorphsOn:<br>
AlignmentMorph(Morph)>>drawSubmorphsOn:<br>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<br>
[] in AlignmentMorph(Morph)>>fullDrawOn:<br>
FormCanvas>>roundCornersOf:in:during:<br>
FormCanvas(Canvas)>>roundCornersOf:during:<br>
AlignmentMorph(Morph)>>fullDrawOn:<br>
FormCanvas(Canvas)>>fullDraw:<br>
FormCanvas(Canvas)>>fullDrawMorph:<br>
[] in [] in AlignmentMorph(Morph)>>drawSubmorphsOn:<br>
Array(SequenceableCollection)>>reverseDo:<br>
[] in AlignmentMorph(Morph)>>drawSubmorphsOn:<br>
AlignmentMorph(Morph)>>drawSubmorphsOn:<br>
[] in AlignmentMorph(Morph)>>fullDrawOn:<br>
FormCanvas>>roundCornersOf:in:during:<br>
FormCanvas(Canvas)>>roundCornersOf:during:<br>
AlignmentMorph(Morph)>>fullDrawOn:<br>
FormCanvas(Canvas)>>fullDraw:<br>
FormCanvas(Canvas)>>fullDrawMorph:<br>
[] in [] in AllScriptsTool(Morph)>>drawSubmorphsOn:<br>
Array(SequenceableCollection)>>reverseDo:<br>
[] in AllScriptsTool(Morph)>>drawSubmorphsOn:<br>
AllScriptsTool(Morph)>>drawSubmorphsOn:<br>
[] in AllScriptsTool(Morph)>>fullDrawOn:<br>
CornerRounder class>>roundCornersOf:on:in:displayBlock:borderWidth:corners:<br>
FormCanvas>>roundCornersOf:in:during:<br>
FormCanvas(Canvas)>>roundCornersOf:during:<br>
AllScriptsTool(Morph)>>fullDrawOn:<br>
FormCanvas(Canvas)>>fullDraw:<br>
FormCanvas(Canvas)>>fullDrawMorph:<br>
[] in AllScriptsTool(Morph)>>imageForm:backgroundColor:forRectangle:<br>
FormCanvas>>translateBy:during:<br>
AllScriptsTool(Morph)>>imageForm:backgroundColor:forRectangle:<br>
PartsBin class>>thumbnailForQuad:color:<br>
[] in PartsBin>>listDirection:quadList:buttonClass:<br>
SortedCollection(OrderedCollection)>>do:<br>
PartsBin>>listDirection:quadList:buttonClass:<br>
PartsBin>>listDirection:quadList:<br>
ObjectsTool>>installQuads:fromButton:<br>
[] in ObjectsTool>>showAll<br>
BlockClosure>>ensure:<br>
CursorWithMask(Cursor)>>showWhile:<br>
ObjectsTool>>showAll<br>
MorphicUIBugTest class>>DoIt<br>
Compiler>>evaluate:in:to:notifying:ifFail:logged:<br>
-- and more not shown --<br>
<br>
</blockquote></div><br>