bugGNU Octave - Bugs: bug #50686, gs.exe stopped working


bug #50686: gs.exe stopped working

Submitted by:  Marc Dirix <dirixmjm>
Submitted on:  Fri 31 Mar 2017 09:28:05 AM UTC  
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Unexpected Error
Status: Need InfoAssigned to: None
Originator Name: Marc DirixOpen/Closed: Open
Release: 4.2.1Operating System: Microsoft Windows

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 08 Aug 2017 01:26:20 AM UTC, comment #3:

I came across this same issue today (4.2.1) while batch-processing data and generating PNG figures using the QT graphics toolkit. I also tried alternate toolkits but the problem remained.

I tentatively solved it by running &quot;close all&quot; between each processed file. If I don't do this, I get sporadic &quot;gs.exe has stopped working&quot;

Patrick <cake314>
Wed 12 Apr 2017 09:11:46 PM UTC, comment #2:

Sorry for the late reply. And missing information.

It is version 4.2.1 windows downloaded from here: https://ftp.gnu.org/gnu/octave/windows/
Having ghostscript: GPL Ghostscript 9.16 (taken from the error notice).

grahpics_toolkit: qt
available_graphics_toolkits: [fltk gnuplot qt]

The problem occurs with either qt and gnuplot or fltk. Where fltk also makes octave-gui crash.

I have found that the problem is related to the enormous amount of files ghostscript leaves behind in the temporary folder: C:
\Users\marc\AppData\Local\Temp/. If I remove those files, the problem tends to go away for a short amount of time (until the files build up again).

I already tested if it tries to create an already existing temporary file (and failing to do that) but that seems not to be case (at least not between script-runs).

What is further puzzling is that (for the attached script) it creates temporary files called gs_axxxxx to gs_gxxxxx (or something other early alphabet letter) when printing a figure for which nothing goes wrong. But when it fails it is always a gs_zxxxxx file.

For the attached script, as explained I for an empty Temporary folder you might need to run it some three to four times, then it will start failing every 1 out of 3 runs at leas for 1 image.

Please let me know if you need more information.

(file #40381)

Marc Dirix <dirixmjm>
Wed 05 Apr 2017 11:50:08 AM UTC, comment #1:

Thank you for your report. To be able to reproduce your problem, please be specific about the Octave version you are using (do you use the Windows version from https://ftp.gnu.org/gnu/octave/windows/ ?) and you might provide a small test script to reproduce the problem. Your screenshot unfortunately is not very helpful. Do you have other installations of Ghostscript (gs.exe) on your machine?

What is the output of the commands

before you start plotting? And does it help if you switched your graphics toolkit https://www.gnu.org/software/octave/doc/interpreter/Graphics-Toolkits.html ?

Kai Torben Ohlhus <siko1056>
Project Member
Fri 31 Mar 2017 09:28:05 AM UTC, original submission:

I create scripts that plot and print data automatically.
Every 5 to 10 graphs it plots and prints ghostscripts stops working with the windows notice "gs.exe has stopped working".

Marc Dirix <dirixmjm>


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

Attach File(s):

Attached Files
file #40381:  GhostScriptTest.zip added by dirixmjm (6KiB - application/octet-stream)
file #40217:  Knipsel.PNG added by dirixmjm (8KiB - image/png)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by cake314 (Posted a comment)
  • -unavailable- added by siko1056 (Posted a comment)
  • -unavailable- added by dirixmjm (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 12 Apr 2017 09:11:46 PM UTCdirixmjmAttached File-=>Added GhostScriptTest.zip, #40381
    Wed 05 Apr 2017 11:50:08 AM UTCsiko1056StatusNone=>Need Info
    Fri 31 Mar 2017 09:28:05 AM UTCdirixmjmAttached File-=>Added Knipsel.PNG, #40217

    Back to the top

    Powered by Savane 3.1-cleanup1