bugGNU Octave - Bugs: bug #32242, incomplete initialisation of...


bug #32242: incomplete initialisation of object arrays - follow up to bug #32222

Submitted by:  Volkmar Glauche <glauche>
Submitted on:  Tue 25 Jan 2011 11:41:32 AM UTC  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich 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)

Fri 28 Jan 2011 08:26:54 AM UTC, comment #11:

I was not logged in yesterday night - this issue is fixed in with the patch.



Volkmar Glauche <glauche>
Thu 27 Jan 2011 10:28:04 PM UTC, comment #10:

It seems to work for me. Thank you very much for fixing it.

Thu 27 Jan 2011 10:17:05 PM UTC, comment #9:

Can you please confirm that the patch I checked in fixes the problem described in this bug report?

John W. Eaton <jwe>
Project Administrator
Thu 27 Jan 2011 02:48:08 PM UTC, comment #8:

please disregard comment #7, it does belong to bug #32261.

Volkmar Glauche <glauche>
Thu 27 Jan 2011 01:39:07 PM UTC, comment #7:

I've uploaded the data to

Please forgive the huge amount of data and code involved. I do hope the steps to reproduce the problem are a hint as to what is going wrong.

Volkmar Glauche <glauche>
Thu 27 Jan 2011 11:21:35 AM UTC, comment #6:

I checked in an additional changeset:


With it, I see

So maybe this will fix the problem for you.

John W. Eaton <jwe>
Project Administrator
Thu 27 Jan 2011 10:03:56 AM UTC, comment #5:

I'm not sure whether the load issue was related, but it seems to be gone now. However, the original problem still persists in one way or the other. Running the attached test_job.m as a script, the field

should contain a properly initialised cfg_dep, but it doesn't. Again, the empty substructs are lost. The file test_job.mat contains the same variable, correctly saved in MATLAB and loadable in octave.

(file #22530, file #22531)

Volkmar Glauche <glauche>
Thu 27 Jan 2011 09:26:40 AM UTC, comment #4:

Was that problem caused by the patch, or was it also failing to load the object before the patch was applied?

I checked in the following change.


It seems to fix the problem for me.

John W. Eaton <jwe>
Project Administrator
Thu 27 Jan 2011 09:02:31 AM UTC, comment #3:

There is now another problem: loading a .mat file with a cfg_dep object fails. After a cfg_dep object is created from the command line, load does not fail anymore. (see attached file)

(file #22524)

Volkmar Glauche <glauche>
Thu 27 Jan 2011 01:43:40 AM UTC, comment #2:

I checked in the following change:


Jaroslav, do you see a better way to solve this problem?

This seems to fix the bug for me, but I'll wait for feedback before closing the report.

John W. Eaton <jwe>
Project Administrator
Tue 25 Jan 2011 12:52:23 PM UTC, comment #1:

There seems to be a different behaviour in MATLAB and octave in this case, which is handled in cfg_dep/subsasgn.m. In MATLAB, cfg_dep/subsasgn is called with the following arguments:

Here, dep is not yet classified, and more importantly, it is empty.

In Octave, the situation is different.

Here, dep is not empty, but the properties do not seem to be initialised by the constructor code either. For MATLAB compatibility, dep should be empty under these circumstances.

Volkmar Glauche <glauche>
Tue 25 Jan 2011 11:41:32 AM UTC, original submission:

Using the same code as in bug #32222, the following produces incorrect results:

d(1) does not get initialised properly, but d(2) does. In MATLAB, both d(1) and d(2) get initialised.

Volkmar Glauche <glauche>


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

Attach File(s):

Attached Files
file #22530:  test_job.m added by glauche (2KiB - text/x-objcsrc)
file #22531:  test_job.mat added by glauche (841B - application/octet-stream)
file #22524:  dep.mat added by glauche (320B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by jwe
  • -unavailable- added by glauche (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 28 Jan 2011 10:36:23 AM UTCjweStatusReady For Test=>Fixed
    Thu 27 Jan 2011 10:03:56 AM UTCglaucheAttached File-=>Added test_job.m, #22530
      Attached File-=>Added test_job.mat, #22531
    Thu 27 Jan 2011 09:02:31 AM UTCglaucheAttached File-=>Added dep.mat, #22524
    Thu 27 Jan 2011 01:43:40 AM UTCjweStatusNone=>Ready For Test
      Carbon-Copy-=>Added highegg

    Back to the top

    Powered by Savane 3.1-cleanup1