octave-maintainers
[Top][All Lists]
Advanced

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

Problem loading/saving of lists and structures.


From: Joao Cardoso
Subject: Problem loading/saving of lists and structures.
Date: Sun, 12 Mar 2000 01:35:30 +0000

Hi,

Octave is start having problems with the save and load of list and
structures in its development versions (2.1.xx).

Up to now, at least three versions exist for this purpose in the
octave-sources mailing lists. Also, boolean variables can't be saved,
but no patch for it exists (yet :-).

I am using my version since Octave version 2.1.12, and use it everyday
for loading and saving 'datasets', which consists of structures and
lists. Perhaps I should do it using the HDF5 format, but now it is too
late. To avoid future incompatibilities between packages and our own
script files, I think that this question must be addressed, please.

Joao


http://www.che.wisc.edu/octave/mailing-lists/octave-sources/2000/7

>  This version adds support for saving and loading Octave structures.  I 
> believe
>  that my patch is currently the only way to save and load structures (and
>  lists) in Octave.

http://www.che.wisc.edu/octave/mailing-lists/octave-sources/2000/31

> Unfortunately, saving of structures is not working.  The version 5
> binary format requires a header for each variable, which includes
> among other things the length of the data.  This makes loading the
> data convenient but saving it awkward.  My implementation includes two
> walks of a structure.  The first time, a structure is built which
> includes the lengths of each element.  The second time, the data is
> actually written.  Unfortunately, the code segfaults during the first
> walk.  The code on that line (line 2851 of load-save.cc, marked
> "SEGFAULT here!") is harmless.  Apparently the real problem is the
> attempt to free the Matrix m as it goes out of scope.  I do not
> understand what is going on here, and would appreciate some help.

http://www.che.wisc.edu/octave/mailing-lists/octave-sources/1999/4

> I enclose a (6Kbytes) patch against octave-2.1.12 that enables load/save
> of lists and structures. Comments and bug reports are welcome.

Note: the above patch works on 2.1.28 also, and can be found at
http://merlin.inescn.pt/~qual/Octave.



reply via email to

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