bugGNU Octave - Bugs: bug #53468, Octave 4.3.0+ can't load figures...

 
 

bug #53468: Octave 4.3.0+ can't load figures saved with previous versions

Submitted by:  Pantxo Diribarne <pantxo>
Submitted on:  Sun 25 Mar 2018 09:29:43 PM UTC  
 
Category: PlottingSeverity: 4 - Important
Priority: 5 - NormalItem Group: Regression
Status: Patch SubmittedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

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)

Wed 11 Apr 2018 08:34:05 AM UTC, comment #12:

I agree that the test cases from the patch should be added to stable.

My comment was just that the patch also makes a small change to struct2hdl - I am actually happy with it and think it is a good strategy to create the figure invisible first, populate its content and make it visible at the end if required (it might actually be faster and will prevent a figure to appear temporarily if it was meant to be invisible at the end of the day anyway). As long as the input structure to struct2hdl always defines the "Visible" property then things will behave in the same way. It would affect the following code though:

But it is not an issue if the input to struct2hdl is always coming from hdl2struct/hgload where all of the properties are always present.

Guillaume <gyom>
Wed 11 Apr 2018 12:29:11 AM UTC, comment #11:

I thought this bug was already fixed, the only thing remaining was to add a test case. Is that not right? If it doesn't change behavior I don't see a problem with adding more tests on stable to prevent future regressions.

Mike Miller <mtmiller>
Project Administrator
Tue 10 Apr 2018 09:06:56 AM UTC, comment #10:

@Mike: I think any change that may affect those functions should go to default now (we don't want to change the way we save/load figures in the middle of a major version). So this patch should go to default I think.

@gyom (response to your comment in bug #44670): yes, currently we save all the properties, regardless of their value being the default. So if the figure used to be visible, its "visible" property will be restored afterwards. This is not efficient, but ensures a figure is open in later versions with the same properties values as before. See the example of the colormap which changed between 4.0.x and 4.2.x

Pantxo Diribarne <pantxo>
Project Member
Tue 10 Apr 2018 08:44:24 AM UTC, comment #9:

I wrote a comment about the patch in the wrong bug report, see https://savannah.gnu.org/bugs/?44670#comment14

Guillaume <gyom>
Tue 10 Apr 2018 02:41:56 AM UTC, comment #8:

I haven't had a chance to take a look at this patch or test it yet, do you think this should be on stable for 4.4?

Mike Miller <mtmiller>
Project Administrator
Wed 28 Mar 2018 01:47:58 PM UTC, comment #7:

I attached a patch with two binary files from 4.0.3 and 4.2.1 respectively. The figures (2 subplots with demos "text 2" and "hold 6") contain no ui* objects and no light since struct2hdl doesn't handle those objects.

(file #43704)

Pantxo Diribarne <pantxo>
Project Member
Tue 27 Mar 2018 05:58:55 PM UTC, comment #6:

I think it's appropriate to include data files for tests, preferably in a subdirectory of the test directory along with the associated test commands.

I don't think it's appropriate to have a visible figure appear during the test suite. That would be useful for a demo.

Mike Miller <mtmiller>
Project Administrator
Tue 27 Mar 2018 04:49:53 PM UTC, comment #5:

If we can use data files for tests then yes, why not.

Is it also ok if a figure is opened by a test (with "Visible" set to "on")?

Guillaume <gyom>
Tue 27 Mar 2018 04:24:41 PM UTC, comment #4:

@gyom: yes indeed it would be very useful, but having a test_save_load.ofig binary file would even let us store larger and more complicated figures.

@Mike: Are there already such test-only data files in Octave sources?

Pantxo Diribarne <pantxo>
Project Member
Tue 27 Mar 2018 10:15:59 AM UTC, comment #3:

Pantxo, do you think it would be useful to add tests with figures saved from previous versions of Octave? See, eg, attachment for a figure saved with 4.2.1.

(file #43696)

Guillaume <gyom>
Mon 26 Mar 2018 09:10:41 PM UTC, comment #2:

I pushed a fix here:

http://hg.savannah.gnu.org/hgweb/octave/rev/64c6e8bfc9e5

Closing report

Pantxo Diribarne <pantxo>
Project Member
Mon 26 Mar 2018 06:46:39 PM UTC, comment #1:

Confirm and agree this should be fixed for 4.4.

Mike Miller <mtmiller>
Project Administrator
Sun 25 Mar 2018 09:29:43 PM UTC, original submission:

If I try to open a figure generated with octave 4.2 with the current stable I see the following error:

This is in my opinion a very nasty bug that must be fixed before Octave 4.4.

Pantxo Diribarne <pantxo>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #43704:  hgload_tests.pacth added by pantxo (308KiB - application/octet-stream)
file #43696:  testfig.m added by gyom (28KiB - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gyom (Updated the item)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by pantxo (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 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 10 Apr 2018 02:41:56 AM UTCmtmillerStatusIn Progress=>Patch Submitted
    Wed 28 Mar 2018 01:47:58 PM UTCpantxoAttached File-=>Added hgload_tests.pacth, #43704
    Tue 27 Mar 2018 05:58:55 PM UTCmtmillerStatusFixed=>In Progress
      Open/ClosedClosed=>Open
    Tue 27 Mar 2018 10:15:59 AM UTCgyomAttached File-=>Added testfig.m, #43696
    Mon 26 Mar 2018 09:10:41 PM UTCpantxoStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Mon 26 Mar 2018 06:46:39 PM UTCmtmillerSeverity3 - Normal=>4 - Important
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1