bugGNU Octave - Bugs: bug #46926, saveas() crashes Octave


bug #46926: saveas() crashes Octave

Submitter:  None
Submitted:  Mon 18 Jan 2016 08:14:04 AM UTC
Category:  Plotting with OpenGL Severity:  4 - Important
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Christian Ridderström Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


( Jump to the original submission )

Mon 08 Aug 2016 01:37:52 AM UTC, comment #7: 

Assuming fix in cset ae4d7dfea337 works since there was no follow up.  Closing report.

Rik <rik5>
Project Administrator
Fri 08 Apr 2016 08:16:14 PM UTC, comment #6: 

Can you build from Mercurial sources?  It is very likely that this has been fixed with anything newer than cset ae4d7dfea337 (4/1/16).

Rik <rik5>
Project Administrator
Wed 02 Mar 2016 01:04:20 AM UTC, comment #5: 

Thanks, Christian.  You can normally get a stack trace by running

gdb octave --no-gui

and typing "run" at the gdb prompt.

Lachlan Andrew <lachlan>
Tue 01 Mar 2016 02:27:29 PM UTC, comment #4: 

Sorry, did not have an e-mail address assocated here so didn't get a notice on your responses.

Regarding pausing, Octave crashes also if I do e.g.:

>> figure(1); plot(1,1,'.');
>> saveas(1, 'test.png');

Not sure how to provide a stack trace, but tried starting Octave with
  octave --no-gui --debug
This gives me a lot of output... below I'm pasting in only the last few lines.

I also tried 'stracte octave --no-gui', but that output didn't seem so useful. I could attach it though.

Entering state 189
Next token is token END_OF_INPUT ()
Shifting token END_OF_INPUT ()
Entering state 291
Reducing stack by rule 195 (line 1403):
   $1 = token INPUT_FILE ()
   $2 = nterm opt_nl ()
   $3 = nterm opt_list ()
   $4 = token END_OF_INPUT ()
-> $$ = nterm file ()
Stack now 0
Entering state 66
Reducing stack by rule 141 (line 944):
   $1 = nterm file ()
-> $$ = nterm command ()
Stack now 0
Entering state 57
Reducing stack by rule 14 (line 453):
   $1 = nterm command ()
-> $$ = nterm statement ()
Stack now 0
Entering state 38
Reducing stack by rule 6 (line 429):
   $1 = nterm statement ()
-> $$ = nterm simple_list1 ()
Stack now 0
Entering state 37
Return for a new token:
Reading a token: Next token is token END_OF_INPUT ()
Reducing stack by rule 268 (line 1969):
-> $$ = nterm opt_sep_no_nl ()
Stack now 0 37
Entering state 114
Reducing stack by rule 5 (line 425):
   $1 = nterm simple_list1 ()
   $2 = nterm opt_sep_no_nl ()
-> $$ = nterm simple_list ()
Stack now 0
Entering state 36
Next token is token END_OF_INPUT ()
Shifting token END_OF_INPUT ()
Entering state 111
Reducing stack by rule 2 (line 405):
   $1 = nterm simple_list ()
   $2 = token END_OF_INPUT ()
Stack now 0
panic: Segmentation fault -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
Segmentation fault (core dumped)

Wed 20 Jan 2016 05:56:37 PM UTC, comment #3: 

Mike, the bug I was thinking of is bug #46447.  It turns out I hadn't submitted the patch, but have now.  Looking closer, the patch may not solve the problem since the original plot didn't fail.

Lachlan Andrew <lachlan>
Wed 20 Jan 2016 07:35:54 AM UTC, comment #2: 

Mike, my guess would be that it is a missing font, given the absence of several binaries.  That is a known bug, that I have submitted a patch for.  I'll dig it up and get back to you.

Lachlan Andrew <lachlan>
Mon 18 Jan 2016 06:50:10 PM UTC, comment #1: 

Thanks for your bug report. The epstool error is not related to the crash, it's more likely to be a timing or graphics driver related problem. The crash does not occur for me with your provided example.

Can you try your example with a pause between the peaks() and saveas() calls (just wait at the prompt for a couple seconds) and see if that works differently?

If the crash always occurs regardless of pausing or not, can you provide a gdb stacktrace?

Mike Miller <mtmiller>
Project Administrator
Mon 18 Jan 2016 08:14:04 AM UTC, original submission:  


When trying to save a figure in format 'png', Octave crashes.
This is from an almost clean installation of Ubuntu 15.10.
Octave crashes both when ran with GUI and without.
Below is a very short sequence that crashes Octave for me.
In essence it's:
  fig=figure(1); peaks(); saveas(fig, 'test.png', 'png')

I suppose it'd be ok that saving as PNG doesn't work because some tools are missing, but it shouldn't crash Octave in my opinion.


$ octave --no-gui
GNU Octave, version 4.0.0
Copyright (C) 2015 John W. Eaton and others.
This is free software; see the source code for copying conditions.
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

>> fig=figure(1); peaks(); saveas(fig, 'test.png', 'png')

warning: print.m: epstool binary is not available.
Some output formats are not available.
warning: called from
    _print_parse_opts_ at line 382 column 9
    print at line 291 column 8
    saveas at line 105 column 3
warning: print.m: fig2dev binary is not available.
Some output formats are not available.
panic: Segmentation fault -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
Segmentation fault (core dumped)



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

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-08 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2016-07-01 rik5 Severity3 - Normal 4 - Important
    2016-01-18 mtmiller CategoryPlotting Plotting with OpenGL
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.9