swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] crash at odd timestep


From: Paul Johnson
Subject: Re: [Swarm-Support] crash at odd timestep
Date: Thu, 07 Feb 2008 17:30:22 -0600
User-agent: Thunderbird 2.0.0.9 (X11/20071115)

Corinne Coen wrote:
Dear Swarm folk

I am an unsophisticated user of swarm.  I have a model I built several
years ago (it uses swarm-2.2).  Although I recall that it worked fine
when I built it, now, when I run it in BatchSwarm mode, it crashes at
timestep=55.  When stopT is equal to any number from 1 through 55, it
stops at the indicated timestep.  When stopT is set at 56 or above it
crashes after timestep 55.  In contrast, in GUI it also crashes but at
timestep 166.  Again with stopT set anywhere from 1-165, it stops at the
desired step.  With stopT=166 or higher, it crashes.  I get the
following error message:

*** event raised for error: OffsetOutOfRange

*** function: indexAtOffset(), file:
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/src/collections/Col
lection.m, line: 119

*** execution terminating due to error

/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.2/src/defobj/Symbol.m
:187 -[Error(c) _raiseEvent:] Aborted

Can you help me figure out the cause of the crashes?


Now Swarm will stop when a message is sent to nil.

Look at your code for how you do iterations on list. Try to see how an object might have been put equal to nil while it is still in the list.

If you are iterating with a for loop or a while loop, it is easy to correct these if you do

if (anObject != nil)

before telling anObject to do something.

Know what I mean?

Paul Box is right that gdb might lead to the line in your code where the crash is triggered, but it will not really help you figure out which element is nil unless you do some fancy footwork.

WHen you figure out which list is causing the trouble, then you should write some diagnostic code into the model. I recall using a builtin function in swarm for this. Am traveling now and can't look up in Reference Guide. is it xprint or xfprintid for lists?

PJ


Best,

Corinne




--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://pj.freefaculty.org
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700


reply via email to

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