[comp.windows.ms.programmer] Actor Stack Overflow

kwong@polyslo.CalPoly.EDU (Ka Chin Wong) (05/03/91)

Hi, Actor fans,

  I come upon a problem which causes Actor to have its stack overflowed
and terminated by UAE.  Could someone help me explain why?

  Joe := new(Array, 1)
  Joe[0] := Joe
  Sam := new(Dictionary, 10)
  add(Sam, Joe, "Crash!!!")

I ran this code on the workspace and Actor crashed.
Of course, it is unlikely that someone would need a
variable like Joe which references itself.  I did
it mainly to test my code when an object has an
implicit reference to itself: Joe -> Sue -> Sam -> Joe.

If these codes do not cause a crash on any other
systems, I would be interested to know as well.

I appreciate your comment!


Thanks

Rick