bugGNU Octave - Bugs: bug #44050, Saving figure to png/jpg results...

 
 

bug #44050: Saving figure to png/jpg results in ghostscript hanging at 50% CPU

Submitted by:  None
Submitted on:  Mon 19 Jan 2015 08:08:37 PM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid Assigned to:  None
Originator Name:  Krzysztof Zalewski Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  3.8.1
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.

 

( Jump to the original submission)

Fri 09 Oct 2015 05:35:55 AM UTC, comment #10: 

The problem is present with .PDF and .PS file save as well.
Could not export in any of the formats... :S
Hanging process is the octave-cli
-------------
ubuntu 14.04
octave 3.8.1
gs 9.10

Anonymous
Sat 12 Sep 2015 10:22:19 PM UTC, comment #9: 

I think this is clearly a ghostscript problem and not an Octave bug, since the last comment implied that Octave can produce an eps or pdf file, but attempting to convert to some other format is what hangs in the ghostscript program.

Please try to follow the other ghostscript bugs and tips that have been offered to get your ghoscript working, you can try asking for more help on the Octave help list, but this doesn't seem to be an Octave bug.

Mike Miller <mtmiller>
Project Administrator
Wed 28 Jan 2015 08:33:32 AM UTC, comment #8: 

I'm sorry for the error, I assumed Octave uses gnuplot by default. I tested gnuplot as well:

Last night I actually wiped my laptop and did a clean install of ubuntu 14.10

Then I tried both fltk and gnuplot

Using print("-depsc2", "test") and print("-dpng", "test")

Gnuplot worked slightly better, but it too hangs, the eps files it creates never actually load in viewer

I also found out that trying to convert the pdfs from either fltk or gnuplot using imagemagick also results in hanging gs process

Krzysztof Zalewski <zealoth>
Wed 28 Jan 2015 04:29:32 AM UTC, comment #7: 

Updating summary and category. If you are using the File..Save menu, then you are plotting with FLTK, not Gnuplot.

This bug and bug #44089 may be duplicates of each other.

Mike Miller <mtmiller>
Project Administrator
Tue 27 Jan 2015 01:26:27 PM UTC, comment #6: 

Also, trying to save sometimes results in an error (i believe it only happens after i succesfully save as pdf):

octave:3> error: '__save_as__' undefined near line 77 column 5
error: called from:
error:   /usr/share/octave/3.8.1/m/plot/util/private/__add_default_menu__.m at line 77, column 5

Krzysztof Zalewski <zealoth>
Sat 24 Jan 2015 02:20:11 AM UTC, comment #5: 

I'm extremely sorry it took me so long to respond. Finals...

I tried both ways of inputting it and the problem persists without change.

By the way, polish special character in the pdf save come out garbled - not sure it has anything to do with it (the problem still occurs even if I remove all the labeling with those characters)

Krzysztof Zalewski <zealoth>
Tue 20 Jan 2015 07:32:35 AM UTC, comment #4: 

You have to type

setenv ("GS_OPTIONS", "-dNONATIVEFONTMAP -sSUBSTFONT=Helvetica");

into octave's console or you have to type

export GS_OPTIONS='-dNONATIVEFONTMAP -sSUBSTFONT=Helvetica'

into your normal terminal window (not octave) and start octave from this terminal afterwards.

Torsten Lilge <ttl>
Project Member
Mon 19 Jan 2015 09:40:55 PM UTC, comment #3: 

Do i just retype it into console?

I did that, but it did not work. Also, I highly doubt it will - 1)RAM usage is steady at 120MB
2)The problem persists even with plots with no annotations whatsoever

How could I check if all the packages and dependencies are installed, for the save process to work?
I've tried to reinstall as many as I could think of, but I did run into some problems during recent update and upgrade, maybe something is missing?

Krzysztof Zalewski <zealoth>
Mon 19 Jan 2015 09:05:17 PM UTC, comment #2: 

Maybe the problem is related to the one discussed here:
http://lists.gnu.org/archive/html/octave-maintainers/2015-01/msg00017.html ?

Torsten Lilge <ttl>
Project Member
Mon 19 Jan 2015 08:58:50 PM UTC, comment #1: 

Recently there was a posting in the maintainers ML about a similar issue:

http://octave.1599824.n4.nabble.com/printing-problems-because-of-memory-consumption-of-gs-tt4667988.html

Can you please try the suggested solution there and report back?

Philip Nienhuis <philipnienhuis>
Project Member
Mon 19 Jan 2015 08:08:37 PM UTC, original submission:  

Ubuntu 14.10 with gnome-shell
To me it only happens if the plot contains a lot of data, in my case 93 thousand samples extracted from wav file using wavread. The plot works just fine, i was able to plot this data against sample number without issues.

But when I try to "Save as" .png or .jpg, the plot freezes and gs process appears, hogging ~ 50% of CPU time. Ctrl+C in Octave window restores the plot, but the save fails.

I am able to save as pdf without issues.

I had some warnings before about epstool and fig2dev missing and before I installed (using synaptic) epstool, transfig, fig2ps (and it's automatically suggested dependencies) I had errors "__save_as__ undefined near line (..)" After I installed those packages I was able to save some other plots.

I believe it is related to size of data being plotted

On my system
t = 1:1:500000;
plot(t,t)

Is enough to get the hanging gs process. No errors appear in Octave console. I do not know where I could look for more information/logs/errors about the issue

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #32869:  Desktop.pdf added by None (473KiB - "application/octet-stream" - The plot saved in pdf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by zealoth (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by None (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-12 mtmiller StatusNeed Info => Invalid
        Open/ClosedOpen => Closed
    2015-01-28 mtmiller CategoryPlotting with gnuplot => Plotting with OpenGL
        SummarySaving gnuplot to png/jpg results in ghostscript hanging at 50% CPU => Saving figure to png/jpg results in ghostscript hanging at 50% CPU
    2015-01-19 philipnienhuis StatusNone => Need Info
    2015-01-19 None Attached File- => Added Desktop.pdf, #32869

    Back to the top


    Powered by Savane 3.5