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

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

[Octave-bug-tracker] [bug #60450] load fails to read MAT file


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #60450] load fails to read MAT file
Date: Fri, 23 Apr 2021 21:59:44 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

URL:
  <https://savannah.gnu.org/bugs/?60450>

                 Summary: load fails to read MAT file
                 Project: GNU Octave
            Submitted by: jwe
            Submitted on: Sat 24 Apr 2021 01:59:42 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: jwe
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

Attempting to load the attached MAT file (created with Matlab) fails with the
following error:


octave:1> load Aj_23_640.mat 
error: load: error uncompressing data element (buf error from zlib)


After much puzzling over the reason for the error, I've concluded that the
compressed data block in the file is uncompressed correctly by zlib, but the
uncompress function that we are using to do that is returning Z_BUF_ERROR when
I think it should be Z_OK.

I'm using zlib 1.2.11.dfsg-2 on a Debian system.

I have a workaround (ignore the Z_BUF_ERROR condition if the compressed data
is completely processed and the uncompressed data is the expected size) but
that seems klugey.  Maybe someone who understands zlib better than me can
comment?

The code that performs the uncompression is here: 
http://hg.savannah.gnu.org/hgweb/octave/file/33556123b892/libinterp/corefcn/ls-mat5.cc#l518

The code that does the uncompress step is here: 



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 24 Apr 2021 01:59:42 AM UTC  Name: Aj_23_640.mat  Size: 714KiB   By:
jwe

<http://savannah.gnu.org/bugs/download.php?file_id=51313>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60450>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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