bugGNU Octave - Bugs: bug #58041, 'clear all' produces error in...

 
 

bug #58041: 'clear all' produces error in handle class delete method accessing private property

Submitter:  None
Submitted:  Tue 24 Mar 2020 08:25:42 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Works For Me Assigned to:  None
Originator Name:  Torsten Schorr Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 5.2.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 08 May 2020 07:35:45 PM UTC, comment #2: 

Same, unable to reproduce.

Mike Miller <mtmiller>
Group Member
Sat 28 Mar 2020 06:30:08 PM UTC, comment #1: 

This works fine for me with version 5.2.0 and the stable branch which will become 6.1.

You might try starting octave with the '-f' argument to skip reading any user initialization files and see if that makes a difference.  It could be something specific to your setup.

Rik <rik5>
Group administrator
Tue 24 Mar 2020 08:25:42 PM UTC, original submission:  

The class definition

classdef myclass < handle
  properties (Access = private)
    iID
  end
  methods
    function self = myclass
      self.iID = 0;
    end
    function delete(obj)
      disp(obj.iID)
    end
  end
end

produces error on 'clear all':

x = myclass
x =

<object myclass>

>> clear all
>> warning: error caught while executing handle class delete method:
subsref: property `iID' has private access and cannot be obtained in this context

'clear x' works as expected.

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 rik5 (Posted a comment)
  •  

    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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-08 mtmiller Open/ClosedOpen Closed
    2020-03-28 rik5 StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code