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


bug #30909: OO code failing under 3.3.52+

Submitted by:  Pascal Dupuis <cdemills>
Submitted on:  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:  Jaroslav Hajek <highegg>
Originator Name:  Pascal Dupuis 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.


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

The mentionned problem is gone. Thanks.


Pascal Dupuis <cdemills>
Project 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:

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

Jaroslav Hajek <highegg>In charge of this item.
Mon 30 Aug 2010 04:22:23 PM UTC, original submission:  


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).';
dummy = vertcat(df._ridx, repmat(NA, n, size(df._ridx, 2)));
      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');



Pascal Dupuis <cdemills>
Project Member


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

Attach Files:

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 highegg (Posted a comment)
  • -email is unavailable- added by cdemills (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 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.5