[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Drop related problems (SimpleExperBug and Map)
From: |
Benedikt Stefansson |
Subject: |
Drop related problems (SimpleExperBug and Map) |
Date: |
Thu, 12 Jun 1997 17:16:48 +0200 |
Glen et alii,
If I am not mistaken Pietro Terno never got a response to his question
about the problem with SimpleExperBug which crashes under Swarm 1.0.1. I
ran the app through GDB and the trace seems to indicate that the problem
lies in line 481 in ExperSwarm.m, when the ExperSwarm sends a drop
message to modelSwarm:
#0 0x8137170 in objc_msg_lookup ()
#1 0x8073efa in notifyObjectDropped (anObject=0x824ac10, realloc=0x0,
pd=0x824cd40) at ProbeDisplay.m:54
#2 0x805d792 in -[Object(s) _dropAllocations:] (self=0x824ac10,
_cmd=0x81763c0, componentAlloc=0 '\000') at DefObject.m:161
#3 0x805d5d3 in _obj_dropAlloc (mapalloc=0xbffffab0,
objectAllocation=0 '\000') at DefObject.m:110
#4 0x80894b2 in -[Zone(c) _mapAllocations:] (self=0x824aba8,
_cmd=0x8176410,
mapalloc=0xbffffab0) at Zone.m:390
#5 0x805d8b1 in -[Object(s) _dropAllocations:] (self=0x824aba8,
_cmd=0x8176460, componentAlloc=0 '\000') at DefObject.m:188
#6 0x805daa0 in -[Object(s) _drop] (self=0x824aba8, _cmd=0x81710d0)
at DefObject.m:219
#7 0x804e7dc in -[ExperSwarm dropModel] (self=0x8210520,_cmd=0x8170ef0)
at ExperSwarm.m:381
The object at 0x824ac10 is the modelSwarm instance and the message sent
by -[ProbeDisplay notifyOjbectDropped] is [modelSwarm drop].
It is obviously useful to be able to drop a modelSwarm and, furthermore,
and also crucial to be abel to drop all objects in a zone by sending the
zone a drop message, i.e. that all objects iheriting from the Swarm
superclass understand a drop message. Otherwise the Swarm zone mechanism
doesn't make much sense.
On a related note, I would very much like a response to a question
raised the other day on how you drop all pointers _AND_ keys from a Map
- from what I can glean from the documentation it is not
enought to say:
[aMap removeAll];
because that will not remove the keys. The -removeKey message in
KeyedCollection seems to be meant for removing the object associated
with a key, not the key itself.
I have been using Maps extensively and don't feel to great about
choosing between bleeding memory or repeatedly dropping and creating new
Map instances.
Some feedback?
Regards,
-Benedikt
--------------------
Benedikt Stefansson address@hidden
Center for Computable Economics Tel. (310) 825-1777
Department of Economics, UCLA Fax. (310) 825-9528
Los Angeles, CA 90095-1477 http://cce.sscnet.ucla.edu
Laboratorio di Economia Tel. (0461) 882246
Dip. di Economia, U. di Trento Fax. (0461) 882222
38100, Trento, Italy http://www-ceel.gelso.unitn.it
==================================
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.
==================================
- Drop related problems (SimpleExperBug and Map),
Benedikt Stefansson <=