swarm-support
[Top][All Lists]
Advanced

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

problem using ListIndex


From: Andre Costa
Subject: problem using ListIndex
Date: Fri, 19 Nov 1999 14:15:24 +1030 (CST)

Hi All,
I am writing a Swarm simulation in Java, under

FreeBSD  3.2
JDK      1.1.8
Swarm    2.0.1

and am getting a rather confusing error/system dump when I try to
initialize a ListIndex using the listBegin method.

In my simulation, I have reached the point where
I need to "kill" agents if certain conditions are met. I am following the
general approach suggested by Manor Askenazi (mailing list archives
16/10/96, "Death In Swarm"), namely to create a "reaperList" in which
agents may be placed, and then empty the contents of the reaperList at
every time step, by iterating over the reaperList with a ListIndex and
dropping each agent using the drop method.

The reaperList is created successfully and I have verified that agents are
being placed in the list as expected (I verify this by checking the
number of objects in the reaperList as they are placed in it). 

The problem arises when I initialize a ListIndex in the
emptyReaperList() method of the ModelSwarm as follows;

ListIndex index = new ListIndexImpl();   //** this line OK
 if(reaperList.getCount() != 0) {
  index =  reaperList.listBegin(getZone());  //** this causes seg. fault
  }

The indicated line causes some kind of segmentation fault and error
message (see below) which i cannot decipher. I have not even got as
far as iterating over the List or dropping agents. When I comment out the
line:

index =  reaperList.listBegin(getZone());

there are no errors and the sim. runs as expected. Can anybody tell me if
this is likely to be a system/compiler problem, or if it is more likely to
be a programming error ? The error message I get is printed below.
Thanks in advance, 
---------------------------------------------------------------------
Andre Costa                             
Research Student   

Teletraffic Research Centre           Telephone: (08) 8303 3237
Department of Applied Mathematics     Fax:       (08) 8303 4395
University of Adelaide                Email:address@hidden
South Australia  5005
----------------------------------------------------------------------          

++++++++++ HERE IS A COPY OF THE ERROR MESSAGE +++++++++++++++


SIGSEGV   11*  segmentation violation

Full thread dump:
    "Finalizer thread" (TID:0x28471210, sys_thread_t:0x29275f00, state:CW)
prio=1
    "Async Garbage Collector" (TID:0x28471258, sys_thread_t:0x29254f00,
state:R) prio=1
    "Idle thread" (TID:0x284712a0, sys_thread_t:0x29233f00, state:R)
prio=0
    "Clock" (TID:0x28471088, sys_thread_t:0x29212f00, state:CW) prio=12
    "main" (TID:0x284710b0, sys_thread_t:0x804f900, state:R) prio=5
*current thread*
        GAModelSwarm.emptyReaperList(GAModelSwarm.java:197)
        StartGA.main(StartGA.java:25)
Monitor Cache Dump:
    <unknown key> (0x29254f00): owner "Async Garbage Collector"
(0x29254f00, 1 entry)
Registered Monitor Dump:
    Thread queue lock: <unowned>
    Name and type hash table lock: <unowned>
    String intern lock: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class loading lock: <unowned>
    Java stack lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Has finalization queue lock: <unowned>
    Finalize me queue lock: <unowned>
        Waiting to be notified:
            "Finalizer thread" (0x29275f00)
    Monitor IO lock: <unowned>
    Child death monitor: <unowned>
    Event monitor: <unowned>
    I/O monitor: <unowned>
    Alarm monitor: <unowned>
        Waiting to be notified:
            "Clock" (0x29212f00)
    Memory allocation lock: <unowned>
    Monitor registry: owner "main" (0x804f900, 1 entry)
Thread Alarm Q:
Abort trap



                  ==================================
   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]