bugGNU Octave - Bugs: bug #62266, uibuttongroup error from loading...

 
 

bug #62266: uibuttongroup error from loading ofig

Submitter:  Liang Tang <lt1234>
Submitted:  Thu 07 Apr 2022 11:06:41 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  lt1234 Open/Closed:  * Closed
Release:  * 7.1.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 10 Apr 2022 11:11:57 PM UTC, comment #4: 

Hi Rik, the fix also works for another gui ofig that contains the uibuttongroup.  Thanks.

Liang Tang <lt1234>
Sun 10 Apr 2022 10:19:19 PM UTC, comment #3: 

Rik, thanks.  I downloaded a copy.

Liang Tang <lt1234>
Sun 10 Apr 2022 09:36:29 PM UTC, comment #2: 

I fixed the issue on the stable branch in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/e219aacda1e5).  This will be a part of the 7.2 bug fix release.  If you need the fix sooner you can just download the hdl2struct.m file from Octave's Mercurial repository and replace the file in your distribution with the new one.

Rik <rik5>
Group administrator
Sat 09 Apr 2022 04:04:06 PM UTC, comment #1: 

Confirmed.  My testing was on the development branch on a Linux machine so this issue is not specific to an OS or Octave version.

The code I used for testing is:


% Create figure and panel on it
f = figure;
% Create a button group
gp = uibuttongroup (f, "Position", [ 0 0.5 1 1])
% Create a buttons in the group
b1 = uicontrol (gp, "style", "radiobutton", ...
"string", "Choice 1", ...
"Position", [ 10 150 100 50 ]);
b2 = uicontrol (gp, "style", "radiobutton", ...
"string", "Choice 2", ...
"Position", [ 10 50 100 30 ]);
% Create a button not in the group
b3 = uicontrol (f, "style", "radiobutton", ...
"string", "Not in the group", ...
"Position", [ 10 50 100 50 ]);

savefig mytst.ofig

close all

openfig mytst.ofig


Rik <rik5>
Group administrator
Thu 07 Apr 2022 11:06:41 PM UTC, original submission:  

I cannot load any ofig file which contains uibuttongroup.  Thanks. 


(1) use the uibuttongroup example in Octave help.

% Create figure and panel on it
f = figure;
% Create a button group
gp = uibuttongroup (f, "Position", [ 0 0.5 1 1])
% Create a buttons in the group
b1 = uicontrol (gp, "style", "radiobutton", ...
"string", "Choice 1", ...
"Position", [ 10 150 100 50 ]);
b2 = uicontrol (gp, "style", "radiobutton", ...
"string", "Choice 2", ...
"Position", [ 10 50 100 30 ]);
% Create a button not in the group
b3 = uicontrol (f, "style", "radiobutton", ...
"string", "Not in the group", ...
"Position", [ 10 50 100 50 ]);

(2) save the figure as ofig
(3) double click the ofig in octave gui
(4) error message below will show.  This error message is ofig dependent.  Other ofig may cause different error message.  

>> warning: base_graphics_object::get_properties: invalid graphics object

warning: called from
    struct2hdl>setprops at line 655 column 10
    struct2hdl at line 213 column 3
    struct2hdl at line 206 column 15
    hgload at line 105 column 10
    openfig at line 120 column 8
    open at line 116 column 7

error: set: invalid value for selectedobject property
error: called from
    struct2hdl>setprops at line 655 column 10
    struct2hdl at line 213 column 3
    struct2hdl at line 206 column 15
    hgload at line 105 column 10
    openfig at line 120 column 8
    open at line 116 column 7

Liang Tang <lt1234>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by lt1234 (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-04-10 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Releasedev 7.1.0
    2022-04-09 rik5 StatusNone Confirmed
        Release6.3.0 dev
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code