|
From: | donalson |
Subject: | Executed Actions |
Date: | Thu, 28 Sep 2000 18:43:38 -0700 |
Marcus,
Below is the segment of code I'll be refering
to:
if( (sizeEvent.eventId != NULL)
)
{ if( [myModel getSystemTime] >= 1263 ) { printf("mussel is %d\n",flag); xprint(sizeEvent.eventId); fflush(stdout); } nullEvent=[eventSchedule remove: sizeEvent.eventId]; [nullEvent drop]; } The printf and xprint is
mussel is 92193
[0x5109538: Mussel atMaxSize1] Immediatly after this I try to remove the event from the
schedule and get a core dump for trying to remove a non-event from my event
schedule.
It seems to me there are at least 2 possibilities for
this.
1.) The first is that I have a dangling pointer left
over from an executed event and the memory hasn't been reallocated so the
ID still references an event so xprint still sees it as such.
2.) Another possibility is that it is a valid event
and something else has corrupted memory (maybe the memory used by the event
schedule?).
or...?
The agent number of 92193 says that over 90,000 agents
were created and destroyed since the simulation started so this is probably a
special case error.
My question for you is "is senerio #1 possible"?
Could xprint report the correct message (atMaxSize1) even though the event had
already been executed? (I have never used xprint prior to chacing the
memory in 2.01 and now with your suggestion yesterday so I don't have a good
understanding on how it works.)
Cheers,
D4
*********************************************************************
* Dr. Doug Donalson Office: (805) 893-2962 * Ecology, Evolution, Home: (805) 961-4447 * and Marine Biology email address@hidden * UC Santa Barbara * Santa Barbara Ca. 93106 ********************************************************************* * * The most exciting phrase to hear in science, the one that * heralds new discoveries, is not "EUREKA" (I have found it) but * "That's funny ...?" * * Isaac Asimov * ********************************************************************* |
[Prev in Thread] | Current Thread | [Next in Thread] |