bugGNU Octave - Bugs: bug #53925, local functions should be in...


bug #53925: local functions should be in auto-complete list for readline at command line

Submitted by:  Rik <rik5>
Submitted on:  Wed 16 May 2018 10:18:30 PM UTC  
Category:  Interpreter Severity:  3 - Normal
Priority:  3 - Low Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  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.


Sat 19 May 2018 12:09:56 AM UTC, comment #4:

Works perfectly. Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Fri 18 May 2018 11:34:52 PM UTC, comment #3:

I pushed the following changeset on stable and merged with default. It seems to fix the problem for me.


The real problem was that the octave_user_function class didn't have an implementation of the virtual parent_fcn_scope, so the default implementation of that function was always returning an empty scope.

John W. Eaton <jwe>
Project Administrator
Thu 17 May 2018 06:58:49 PM UTC, comment #2:

I pushed a fix to the stable branch here (http://hg.savannah.gnu.org/hgweb/octave/rev/644fe81ced33).

This stops the segfault, but the side effect is that local functions are not included in the auto-complete list for readline. The problem is that curr_fcn->parent_fcn_scope() is returning a NULL pointer. I don't know why that is, but the current fix is good enough for me.

I have re-titled the bug to reflect the minor open issue, and lowered the priority.

Rik <rik5>
Project Administrator
Wed 16 May 2018 11:30:19 PM UTC, comment #1:

I also see this problem on stable, so if possible it should be fixed there.

It's crashing here in the condition of the while loop in this function in help.cc:

The value of curr_fcn is NULL. You are stopped in a subfunction, so finding the ultimate parent function should be possible.

John W. Eaton <jwe>
Project Administrator
Wed 16 May 2018 10:18:30 PM UTC, original submission:

The following code on the development branch of Octave, launched with "run-octave -f", causes a segfault:

In the last line I typed "var<TAB>" to have readline complete the identifier name.

If I start Octave with the "--no-line-editing" option there is no segfault, but of course there is also no readline library active.

Rik <rik5>
Project Administrator


(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 jwe (Posted a comment)
  • -email is unavailable- added by rik5 (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-19 rik5 StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2018-05-18 jwe StatusConfirmed => Ready For Test
    2018-05-17 rik5 Priority5 - Normal => 3 - Low
        Item GroupSegfault, Bus Error, etc. => Feature Request
        StatusNone => Confirmed
        Summarysegfault in debug mode when using TAB-complete from readline => local functions should be in auto-complete list for readline at command line

    Back to the top

    Powered by Savane 3.4