[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: subsasgn / subsref bug

From: Ray Daniel Zimmerman
Subject: Re: subsasgn / subsref bug
Date: Thu, 17 Jun 2021 17:42:52 +0000

It took me a couple of hours, but I was finally able to isolate the issue and have submitted the bug report …


The following results in the recursion error (in Octave 6.2, but not 5.2) …

pkg load tablicious
T1 = table(1);
cls = @table;
T2 = table(2);

… but commenting out the “cls = @table;" line, eliminates the issue. The bug report includes a MWE that does not need Tablicious.

Very bizarre.


On Jun 16, 2021, at 5:31 PM, Ray Daniel Zimmerman <rz10@cornell.edu> wrote:

I’ve encountered what I believe is a bug in subsref and subsasgn handling in Octave 6.2, and would like some suggestions for how I might approach narrowing things down so I can even submit a useful bug report.

The issue is this … accessing obj.Properties inside methods of a classdef object with a property named “Properties” should not call the class’s subsref method, but it sometimes does. And by “sometimes” I mean that it depends on something in the state of the Octave workspace or interpreter, not the particular code being executed.

Specifically, I have a rather large Matlab/Octave project with an extensive test suite and have recently begun to use both the table class from Tablicious (thank you Andrew), if it is available, or my own very basic mp_table class substitute, if it is not. Both table and mp_table define subsref and subsasgn methods, and both make assignments to fields of obj.Properties within their constructors.

I got all my tests passing with both classes, but noticed that one particular test was failing with a max recursion limit error in subsref when constructing a particular table (both with Andrew’s table and my mp_table), but only if I ran certain other tests before running the one in which the failure occurs.

Just to clarify, there is no difference between the failing case and the working case in terms of the inputs supplied to the constructor in which this recursion error occurs. It appears to be something within the Octave interpreter that is getting into a state in which it forgets that obj.Properties should not call subsref.

Any suggestions for how I might narrow down what may causing this difference?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]