bugGNU Octave - Bugs: bug #53956, classdef base class delete method...

 
 

bug #53956: classdef base class delete method called multiple times on object of subclass

Submitted by:  Richard <crobar>
Submitted on:  Mon 21 May 2018 01:58:35 PM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Richard Crozier Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 04 Jan 2020 04:28:00 AM UTC, comment #5: 

Verified.  Marking as Fixed and closing report.

Rik <rik5>
Project Administrator
Fri 15 Mar 2019 09:38:07 PM UTC, comment #4: 

I pushed the following changeset, including tests based on the files posted here:

http://hg.savannah.gnu.org/hgweb/octave/rev/71724787d972

It seems to work properly for me now.

John W. Eaton <jwe>
Project Administrator
Thu 21 Feb 2019 11:29:47 PM UTC, comment #3: 

This is still confirmed on the default branch.

Mike Miller <mtmiller>
Project Administrator
Tue 22 May 2018 05:47:53 PM UTC, comment #2: 

The delete method should not be called at all for now, see bug #46497.

Mike Miller <mtmiller>
Project Administrator
Mon 21 May 2018 02:04:03 PM UTC, comment #1: 

It seems to be called once for every level in the hierarchy, i.e. with another level

handle -> subclass -> subsubclass -> subsubsubclass

destroying subsubsubclass results in subclass.delete being called three times.

>> x = reproduce_delete_issue_4 ()
x =

<object reproduce_delete_issue_4>

>> clear x
Called delete
Called delete
Called delete

(file #44192)

Richard <crobar>
Mon 21 May 2018 01:58:35 PM UTC, original submission:  

If you have a class hierarchy like:

handle -> subclass -> subsubclass

where subclass implements a delete method, this delete method is incorrectly called twice when a subsubclass object is destroyed. See attached files for an example (and here's a command line example showing the same issue, using these files).

>> x = reproduce_delete_issue_3 ()
x =

<object reproduce_delete_issue_3>

>> clear x
Called delete
Called delete

Richard <crobar>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44192:  reproduce_delete_issue_4.m added by crobar (149B - text/x-objcsrc)
file #44189:  reproduce_delete_issue_2.m added by crobar (244B - text/x-objcsrc)
file #44190:  reproduce_delete_issue_3.m added by crobar (149B - text/x-objcsrc)

 

Digest:
   bug dependencies.

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 jwe (Posted a comment)
  • -email is unavailable- added by crobar (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-04 rik5 StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2019-03-15 mtmiller Carbon-CopyRemoved 80942 => -
    2019-03-15 jwe StatusConfirmed => Ready For Test
    2019-02-21 mtmiller StatusPostponed => Confirmed
        SummaryDelete function incorrectly called twice for subclass => classdef base class delete method called multiple times on object of subclass
    2018-05-22 mtmiller StatusNone => Postponed
        Dependencies- => Depends on bugs #46497
    2018-05-21 crobar Attached File- => Added reproduce_delete_issue_4.m, #44192
    2018-05-21 crobar Attached File- => Added reproduce_delete_issue_2.m, #44189
        Attached File- => Added reproduce_delete_issue_3.m, #44190
        Attached File- => Added reproduce_delete_issue_script.m, #44191

    Back to the top


    Powered by Savane 3.5