[squeak-dev] runSimulated behaviour

Michael Haupt mhaupt at gmail.com
Thu May 20 09:55:55 UTC 2010


Dear all,

we're observing some strange behaviour in simulated bytecode execution
in Squeak (4.1, on Macs).

Printing this:
ContextPart runSimulated: [ TimeStamp now ]
will work once and then reproducibly fail with code simulation errors.

This works well (also reproducibly):
ContextPart trace: [ TimeStamp now ]

Going to more detail, we figured out that simulation reproducibly
works if things are written to the Transcript every now and then.
Printing this:
n:=0. thisContext runSimulated: [ TimeStamp now ] contextAtEachStep: [
:c | n\\100=0 ifTrue: [ Transcript show: $. ] ]
works.

We've tried to just insert some artificial delays (<someValue>
milliSeconds asDelay wait) in the block, but that will not
reproducibly work; it also leads to code simulation errors. So it
can't be just the time it takes to write to Transcript. Or so we
believe.

Does anybody know the reason for this strange behaviour, or where in
the simulation logic to look?

Best,

Michael



More information about the Squeak-dev mailing list