[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Swarm-Support] The problem in lispAppArchiver. (concerns saving window
From: |
Paul Johnson |
Subject: |
[Swarm-Support] The problem in lispAppArchiver. (concerns saving window geometry & loading parameters) |
Date: |
Thu, 13 Jul 2006 00:39:26 -0500 |
User-agent: |
Thunderbird 1.5.0.4 (X11/20060614) |
About 1 month ago Pietro noticed that the ~/.swarmArchiver file is no
longer created when we run Swarm-2.2 on Fedora Core Linux. I'm trying
to figure that one out, along with some other lisp related troubles. I
FEAR that I introduced this problem while hacking Swarm to compile on
FC5. But Marcus also suspects that there might be a version related
wrinkle in gcc and nested functions.
Recently, I tried to run some programs that use scm parameter files,
such as the ASM and Heatbugs in batch mode. Both of them fail because
the global object lispAppArchiver is not able to find "asm.scm" and
"heatbugs.scm" (respectively).
For that problem, I've found a solution is to explicitly set the
parameter file, changing code in Heatbugs like so. In main.m,
change this method of creating theTopLevelSwarm:
if ((theTopLevelSwarm = [lispAppArchiver getWithZone: globalZone
key: "batchSwarm"]) == nil)
to this:
id archiver;
archiver = [LispArchiver create: globalZone
setPath:"/home/pauljohn/swarm/OtherPeoplesCode/swarmapps-objc-2.2-2/heatbugs/heatbugs.scm"];
theTopLevelSwarm = [archiver getWithZone: globalZone key:
"batchSwarm"];
[archiver drop];
if ( theTopLevelSwarm == nil)
raiseEvent(InvalidOperation,
"Can't find the parameters to create batchSwarm");
A similar change HeatbugBatchSwarm.m replaces the use of lispAppArchiver
to a user specified scm file.
After that, "heatbugs -b" runs.
So I started to wonder "what's wrong with lispAppArchiver"?
I don't think it is being created at all.
Start any swarm model in gdb, and after initSwarm() runs, guess what?
(gdb) print lispAppArchiver
$2 = (struct objc_object *) 0x0
Humph!
What the heck?
Here's one hint. With the gcc-4.1, it appears to me that compiled
programs no longer fail when a message is sent to nil. That's how
Heatbugs gets so far as it does, the lispAppArchiver is nil but objc
does not warn you.
I'm curious to know if anybody has this experience on other platforms,
or if somebody knows what to do about it?
pj
--
Paul E. Johnson email: address@hidden
Professor, Political Science http://pj.freefaculty.org
1541 Lilac Lane, Rm 504
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66044-3177 FAX: (785) 864-5700
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Swarm-Support] The problem in lispAppArchiver. (concerns saving window geometry & loading parameters),
Paul Johnson <=