[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
object removal from list causing core dump
From: |
Geoffrey Schultz |
Subject: |
object removal from list causing core dump |
Date: |
Thu, 21 May 1998 17:14:10 -0400 (EDT) |
Hi,
I'm having a bit of problem with my simulation and was wondering
whether I'm committing a no-no.
I have a list that will contain a variable but small number of
objects. If I set up the following code bit, I get a seg fault and core
dump. Is their something wrong with this:
index=[MyList begin: scratchZone];
while((anObject=[index next])){
// check certain properties of the object and
// if meets criteria:
if(condition)
[MyList remove: anObject];
}
does removing a member while in a "while" statement cause a problem with
indexing? The list initailly has only the single member (that is removed)
but at other times in the simulation may contain more than one member.
I can supply the complete backtrace, however the last line
says
-[ListIndex() at List_GEN.m: 295
(using ddd as debugger)
Thanks,
Geoff Schultz
==================================
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.
==================================
- object removal from list causing core dump,
Geoffrey Schultz <=