swarm-support
[Top][All Lists]
Advanced

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

Re: Maps and LispArchiver


From: Benedikt Stefansson
Subject: Re: Maps and LispArchiver
Date: Tue, 16 Nov 1999 17:30:47 -0700

Please ignore previous message.

For some reason the LispArchiver now works with the beforementioned map.
Since I have no idea what caused it to work I have to suspect my own
ineptitude.

Regards,
Benedikt


> Marcus,
>
> Quick question. I can successfully load a map with keys that are strings
> and members that are objects using the LispArchiver. Saving the same map
> doesn't work:
>
>   /* Load serialization data */
>   archiver = [LispArchiver createBegin: globalZone];
>   [archiver setPath: infilename];
>   archiver = [archiver createEnd];
>
>   /* Load rule map */
>   map_rules              = [archiver getObject: "map_rules"];
>
> ...
>
>    /* Save rule map */
>   archiver = [LispArchiver createBegin: globalZone];
>   [archiver setPath: outfilename];
>   archiver = [archiver createEnd];
>
>   [archiver putShallow: "map_rules" object: map_rules];
>   [archiver save];
>
> I've tried both deep and shallow serialization, nothing seems to work
> for saving a map. However if the collection is a list this works:
>
>    /* Save list */
>   archiver = [LispArchiver createBegin: globalZone];
>   [archiver setPath: outfilename];
>   archiver = [archiver createEnd];
>
>   [archiver putShallow: "list_rules" object: list_rules];
>   [archiver save];
>
> Is this a bug or a feature? I'm sure you're going to point me to HDF5,
> but  having  humanly readable files is an advantage.
>
> Benedikt
>
> PS: The bt from the crash when the collection is a map:
>
> #0  0x405c88f3 in _IO_fputs (str=0x0, fp=0x85ac730) at iofputs.c:34
> #1  0x401f2919 in -[OutputStream(c) _catC:] (self=0x8500398,
> _cmd=0x401c6d10,
>     cstring=0x0)
>     at
> /home/alex/redhat/BUILD/swarm-2.0.1/src/collections/OutputStream.m:60
> #2  0x401acf26 in lisp_output_type ()
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/defobj/internal.m:366
> #3  0x4019e65b in store_object (ivar=0x8052b90)
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/defobj/DefObject.m:1086
> #4  0x401ac4cf in map_ivars ()
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/defobj/internal.m:234
> #5  0x401ac46c in map_ivars ()
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/defobj/internal.m:234
> #6  0x4019e6b4 in -[Object(s) _lispOutVars:deep:] (self=0x82849f8,
>     _cmd=0x401c2cf0, stream=0x8500398, deepFlag=0 '\000')
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/defobj/DefObject.m:1093
> #7  0x4019e76b in -[Object(s) __lispOut::deep:] (self=0x82849f8,
>     _cmd=0x401c2d00, stream=0x8500398, deepFlag=0 '\000')
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/defobj/DefObject.m:1101
> #8  0x4019e7d5 in -[Object(s) _lispOutShallow:] (self=0x82849f8,
>     _cmd=0x402047a0, stream=0x8500398)
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/defobj/DefObject.m:1108
> #9  0x401f08d3 in -[Map(c) __lispOut::deep:] (self=0x8284898,
> _cmd=0x40204810,
>     outputCharStream=0x8500398, deepFlag=0 '\000')
> ---Type <return> to continue, or q <return> to quit---
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/collections/Map.m:812
> #10 0x401f0bb5 in -[Map(c) _lispOutShallow:] (self=0x8284898,
> _cmd=0x401c0378,
>     stream=0x8500398)
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/collections/Map.m:847
> #11 0x40194933 in lisp_output_objects (objectMap=0x85ac628,
>     outputCharStream=0x8500398, deepFlag=0 '\000', systemArchiverFlag=0
> '\000')
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/defobj/LispArchiver.m:282
>
> #12 0x40194a95 in lisp_output_app_objects (app=0x850d098,
>     outputCharStream=0x8500398, systemArchiverFlag=0)
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/defobj/LispArchiver.m:302
>
> #13 0x40194d08 in -[LispArchiver(c) __lispOut::] (self=0x8502f88,
>     _cmd=0x401c0518, outputCharStream=0x8500398)
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/defobj/LispArchiver.m:332
>
> #14 0x40195348 in -[LispArchiver(c) _save] (self=0x8502f88,
> _cmd=0x80527c8)
>     at /home/alex/redhat/BUILD/swarm-2.0.1/src/defobj/LispArchiver.m:426
>
> #15 0x80494cf in main (argc=3, argv=0xbffffba4) at main.m:196
> #16 0x4058f1eb in __libc_start_main (main=0x8048d70 <main>, argc=3,
>     argv=0xbffffba4, init=0x8048b54 < >, fini=0x804f24c < >,
>     rtld_fini=0x4000a610 <_dl_fini>, stack_end=0xbffffb9c)
>     at ../sysdeps/generic/libc-start.c:90
>
>                   ==================================
>    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.


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