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: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Jaroslav Hajek <highegg>
Originator Name: Pascal DupuisOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich 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

Pascal Dupuis <cdemills>
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.savannah.gnu.org/hgweb/octave/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>In charge of this item.
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>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 31 Aug 2010 06:21:13 AM UTChigheggStatusNone=>Fixed
      Assigned toNone=>highegg
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup