octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #51741] zlib error when loading .mat file on W


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #51741] zlib error when loading .mat file on Windows 10 64bit
Date: Wed, 16 Aug 2017 12:02:44 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #6, bug #51741 (project octave):

I spent about 30 minutes looking at this file to make sure there's nothing
unusual about it. It seems like a correct mat file, and following along by
hand it looks like Octave is reading the file correctly. If you want to pursue
this bug, you'll want to debug the function read_mat5_binary_element using
gdb, and print what your instance of Octave thinks it is trying to
decompress.

The mat file contains two elements, both compressed. The file is in
little-endian format. The byte offset of the first compressed element is 136,
and its compressed size is 7511543 bytes. The byte offset of the second
compressed element is 7511687 and its compressed size is 77 bytes.

I was able to manually decompress both elements at the command-line with


$ dd if=ex4data1.mat bs=1 skip=INDEX count=SIZE | pigz -dz | hexdump -C


and verify that the inner contents of the compressed elements look correct as
well. The first element is named "X", type double, size 5000×400. The second
element is named "y", type double, size 5000×1.

That's farther than your copy of Octave was able to go, since it errored out
at the point of trying to decompress one of the compressed blocks. If you
debug into this function, you should be able to print out the size of the
block that it thinks it is decompressing, how large the uncompressed buffer
is, and so on.

That's about as much as I can debug this at the moment, the file looks correct
and Octave's algorithm for reading the file corresponds to what I can read out
of the file manually, so you'll have to find where it's going wrong on your
system.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51741>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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