bugGNU Octave - Bugs: bug #58317, Octave crashes if Variable Editor...

 
 

bug #58317: Octave crashes if Variable Editor opens an empty structure

Submitter:  None
Submitted:  Thu 07 May 2020 09:55:01 AM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 5.2.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 08 May 2020 04:09:22 PM UTC, comment #7: 

I see no crash with an 6.0.1 crossbuild hg 74af52e0e0fa on Windows 7.

That said, with an older Octave-6.0.0 from mid-Sept 2019 and Feb 2 this year I can't reproduce the crash either, nor with several 7.0.0 crossbuilds I have installed.
But 5.2.0 does crash with Mike's commands in comment #1.

Philip Nienhuis <philipnienhuis>
Group Member
Fri 08 May 2020 07:17:37 AM UTC, comment #6: 

I'm making a Windows build now, later today I'll check.

Philip Nienhuis <philipnienhuis>
Group Member
Fri 08 May 2020 05:01:12 AM UTC, comment #5: 

I was able to confirm the crash.  The following change appears to avoid it:

http://hg.savannah.gnu.org/hgweb/octave/rev/86625d488314

John W. Eaton <jwe>
Group administrator
Fri 08 May 2020 12:02:39 AM UTC, comment #4: 

Thank you for investigating this issue. I'm an inbetweener, ie i've got enough time to raise issues but not to build from source. I'm more than happy to try a build and feedback if someone can point me to a nightly build installer, or similar, with this patch included.
Otherwise I'll keep raising issues as I find them and hope to try out in the next release. :)

Ben Brown <benbrown>
Thu 07 May 2020 08:08:24 PM UTC, comment #3: 

I'm attaching a patch to try if someone who regularly builds Octave for  Windows would like to test.



(file #49033)

John W. Eaton <jwe>
Group administrator
Thu 07 May 2020 07:47:21 PM UTC, comment #2: 

Looking at the variable_editor_model::update_data function in variable-editor-model.cc,


    emit dataChanged (QAbstractTableModel::index (0, 0),
                      QAbstractTableModel::index (new_rows-1, new_cols-1));


looks like trouble if either new_rows or new_cols is zero.  In that case, should we omit the call?  I guess this would apply to all types of data, not just structs.

John W. Eaton <jwe>
Group administrator
Thu 07 May 2020 06:56:41 PM UTC, comment #1: 

Confirmed on Windows, not present on other operating systems. Instead of loading the attached file, the following is enough to trigger this crash:


s = struct ();
openvar s


Mike Miller <mtmiller>
Group Member
Thu 07 May 2020 09:55:01 AM UTC, original submission:  

If you open a MAT file containing an empty structure and try to browse it with the variable editor, Octave will crash.

To reproduce:

>> data = load('Rota_d_001.mat');


Double-click on "data" in "Workspace"

Double-click on "[1x1 struct]" under parameters in "Variable Editor"

Octave has a think about things then crashes


Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #49033:  var-edit-model-diffs.txt added by jwe (842B - text/plain)
file #49021:  Rota_d_001.mat added by None (208B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by benbrown (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by benbrown
  •  

    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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-12 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2020-05-08 jwe StatusConfirmed Ready For Test
    2020-05-07 jwe Attached File- Added var-edit-model-diffs.txt, #49033
    2020-05-07 mtmiller StatusNone Confirmed
    2020-05-07 benbrown Carbon-Copy- Added benbrown
    2020-05-07 None Attached File- Added Rota_d_001.mat, #49021

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code