[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrick McNeill |
Date: |
Mon, 22 Jul 96 09:39:02 EDT |
I've got a big problem and no idea of what it is... In my sim, it keeps
dumping core on the same line - the exact reason depends on whether or not the
line is uncommented. I've looked at everything but haven't come up with
anything... Here's the trace:
(uncommented line 123)
#0 0xd28c4 in objc_msg_lookup (receiver=0x0, op=0xf6010) at sendmsg.c:119
#1 0x9774 in _i_UAVModelSwarm__buildObjects (self=0x17a708, _cmd=0xf5aa0)
at UAVModelSwarm.m:123
#2 0x72e4 in _i_OmniObserverSwarm__buildObjects (self=0x15c230, _cmd=0xf542c)
at OmniObserverSwarm.m:72
#3 0x507c in main (argc=1, argv=0xeffffca4) at main.m:10
(commented line 123)
#0 0xd2844 in objc_msg_lookup (receiver=0x14d138, op=0xf6008) at sarray.h:210
#1 0x9774 in _i_UAVModelSwarm__buildObjects (self=0x17a6f8, _cmd=0xf5aa0)
at UAVModelSwarm.m:123
#2 0x72e4 in _i_OmniObserverSwarm__buildObjects (self=0x15c220, _cmd=0xf542c)
at OmniObserverSwarm.m:72
#3 0x507c in main (argc=1, argv=0xeffffca4) at main.m:10
In both cases, before the first prompt gdb says <filename>:xxx:No such file or
Directory, where filename is either sendmsg.c or sarray.c and xxx is 119 or 210.
I assume this is because they aren't in the directory with my sim...
The actual code, the buildObjects in UAVModelSwarm.m is:
-buildObjects
{
int i;
int tempX;
int tempY;
if ((tankWorld == nil) || (buildWorld == nil))
{
[InvalidCombination raiseEvent: "You didn't assign a tankWorld
to the UAVModelSwarm class."];
}
[super buildObjects];
world = [Grid2d createBegin: [self getZone]];
[world setSizeX: worldXSize Y: worldYSize];
world = [world createEnd];
[world setOverwriteWarnings: 0];
UAVList = [List create: [self getZone]];
for (i=0;i<numUAV;i++)
{
UAVBase * uav;
writeInt(i); writeMsg("Entering loop");
uav = [UAVBase createBegin: [self getZone]];
[uav setWorld: world];
[uav setTankWorld: tankWorld];
[uav setBuildWorld: buildWorld];
uav = [uav createEnd];
[UAVList addLast: uav];
tempX = [uniformRandom rMin: 250 Max: 300];
tempY = [uniformRandom rMin: 250 Max: 300];
writeInt(i); writeMsg("Finding Position");
while ([world getObjectAtX: tempX Y: tempY] != nil)
{
tempX = [uniformRandom rMin: 250 Max: 300];
tempY = [uniformRandom rMin: 250 Max: 300];
}
writeInt(i); writeMsg("Position Found");
[uav setCurDirection: [uniformRandom rMin: 1 Max: 2]];
// The following line is the one that the core dumps on...
[uav setCurAcceleration: 0.0];
writeInt(i); writeMsg("Past acceleration placement");
[uav setCurVelocity: [uniformRandom rMin: 7 Max: 10]];
[uav setColor: 61];
[uav setX: tempX Y: tempY Z: 10];
}
return self;
}
Just so you know, writeMsg and writeInt are two logging functions I wrote for
debugging, and don't affect the error (except the line number).
If anybody can give me any help I would be really appreciative... Thanks!!!!!
-Patrick McNeill
http://www.tjhsst.edu/people/pmcneill address@hidden
-< Web >- -< Email >-
--------------------------------------------------------------------
And now a daily fortune...
--------------------------------------------------------------------
"Dun't cume-a beck unteel yuoo hefe-a heem", zee Teeck-Tuck Mun seeed qooeeetly,
seencerely, ixtremely dungeruoosly.
Zeey used dugs. Zeey used prubes. Zeey used cerdeeu plete-a crussuffffs.
Zeey used teepers. Zeey used breebery. Zeey used steeck teetes. Zeey
used inteemideshun. Zeey used turment. Zeey used turtoore-a. Zeey used
feenks. Zeey used cups. Zeey used seerch und seeezoore-a. Zeey used
fellerun. Zeey used betterment incenteefes. Zeey used feenger preents.
Zeey used zee berteelliun system. Zeey used coonneeng. Zeey used gooeele-a.
Zeey used treechery. Zeey used Reuool-Meetgung boot he-a vesn't mooch help.
Zeey used eppleeed physeecs. Zeey used techneeqooes ooff creeminulugy. Und
vhet zee hell, zeey cooght heem.
-- Herlun Illeesun, "Repent, Herleqooeen, seeed zee
Teeck-Tuck Mun"
--------------------------------------------------------------------
* Just in case you were wondering, the "fortune" above is
automatically generated from either the "Chef-Fortunes" file, my
new James fortune database, or the standard database.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [no subject],
Patrick McNeill <=