[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loa
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab) |
Date: |
Thu, 26 May 2016 00:21:04 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #8, bug #48018 (project octave):
I tracked it down to something similar. I wasn't as handy as you at being
able to uncompress just a part of the file. But single-stepping with gdb
shows that the tag for the bad file is 13,448 bytes. And in ls-mat5.cc there
is
destLen = tmp[1] + 8;
std::string outbuf (destLen, ' ');
// FIXME: find a way to avoid casting away const here!
int err = uncompress (reinterpret_cast<Bytef *>
(const_cast<char *> (outbuf.c_str ())),
&destLen, reinterpret_cast<Bytef *> (inbuf),
element_length);
destLen is the recently uncompressed length tag.
Just for fun, I modified ls-mat5.cc to have
destLen = tmp[1] + 8 + 4096;
which gives a bigger buffer. The uncompress call sets destLen to the true
size, so this doesn't do anything other than waste memory most of the time.
With that in place, I get a little farther and the new error is
error: load: invalid array flags subelement
This is again probably because the element lengths are off. I'm not sure how
Matlab is managing to cope with that, but that is a curiosity. I think we
should mark this as "Won't Fix" since it is some strangeness is the EFM tool
code.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48018>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab), anonymous, 2016/05/25
- [Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab), Rik, 2016/05/25
- [Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab), Mike Miller, 2016/05/25
- [Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab), anonymous, 2016/05/25
- [Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab), Rik, 2016/05/25
- [Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab), Mike Miller, 2016/05/25
- [Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab), Mike Miller, 2016/05/25
- [Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab), Mike Miller, 2016/05/25
- [Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab), Mike Miller, 2016/05/25
- [Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab),
Rik <=
- [Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab), Mike Miller, 2016/05/25