bugGNU Octave - Bugs: bug #52767, error in bar and stem when...

 
 

bug #52767: error in bar and stem when baseline not restored in loaded figure

Submitter:  None
Submitted:  Sat 30 Dec 2017 09:05:32 PM UTC
   
 
Category:  Plotting Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Confirmed Assigned to:  None
Originator Name:  Eric Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 6.1.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 01 Dec 2020 04:48:53 PM UTC, comment #2: 

I can still reproduce this error with the steps in comment #2 with Octave 6.1.0.

Markus Mützel <mmuetzel>
Group administrator
Tue 02 Apr 2019 04:12:31 PM UTC, comment #1: 

I can confirm this error in both the bar and stem functions, both of which use a custom "baseline" property. This property references a line object, which is where the error comes from here. When a saved figure is loaded back into Octave, the line object that the "baseline" property refers to has not been restored. Here is an updated example that still produces this error in Octave 5:


>> bar (1, 1);
>> s = hdl2struct (gcf ());
>> close all
>> struct2hdl (s);
>> hold on
>> bar (2, 1)
error: get: invalid handle (= -13.6531)
error: called from
    __bar__>update_xlim at line 366 column 7
    __bar__>bars at line 348 column 3
    __bar__ at line 204 column 12
    bar at line 118 column 18


Mike Miller <mtmiller>
Group Member
Sat 30 Dec 2017 09:05:32 PM UTC, original submission:  

I would like to be able to save a plot to a file that I can later load back and edit in Octave.

This is what I tried. . .

close all
bar(1,1)  % create figure with a rectangle drawn in it
hold on
hgsave(“temp”)  % Saving to file temp.ofig.

close all
hgload(“temp”)  % Load the figure back in.  Figure comes up looking good.
bar(2,1)  %  This command is actually performed properly.  But I get the following error msg
                %  which aborts the program.

error: get: invalid handle (= -4.14413)
error: called from
    _bar_>update_xlim at line 352 column 7
    _bar_>bars at line 335 column 3
    _bar_ at line 194 column 12
    bar at line 118 column 16

If I remove the “hold on” line, I don’t get the error message.  But, of course, the rectangle that I previously saved will be gone.

Am I missing something here, or is this not working properly?  Maybe I should be doing this a different way?

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-12-01 mmuetzel Release5.1.0 6.1.0
    2019-04-02 mtmiller Severity3 - Normal 2 - Minor
        Item GroupNone Unexpected Error or Warning
        StatusNone Confirmed
        Release4.2.1 5.1.0
        Operating SystemMicrosoft Windows Any
        SummaryCan't edit previously saved figure. error in bar and stem when baseline not restored in loaded figure

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code