The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: print and saveas segmentation fault with -nodisplay
Replies: 6   Last Post: Dec 11, 2015 6:36 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jan Neggers

Posts: 4
Registered: 5/9/13
print and saveas segmentation fault with -nodisplay
Posted: Jul 16, 2013 4:29 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

This seems to be quite an old but persistent problem,

Problem definition:
when you try to save a figure to a file (e.g. pdf, png, fig, etc.) matlab exists with a segmentation fault (newer versions also give a core dump). It mostly seems to happen when the figure contains some patch or surface type objects.

When does it happen:
When you run a matlab version on linux using the -nodisplay (or -nodesktop) option. I've tried many matlab versions ranging from 2007a to 2013a all seem to have the problem (for my figures).

Selection links of topics of others with this problem:

Mentioned solutions:
1) Change the renderer:
>> set(gcf,'Renderer','Painters')
>> set(gcf,'Renderer','zbuffer')
>> set(gcf,'Renderer','OpenGL')

2) Set openGL to software (which is already the default on unix, according to the manual)
>> opengl software

3) Use smaller meshgrids, Aaron Hoffer (thread 139979) found that the problem was fixed when his grid was less then 80 by 80 pixels.

None of the solutions worked for me, for none of the tested matlab versions, after a lot of attempts and many segfaults I found the solution for my figures:

4) Don't use the latex interperpreter.
Switching back to the normal text renderer for all my text objects (xlabels, titles, etc.) made the segmentation faults go away. Which is not really a solution, but at least now I can generate figures from our cluster.

Just my two pennies, good luck to anyone suffering from this "bug".

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.