bugGNU Octave - Bugs: bug #62803, help class.class: error when...


bug #62803: help class.class: error when accessing classdef ctor's help

Submitter:  Colin Macdonald <cbm>
Submitted:  Sun 24 Jul 2022 04:43:29 AM UTC
Category:  Classdef Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  9.1.0 (current stable) Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Thu 08 Feb 2024 07:56:12 PM UTC, comment #2: 

There was recently a bunch of work done on get_help_text() which has fixed this issue.  It will be a part of the 9.1 release of Octave which is imminent.

Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Sun 31 Jul 2022 10:29:25 PM UTC, comment #1: 

Tracing the function calls for our MWE, it looks like the name "test_classdef.test_classdef" is just passed around for a long time. I don't have the expertise to really debug this, but hopefully a description of how it is passed around is at least helpful.

The help function is defined here

The error is during the call to get_help_text in line 103.

get_help_text is defined in https://hg.savannah.gnu.org/hgweb/octave/file/e37e46ef0505/libinterp/corefcn/help.cc at line 386

This in turn calls raw_help, defined in the same file at line 207

raw_help calls raw_help_from_symbol_table, defined at line 537

raw_help_from_symbol_table calls find_function, defined at line 249 in https://hg.savannah.gnu.org/hgweb/octave/file/e37e46ef0505/libinterp/corefcn/symtab.cc

find_function then calls find_function defined at line 277.

Up to this point, very little has been done except passing the name around.

Michael Bagherpour <bagelboy>
Sun 24 Jul 2022 04:43:29 AM UTC, original submission:  


help test_classdef.test_classdef

error: unknown package 'test_classdef'
error: called from

MWE: place the attached "test_classdef.m" inside a directory called "@test_classdef".

Expected results: the help for the constructor for the class.  That is, something different from "help test_classdef" (which correctly gives the class help).  MWE has different docstrings for each.

Today's tip.  Also on 6.4.0 (have not tested on 7.1.0) which gives the same:

help test_classdef.test_classdef
error: unknown package 'test_classdef'
error: called from
    help at line 102 column 20

Colin Macdonald <cbm>


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

Attach Files:

Attached Files
file #53469:  test_classdef.m added by cbm (939B - text/x-objcsrc - place inside @test_classdef folder)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by bagelboy (Posted a comment)
  • -email is unavailable- added by cbm (Submitted the item)

    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.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-08 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 9.1.0 (current stable)
    2022-07-24 cbm Attached File- Added test_classdef.m, #53469

    Back to the top

    Powered by Savane 3.13.
    Corresponding source code