[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Need help with nasty core dump!
From: |
Sven Thommesen |
Subject: |
Need help with nasty core dump! |
Date: |
Mon, 02 Dec 1996 15:20:25 -0600 |
Any and all:
I'm racking my brains over a persistent coredump that has crept into my
application after a major revision. It *appears* that there's a problem
with the Zone allocation, but perhaps something else is going on.
My app is a takeoff on Heatbugs, and the coredump happens in method
'buildObjects'.
I'd greatly appreciate any suggestions! The backtrace goes all the way
down into _c_CreateDrop_s__create_ , and I hope someone at the hive is
more able than I to see what the potential problem might be ...
Sven
The backtrace from gdb looks like this:
----------------------------------------
(attached gdb.log)
----------------------------------------
The 'buildObjects' method looks like this:
------------------------------------------
(attached buildobj.m)
------------------------------------------
The 'saveStateToFile' method looks like this:
---------------------------------------------
(attached savestat.m)
---------------------------------------------
Core was generated by `./fashionbugs -batchmode'.
Program terminated with signal 11, Segmentation fault.
#0 0x8094bd2 in _c_CreateDrop_s__create_ (self=0x817a824, _cmd=0x817a85c,
aZone=0x81ca948) at Create.m:28
28 return [[self createBegin: aZone] createEnd];
#0 0x8094bd2 in _c_CreateDrop_s__create_ (self=0x817a824, _cmd=0x817a85c,
aZone=0x81ca948) at Create.m:28
#1 0x806cbcb in _c_OutFile__create_withName_ (self=0x817a824, _cmd=0x817aa14,
aZone=0x81ca948, theName=0x81a1438 "STATE.FBBS90001.R00033.T00000")
at OutFile.m:24
#2 0x806d0f9 in _c_ObjectSaver__save_toFileNamed_ (self=0x817a974,
_cmd=0x8178860, anObject=0x81d9bb0,
aFileName=0x81a1438 "STATE.FBBS90001.R00033.T00000") at ObjectSaver.m:51
#3 0x8065827 in _i_FashionbugBatchSwarm__saveStateToFile (self=0x81d9bb0,
_cmd=0x8178400) at FashionbugBatchSwarm.m:619
#4 0x8063892 in _i_FashionbugBatchSwarm__buildObjects (self=0x81d9bb0,
_cmd=0x81795c4) at FashionbugBatchSwarm.m:138
#5 0x8068e05 in main (argc=2, argv=0xbffffdbc) at main.m:35
#6 0x804ca6b in _start ()
-buildObjects {
id modelZone;
[super buildObjects];
// Dump my own state for debugging:
[self saveStateToFile];
// Create the Model Swarm in a separate zone and pass parameters to it:
modelZone = [Zone create: [self getZone]];
fashionbugModelSwarm = [FashionbugModelSwarm create: modelZone];
[fashionbugModelSwarm setParametersFromObject: parameterAgent];
[fashionbugModelSwarm initState];
// Build the dataLogger agent:
dataLogger = [DataLoggerAgent create: [self getZone]];
[dataLogger setBatchSwarm: self];
[dataLogger setModelSwarm: fashionbugModelSwarm];
[dataLogger setParametersFromObject: parameterAgent];
[dataLogger openDataFiles];
// Now let model swarm build its own objects:
[fashionbugModelSwarm setDataLogger: dataLogger];
[fashionbugModelSwarm buildObjects];
// This is done separately in the ObserverSwarm:
[fashionbugModelSwarm buildAgents];
if (dataSamplingFrequency > 0) {
// Create averagers on the bug swarms:
unhappyFFAverager = [Averager createBegin: [self getZone]];
[unhappyFFAverager setCollection:
[[fashionbugModelSwarm getFashionFollowerSwarm]
getFashionFollowerList]];
[unhappyFFAverager setProbedSelector: M(getUnhappiness)];
unhappyFFAverager = [unhappyFFAverager createEnd];
unhappyFLAverager = [Averager createBegin: [self getZone]];
[unhappyFLAverager setCollection:
[[fashionbugModelSwarm getFashionLeaderSwarm]
getFashionLeaderList]];
[unhappyFLAverager setProbedSelector: M(getUnhappiness)];
unhappyFLAverager = [unhappyFLAverager createEnd];
activatedFLAverager = [Averager createBegin: [self getZone]];
[activatedFLAverager setCollection:
[[fashionbugModelSwarm getFashionLeaderSwarm]
getFashionLeaderList]];
[activatedFLAverager setProbedSelector: M(getActivatedState)];
activatedFLAverager = [activatedFLAverager createEnd];
generatedIAAverager = [Averager createBegin: [self getZone]];
[generatedIAAverager setCollection:
[[fashionbugModelSwarm getInfluenceAgentSwarm]
getInfluenceAgentList]];
[generatedIAAverager setProbedSelector: M(getGeneratedAmt)];
generatedIAAverager = [generatedIAAverager createEnd];
}
-saveStateToFile {
int j;
static char stateFileName[STRMAX];
j = sprintf(stateFileName, stateFileFormat,
agentName, gpp->runNumber, getCurrentTime() );
[ObjectSaver save: self toFileNamed: stateFileName];
return self;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Need help with nasty core dump!,
Sven Thommesen <=