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 Jan 25 11:41:32 2011  
 
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 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)

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

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

Best,

Volkmar

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

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

Anonymous
Thu Jan 27 22:17:05 2011, 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 Jan 27 14:48:08 2011, comment #8:

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

Volkmar Glauche <glauche>
Thu Jan 27 13:39:07 2011, 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 Jan 27 11:21:35 2011, comment #6:

I checked in an additional changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/88ff30dcc048

With it, I see

So maybe this will fix the problem for you.

John W. Eaton <jwe>
Project Administrator
Thu Jan 27 10:03:56 2011, 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 Jan 27 09:26:40 2011, 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.

http://hg.savannah.gnu.org/hgweb/octave/rev/a71c1aa9823e

It seems to fix the problem for me.

John W. Eaton <jwe>
Project Administrator
Thu Jan 27 09:02:31 2011, 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 Jan 27 01:43:40 2011, comment #2:

I checked in the following change:

http://hg.savannah.gnu.org/hgweb/octave/rev/d08901c05c1b

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 Jan 25 12:52:23 2011, 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 Jan 25 11:41:32 2011, 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):
   
   
Comment:
   

Attached Files
file #22530:  test_job.m added by glauche (2kB - 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 Jan 28 10:36:23 2011jweStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu Jan 27 10:03:56 2011glaucheAttached File-=>Added test_job.m, #22530
      Attached File-=>Added test_job.mat, #22531
    Thu Jan 27 09:02:31 2011glaucheAttached File-=>Added dep.mat, #22524
    Thu Jan 27 01:43:40 2011jweStatusNone=>Ready For Test
      Carbon-Copy-=>Added highegg

    Back to the top


    Powered by Savane 3.1-cleanup