swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] Lisp saving objects subclassed from Arguments_c


From: Marcus G. Daniels
Subject: Re: [Swarm-Support] Lisp saving objects subclassed from Arguments_c
Date: Sun, 15 Apr 2007 12:27:13 -0600
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

Paul Johnson wrote:
I have wondered about the following problem for some time. When a model is started with initSwarmArguments, and the user supplies the argument/parameter class "Parameters", there is trouble when one tries to save that argument object with lisp archiver.
[..]


That causes a segmentation fault and the backtrace points at the lispOutVars method.

I suspect it is because there is a function variable in Arguments_c, that serialization code doesn't know how to handle. I haven't checked that is indeed where the crash is, but it's the only difference I can think of offhand. Swarm should really just skip over those. With Java, only public variables are serialized, which makes it easy to accommodate situations like this. For Objective C, I think your approach of having a separate object to save is cleaner anyway. Incidentally, in true Lisp, it is possible to serialize functions and methods (and also to mutate them as data). This makes it easy to move code around in a distributed simulation environment.
reply via email to

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