bugGNU Octave - Bugs: bug #37087, empty struct not empty after being...


bug #37087: empty struct not empty after being saved in MATLAB binary data format.

Submitted by:  Guillaume <gyom>
Submitted on:  Mon Aug 13 19:14:00 2012  
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: GuillaumeOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Tue Oct 16 19:39:32 2012, comment #8:

Fixed in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/39fd2ad26fb7). You will need to pull from the latest Mercurial sources and build from scratch in order to see the fix.

Rik <rik5>
Project Administrator
Tue Oct 16 00:51:16 2012, comment #7:

I tested the patch and it works fine. How would you like to be credited in the Mercurial ChangeLog? Ordinarily we do "Firstname Lastname <email@address>". If you have privacy concerns we can also work out something else.

Rik <rik5>
Project Administrator
Thu Sep 20 16:44:07 2012, comment #6:

I've been using this patch for some time now:

It fixed the bug I was reporting and I didn't see any side effect since then.
Could someone review the change and push it if OK? Many thanks.

Guillaume <gyom>
Fri Aug 17 16:45:18 2012, comment #5:

It seems to work if I change l.1147 of src/interp-core/ls-mat5.cc so that instead of:
Octave_map m (dim_vector (1, 1));
it reads:
Octave_map m (dims);
but then I don't understand how it could work before when one of the dimension of the struct array was greater than 1.

Guillaume <gyom>
Wed Aug 15 18:27:08 2012, comment #4:

I did actually look at this file earlier but couldn't figure out where the problem was taking place.

Just got GDB running following this:
but nothing meaningful yet...

Guillaume <gyom>
Wed Aug 15 16:04:45 2012, comment #3:

Sorry, I meant, here:


Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Wed Aug 15 15:58:10 2012, comment #2:

Wanna have a stab at debugging the problem yourself? Run Octave in a debugger and set a breakpoint here:


Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Wed Aug 15 13:57:12 2012, comment #1:

To be more precise, the problem is with load() and not save(), i.e. file A.mat is fine but is read erroneously (found out by cross-checking with MATLAB).

Guillaume <gyom>
Mon Aug 13 19:14:00 2012, original submission:

The size of an empty struct (struct([])) changes when saved in MATLAB binary data format:

Guillaume <gyom>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by gyom (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Oct 16 19:39:32 2012rik5StatusIn Progress=>Fixed
    Tue Oct 16 00:51:16 2012rik5CategoryNone=>Libraries
      StatusNone=>In Progress

    Back to the top

    Powered by Savane 3.1-cleanup1