swarm-support
[Top][All Lists]
Advanced

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

Just in case you run into this problem with lispAppArchiver usage


From: Paul Johnson
Subject: Just in case you run into this problem with lispAppArchiver usage
Date: Thu, 16 Mar 2000 17:35:50 -0600

Greetings, oh swarm using community.

I am trying to understand one of the new-fangled swarm thingies, the
lispAppArchiver. I've never used it before, but one of my students has
found some trouble in it and while bug shooting I got curious about it. 
The conclusion I reach is that the lispAppArchiver is very sensitive to
the specificiation of values inserted into the scm file and that
mistakes in that specification can cause very difficult-to-find errors

His syntax in ObserverSwarm.m is like this:

 if ((modelSwarm =
       [lispAppArchiver getWithZone: self key: "modelSwarm"]) == nil)
    raiseEvent(InvalidOperation,
               "Can't find the modelSwarm parameters");

In his Makefile he has
DATAFILES=competition.scm

(the app is called competition)

The competition.scm file seems to be a very touchy entity. If I delete
all the variables from it, his application runs. However, there is one
that causes a lot of trouble.

He has a variable in ModelSwarm.h called:

  float probabConst;

If the competition.scm has stuff like this:

(list 
 (cons 'modelSwarm
       (make-instance 'ModelSwarm
           #:worldXSize 10
           #:worldYSize 20
           #:noOfFirms 3
           #:probabConst 1.0
                       )))

All is well.

However, if line 7 of the competition.scm file has an ittyp bitty
mistake, sucha as putting a space in a format specifier, as in 

   #:probabConst 1 F0
(incidentally, I don't know why he set it as F0)

or putting
   #:probabConst 1

well, all hell breaks loose.
                       

Then you get this hard-to-understand runtime error and backtrace that is
uninformative.

$ ./competition
/usr/local/src/redhat/BUILD/swarm-2.0.1.20000209/src/defobj/internal.m:1851
object_setVariableFromExpr
Aborted (core dumped)

In MSWindows, the gdb backtrace just says "NO STACK", but on linux I get
more information. The backtrace below is complaining about the
ObserverSwarm.m line I quoted above.

Program received signal SIGABRT, Aborted.
0x405ab4e1 in __kill () from /lib/libc.so.6
(gdb) bt
#0  0x405ab4e1 in __kill () from /lib/libc.so.6
#1  0x405ab156 in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2  0x405ac868 in abort () at ../sysdeps/generic/abort.c:88
#3  0x40223336 in Letext ()
    at
/usr/local/src/redhat/BUILD/swarm-2.0.1.20000209/src/misc/debugabort.c:9
#4  0x401babeb in object_setVariableFromExpr (obj=0x8115ea8,
    ivarName=0x80974f0 "probabConst", expr=0x8097548)
    at
/usr/local/src/redhat/BUILD/swarm-2.0.1.20000209/src/defobj/internal.m:1851
#5  0x401a6149 in _i_Object_s__lispIn_ (self=0x8115ea8, _cmd=0x401d4ee0,
expr=0x81160c0)
    at
/usr/local/src/redhat/BUILD/swarm-2.0.1.20000209/src/defobj/DefObject.m:96
#6  0x401b628d in lispIn (aZone=0x81099d0, expr=0x8097160)
    at
/usr/local/src/redhat/BUILD/swarm-2.0.1.20000209/src/defobj/defobj.m:321
#7  0x401a076a in archiverLispGet (aZone=0x81099d0, string=0x81166f8,
app=0x80941f0)
    at
/usr/local/src/redhat/BUILD/swarm-2.0.1.20000209/src/defobj/LispArchiver.m:403
#8  0x401a07fe in _i_LispArchiver_c___getWithZone__key_ (self=0x8094168,
    _cmd=0x401cf5c8, aZone=0x81099d0, key=0x804a443 "modelSwarm")
    at
/usr/local/src/redhat/BUILD/swarm-2.0.1.20000209/src/defobj/LispArchiver.m:413
#9  0x401a08be in _i_LispArchiver_c__getWithZone_key_ (self=0x8094168,
_cmd=0x804c220,
    aZone=0x81099d0, key=0x804a443 "modelSwarm")
    at
/usr/local/src/redhat/BUILD/swarm-2.0.1.20000209/src/defobj/LispArchiver.m:426
#10 0x804913d in _i_ObserverSwarm__buildObjects (self=0x81099d0,
_cmd=0x804c008)
    at ObserverSwarm.m:61
#11 0x8048ea4 in main (argc=1, argv=0xbffffaa4) at main.m:28
#12 0x405a51eb in __libc_start_main (main=0x8048e20 <main>, argc=1,
argv=0xbffffaa4,
    init=0x8048a88 <_init>, fini=0x804a1dc <_fini>, rtld_fini=0x4000a610
<_dl_fini>, 



-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

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