swarm-support
[Top][All Lists]
Advanced

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

[Swarm-Support] Compiling a model on Swarm 2.2 [Pietro Terna's CD versio


From: Gary Polhill
Subject: [Swarm-Support] Compiling a model on Swarm 2.2 [Pietro Terna's CD version]
Date: Tue, 10 Aug 2004 13:22:47 +0100

Hi,

I have a model I have finally got working on an XP PC with the version of Swarm 
2.2 supplied with Pietro Terna's CD download (linked from wiki.swarm.org). This 
model originally compiled and ran successfully on a Solaris box running Swarm 
testing 2001-12-18. Here is a list of problems I had and their solutions in 
case anyone else has them:

On Swarm 2.1.1 (Windows 2K) and Swarm 2.2 (Windows XP) I have an issue with 
message forwarding, which I used in one of my classes (subclassed from Swarm). 
I have fixed this by reimplementing all the methods and not using forwarding at 
all, but it would be useful to hear some confirmation that I shouldn't expect 
message forwarding to work in these environments.

On Swarm 2.2 (Windows XP) I was calling a class method of a subclass of the 
Object class before initSwarm() gets called in main.m. I then got a core dump 
with the error message:

assertion "__objc_class_hash" failed: file "/src/Swarm/swarm/libobjc/class.c" 
line 130

Moving the class method call to after initSwarm() is called fixed this. It 
would be useful to have confirmation that it's not a good idea to do any method 
calls before calling initSwarm() (or one of its variations).

Finally: I have the line in ObserverSwarm (archiver is an instance of 
LispArchiver):

model = [archiver getWithZone: self key: "modelSwarm"];

which crashes with error message:

*** event raised for error: InvalidArgument
*** function: typeError(), file: /src/Swarm/swarm/src/defobj/internal.m, line: 
973
Segmentation fault (core dumped)

>From gdb, it was clear that this was choking on a piece of code in the 
>parameters.scm file that said:

#:winnerCoord <2,2>

Replacing the < and > with [ and ] worked. (However, I get Tcl errors with 
Swarm 2.1.1 for any parameter containing square brackets.) Two lessons here: 
(i) it would be handy to have somewhere details of what we're allowed to put in 
parameter files for reading with LispArchiver so we can choose formats for 
parameters well, and (ii) is there any chance the error messages could be a bit 
more helpful? I spent ages trying to track down this problem!

Gary






reply via email to

[Prev in Thread] Current Thread [Next in Thread]