octave-maintainers
[Top][All Lists]
Advanced

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

subsasgn / subsref bug


From: Ray Daniel Zimmerman
Subject: subsasgn / subsref bug
Date: Wed, 16 Jun 2021 22:31:27 +0000

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?

Thanks,

    Ray



reply via email to

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