swarm-support
[Top][All Lists]
Advanced

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

Re: A Basic question


From: Kelly Lautt
Subject: Re: A Basic question
Date: Mon, 11 Oct 1999 13:23:42 -0700

You asked what bt reports after the crash from initswarm. I have first
included that and then also my main.m contents adn the createBegin adn
createEnd of my modelSwarm just in case either of these pieces help. It is
VERY likely that I am doing something obviously wrong since I do not
understand these parts of the cade basically at all. I looked in teh
create.h file in Swarm itself as well, but it didn't help me (too ignorant
still to understand what it was up to). By the way, what is a segmentation
fault? Is that also to do with memory?

bt:
(gdb) bt
#0  0x100477e1 in _size_of_stack_reserve__ ()
Cannot access memory at address 0x2000000.

Main.m:
#import <simtools.h>
#import "ModelSwarm.h"

int
main(int argc, const char ** argv)
{
  file://id modelSwarm;
  ModelSwarm *  modelSwarm;

  printf ("main1\t");
  initSwarm(argc, argv);
  printf ("main2\t");
  modelSwarm = [ModelSwarm create: globalZone];
  printf ("main3\t");
  [modelSwarm makePopulationsAndNeighbourhoods];
  printf ("main4\t");
  [modelSwarm runRounds];
  printf ("main5\t");
}


The createBegin and createEnd in ModelSwarm:
// ModelSwarm.m

#import "ModelSwarm.h"
#import <simtools.h>
#import <stdio.h>

@implementation ModelSwarm

+createBegin: (id)  aZone
{
  ModelSwarm * obj;
  obj = [super createBegin: aZone];
  printf("MS-createbegin1\t");
  return obj;
}

-createEnd
{ 
  printf("MS-createend1\t");
  [ObjectLoader load: self fromFileNamed: "model.setup"];
  printf("MS-createend2\t");
  return [super createEnd];
}

Any further clues?




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