swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: killing agents


From: Marcus G. Daniels
Subject: Re: killing agents
Date: 20 Nov 1999 16:49:57 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "PA" == Peter Aykroyd <address@hidden> writes:

PA> I'm having a problem with my swarm simulation killing
PA> agents.  They're displayed on an extension of the grid2d and they
PA> are kept in a swarm list object.  When they die, I've tried using
PA> the remove method on the list to get them out and removing them
PA> from grid2d.  I've also tried, in addition to these two measures,
PA> returning null from the method instead of the agent object.
PA> Nevertheless, whenever one dies it crashes the program due to a
PA> null pointer exception.  Can anyone tell me what I'm not doing?

You need is to clarify what happens between the time the agent dies
and the crash.  Use the debugger to look at the backtrace.  If there
isn't an informative backtrace, use breakpoints and a bisection
strategy to bound where the crash occurs.  Instrument code if that is
easier.

This phenomenology is consistent with, but not positive proof of the
need for something called a reaperQueue or destroy nofication.  You
can find examples of both in the archives of this mailing list.  It is
important to make sure that references to dropped objects are handled
in a systematic way.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]