Newbie Alert: Discrete Event Simulator

Gordon McMillan gmcm at hypernet.com
Thu Oct 28 21:46:09 EDT 1999


Bryan Morris wrote:

[big snip]
> If you're still with me... here's the
> Problem:
> The simulation seems to run fine, except after the Scheduler
> handles a few events I get a Traceback error saying the Scheduler
> can't find the proper Event_Handler instance.
> 
> What I've tried:
> When I step through the debugger and the Object_Manager stores
> the name and object instance address (e.g., "Pong instance at
> AAAA").  The first event to be scheduled for "Pong" tries to get
> the associated object instance from the Object_Manager but
> instead it gets back something else (e.g., "Pong instance at
> BBBB").  Which causes the traceback when I call this instance's
> Process_Event function.
> 
> My questions:
> a) When I Register an object instance and store it in the
> dictionary, am I guaranteed that that object instance will not
> move?  

Yes.

> He says with only a "dangerous" (i.e., little)
> understanding of what the garbage collection does. As you can
> imagine, this is kind of critical to my design as it stands. b)
> If not, any other ideas? c) Have I been vague enough, or do you
> need more info?

You have been more than sufficiently vague. You are 
undoubtedly stepping on yourself somehow ;-).
 
> I don't really want to send the code for open view until at least
> I bang my head against the wall a few more times...

We're nice, here. Nobody's rooting for the wall.

at-least-not-publicly-ly y'rs

- Gordon




More information about the Python-list mailing list