[BUG] size StepMessages Heap changed in WorldState>>stopStepping:selector:

Andreas Raab andreas.raab at gmx.de
Fri Mar 5 01:03:36 UTC 2004


Very likely this is the result of running the tests from a background
progress. See if filing in the changes that I posted in

http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-March/074876.html

solves the problem. I would guess that this is one more of those Morphic
interactions that cause TestRunner to randomly cause errors in
Morphic-related tests.

Cheers,
  - Andreas

----- Original Message ----- 
From: "Thomas Koenig" <tomkoenig at mindspring.com>
To: <squeak-dev at lists.squeakfoundation.org>
Sent: Friday, March 05, 2004 4:52 AM
Subject: [BUG] size StepMessages Heap changed in
WorldState>>stopStepping:selector:


> As mentioned a while ago, I am working on creating SUnit tests for
> morphs.  Part of that testing includes creating events under program
> control and also includes creating a lot Morphs including a HandMorph
> and a PasteUpMorph.
>
> I have found a bug which I do not understand.  It has the following
> characteristics: -On seemingly random Test Runner runs, one or more
> tests will error out.  (The next couple of runs they run just fine.)
> -When I attempt to debug the error in Test Runner by selecting the
> error, the debugger won't come up. -So, in order to debug this I put a
> self halt in the  [... self errors add: aTestCase....]  block of
> TestResult runCase: aTestCase.
> The error in every case appears to be that the size of the Heap of
> StepMessages appears to change in the middle of WorldState>>
> stopStepping:selector: method.  See below.
>
> Has anyone seen this before?  Is it possible that I'm causing the
> problem by creating events and/or hand? Any idea why the errored method
> can not be opened out of the Test Runner?
>
> Tom
> PS: The following text shows my analysis of one such dump.  Others are
> attached and the test code (polygonTest.1.cs.gz)
>
> In this (typical) instance the error happened on:
> PolygonMorphTriangleTest>>#testFlipHAroundXRightMostVertex
> And was Error: subscript is out of bounds: 15
> (the test that errors is arbitrary and the exact error varies but the
> bottom line issue is failing an index value well in side of the
> collection size.)  I traced this from the bottom of the stack as
> follows: (1)a PolygonMorph(2533) >> addMorphFront:  PolygonMorph(2926)
> (2)a PolygonMorph(2533) >> privateAddMorph: a PolygonMorph(2926)
> atIndex: 1 "adding a new morph"(itsWorld == myWorld)
>     ifFalse: [aMorph intoWorld: a PasteUpMorph(2167) [world]]
> (3) a PolygonMorph(2926) wantsSteps ifTrue:[aWorld startStepping: self =
> a PasteUpMorph(2167)
> (4)[world] >> startStepping: a PolygonMorph(2926) at: scheduledTime
> selector: #stepAt: arguments: nil stepTime: nil
> (5) worldState >>startStepping: a PolygonMorph(2926) at: 21706129
> selector: #stepAt: arguments: nil stepTime: nil.
> "Add the given morph to the step list. Do nothing if it is already being
> stepped."
> (6) aWorldState >> stopStepping: a PolygonMorph(2926) selector:
> #stepAt:. "Remove the given morph from the step list." ... stepList
> removeAll:
>   (stepList select:[:stepMsg| stepMsg receiver == a PolygonMorph(2926)
> and:[stepMsg selector == #stepAt:]]).
> (7) Heap >>select:[] in WorldState>>stopStepping:selector: {[:stepMsg |
> stepMsg receiver == aMorph   and: [stepMsg selector == aSelector]]}
> 1 to: Heap size (which is 27) do:
> [:15|
> (aBlock value: (aHeap at: 15))
> ifTrue: [a WriteStream #() nextPut: (aHeap at:
> 15)]].
> (8) Heap >>at: 15
> "Return the element at the given position within the receiver" (index <
> 1 or:[index > tally=13]) ifTrue:[^self errorSubscriptBounds: index].
> **** This should not be possible ****
> (9)Heap >> errorSubscriptBounds: 15
>  etc...
>


----------------------------------------------------------------------------
----


>
>




More information about the Squeak-dev mailing list