bugGNU Octave - Bugs: bug #53858, Octave crashes when expanding an...


bug #53858: Octave crashes when expanding an array of a sub-structure viewed by Variable Editor

Submitter:  Dan Sebald <sebald>
Submitted:  Mon 07 May 2018 06:11:57 PM UTC
Category:  GUI Severity:  4 - Important
Priority:  7 - High Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


( Jump to the original submission )

Thu 08 Oct 2020 02:39:48 AM UTC, comment #11: 

Verified there is no longer a segfault with the original motivating example.  Closing report.

Rik <rik5>
Project Administrator
Mon 28 Sep 2020 10:55:38 PM UTC, comment #10: 

I pushed the following changeset on stable and merged with default:


I'm not sure whether this is the best fix, but it avoids the infinite error loop.  Maybe the evaluator should not be able to return c-s lists packaged inside octave_value objects.  But I think that's a much bigger project for another day.

Another option, inside the variable editor itself, would be to notice that the expression evaluates to a c-s list and try to modify the original display of a.b.e to be a.b.e(1) instead.  But I'm not sure how to do that.  It might also require knowing that  we are transitioning from a scalar struct to a struct array and I'm not sure how to determine that at the point the failure is detected.

John W. Eaton <jwe>
Project Administrator
Mon 21 Sep 2020 04:02:24 PM UTC, comment #9: 

This is still an issue with Octave 6.0.90.

Markus M├╝tzel <mmuetzel>
Project Member
Tue 12 May 2020 09:41:14 PM UTC, comment #8: 

Problem is still present (5/12/2020).

Rik <rik5>
Project Administrator
Fri 08 Feb 2019 05:28:36 PM UTC, comment #7: 

The original example still creates an endless loop for me.

I can understand what is going on, but don't have a fix just yet.  When the variable editor windows are first set up a.b is a scalar struct, and the sub-window is displaying 'a.b.e'.  When the code

a.b(2).c = 'string';

is executed the class of a.b changes from scalar struct to struct array.  Therefore, 'a.b.e' now returns a cell array equivalient to 'a.b(:).e'.  The Variable Editor is not expecting a cell array and throws errors.

If you then close the 'a.b.e' tab, and re-open it by double-clicking on the original entry, it showes 'a.b(1).e'.

So, when the class changes we need to reflect that in the indexing expression used.

Rik <rik5>
Project Administrator
Fri 08 Feb 2019 05:06:14 PM UTC, comment #6: 

With Rik's first patch in comment #9 of bug #55666, your example in comment # 5 here works; see bug #55666.
The original example also works.

I haven't tried yet the patch that Rik finally pushed.

Philip Nienhuis <philipnienhuis>
Project Member
Sun 06 Jan 2019 08:48:49 PM UTC, comment #5: 

While testing I have found another issue (although no crash).

clear a;
a.b.c = 'string'
a.b.e = 4
a.b.h = [1,2,3]
a.b(2).e = 5
openvar a
# double click the "a.b" cell for opening the b struct

In the new panel, the field h is missing, only columns for c and e are shown.

Torsten Lilge <ttl>
Project Member
Sun 06 Jan 2019 08:37:39 PM UTC, comment #4: 

The repeating error messages described in comment #3 show up in the stable branch, too. The loop stops when the widget 'a.b.e' in the variable editor is closed.

Torsten Lilge <ttl>
Project Member
Sat 22 Dec 2018 11:18:24 PM UTC, comment #3: 

With the steps in comment 30 a fresh Octave-6.0.0 gets into an endless loop, pic of terminal output attached. Basically the repeated messages are:

>> error: octave_base-value::print (): wrong type argument 'cs-list'
>> error: parse error
error: octave_base-value::print (): wrong type argument 'cs-list'
error: parse error

... and the messages with a preceding Octave prompt have a inverse order relative to error messages without preceding prompt.

Philip Nienhuis <philipnienhuis>
Project Member
Fri 16 Nov 2018 05:12:26 AM UTC, comment #2: 

Still present (11/15/18) on dev with cset 6a1e2b30020d.

Rik <rik5>
Project Administrator
Mon 07 May 2018 11:25:48 PM UTC, comment #1: 

Confirmed in 4.4 and dev.

Mike Miller <mtmiller>
Project Administrator
Mon 07 May 2018 06:11:57 PM UTC, original submission:  

As part of Bug #53838 the original poster found a crash bug related to Variable Editor.  Try the following:

clear a;
a.b.c = 'string';
a.b.e = [1 2 3];
openvar a;
% Double-click the "a.b" cell to open a new Variable Editor panel
% Double-click the "a.b.e" cell to open a new Variable Editor panel
a.b(2).c = 'string';

At this point Octave seg faults with "octave exited with signal 6".

Dan Sebald <sebald>


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

Attach Files:

Attached Files


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 mmuetzel (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by marsian
  • -email is unavailable- added by sebald (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 project members can vote.





    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-10-08 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2020-09-28 jwe StatusConfirmed Ready For Test
    2018-12-23 mtmiller Carbon-CopyRemoved 80942 -
    2018-12-23 rik5 Priority5 - Normal 7 - High
    2018-12-22 philipnienhuis Attached File- Added bug53858_Linux_oct6.0.0.png, #45717
    2018-05-08 marsian Carbon-Copy- Added marsian
    2018-05-07 mtmiller Severity3 - Normal 4 - Important
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.9