bugGNU Octave - Bugs: bug #30909, OO code failing under 3.3.52+

 
 

bug #30909: OO code failing under 3.3.52+

Submitter:  Pascal Dupuis <cdemills>
Submitted:  Mon 30 Aug 2010 04:22:23 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  highegg
Originator Name:  Pascal Dupuis Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Tue 31 Aug 2010 04:30:50 PM UTC, comment #2: 

The mentionned problem is gone. Thanks.

Pascal

Pascal Dupuis <cdemills>
Group Member
Tue 31 Aug 2010 06:20:53 AM UTC, comment #1: 

Why do you think the assignment should go through subsasgn?
I think that a private class method should be able to access fields directly, just like non-private methods.

I checked in the following fix to address the problem:
http://hg.savanna ... /rev/f687bd17ce21

If you think it should work otherwise, please clarify and support your opinion by quoting matlab docs or showing examples.


Jaroslav Hajek <highegg>
Mon 30 Aug 2010 04:22:23 PM UTC, original submission:  

Hello,

while trying the latest code from mercurial, I've got a problem. The class constructor calls private/df_pad.m, which fails as follows:

function df = df_pad(df, dim, n, coltype=[])
  switch dim
    case 1
      %# complete row indexes
      if isempty(df._ridx),
dummy = (1:n).';
      else
dummy = vertcat(df._ridx, repmat(NA, n, size(df._ridx, 2)));
      endif
      df._ridx = dummy; <= fails

the code is called with an empty dataframe, dim = 1, n = 10.

Error message is
malformed class
assignement failed, or no method for 'class=matrix'

In principle, the assignement must be performed through subasgn, which it itself busy calling df_pad. The code works under 3.2.4, is there some reason while it fails under 3.3.52 ? Should I play between classes and struct to handle directly modifications of the class variable ?

The problem can be reproduced as follows:
- install the dataframe package from octave-forge
- x=dataframe('octave_frame/data_test.csv');


Regards

Pascal

Pascal Dupuis <cdemills>
Group Member

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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

    Votes

    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.

     

    History

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-31 highegg StatusNone Fixed
        Assigned toNone highegg
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.16.
    Corresponding source code