<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168194</link>
    <title>MATLAB Central Newsreader - print causes matlab to crash in linux</title>
    <description>Feed for thread: print causes matlab to crash in linux</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 24 Apr 2008 14:00:19 -0400</pubDate>
      <title>print causes matlab to crash in linux</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168194#428630</link>
      <author>David Doria</author>
      <description>x=1:10;&lt;br&gt;
y=x.^2;&lt;br&gt;
plot(x,y);&lt;br&gt;
print(gcf,'-dpng','test.png');&lt;br&gt;
&lt;br&gt;
this crashes matlab in linux!! works fine in windows.&lt;br&gt;
&lt;br&gt;
anyone know why this may be??&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Dave</description>
    </item>
    <item>
      <pubDate>Thu, 24 Apr 2008 14:19:04 -0400</pubDate>
      <title>Re: print causes matlab to crash in linux</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168194#428635</link>
      <author>David Doria</author>
      <description>After more looking, it seems that does in fact work - that&lt;br&gt;
was just a simple demo i thought I could give.  However:&lt;br&gt;
&lt;br&gt;
peaks&lt;br&gt;
saveas(gcf,'test.png','png')&lt;br&gt;
&lt;br&gt;
doesn't crash matlab, but saves an entirely black image!&lt;br&gt;
&lt;br&gt;
If I run saveas(gcf,'test3.png','png') on my actual data (a&lt;br&gt;
surf plot) then matlab does crash.&lt;br&gt;
&lt;br&gt;
Any clues?</description>
    </item>
    <item>
      <pubDate>Thu, 24 Apr 2008 16:51:54 -0400</pubDate>
      <title>Re: print causes matlab to crash in linux</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168194#428654</link>
      <author>Ben</author>
      <description>I'm having a similar problem.&lt;br&gt;
&lt;br&gt;
When I try to save an image file, using&lt;br&gt;
saveas(&amp;lt;handle&amp;gt;,'filename.eps','epsc2'),&lt;br&gt;
it crashes my entire desktop, not just matlab.     It seems to happen&lt;br&gt;
when i have a relatively complicated image, for example one with 4&lt;br&gt;
subplots.    It doesn't crash every single time, I can usually save a&lt;br&gt;
file once, then the second time it crashes.&lt;br&gt;
&lt;br&gt;
It does this in both command line mode and in desktop mode.&lt;br&gt;
&lt;br&gt;
The only solution I've found is to use the &quot;print&quot; command, e.g.&lt;br&gt;
&lt;br&gt;
print -f2 -depsc2  filename.eps&lt;br&gt;
(where -f&amp;lt;...&amp;gt;  is the figure handle, in my case, I'm trying to save&lt;br&gt;
figure 2).&lt;br&gt;
&lt;br&gt;
It doesn't seem to be crashing (yet).&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
On Apr 24, 10:19 am, &quot;David Doria&quot; &amp;lt;daviddo...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; After more looking, it seems that does in fact work - that&lt;br&gt;
&amp;gt; was just a simple demo i thought I could give.  However:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; peaks&lt;br&gt;
&amp;gt; saveas(gcf,'test.png','png')&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; doesn'tcrashmatlab, but saves an entirely black image!&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If I run saveas(gcf,'test3.png','png') on my actual data (a&lt;br&gt;
&amp;gt; surf plot) then matlab doescrash.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Any clues?</description>
    </item>
    <item>
      <pubDate>Thu, 24 Apr 2008 17:09:35 -0400</pubDate>
      <title>Re: print causes matlab to crash in linux</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168194#428667</link>
      <author>Ben</author>
      <description>Update: Check this message for a possible solution:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://groups.google.com/group/comp.soft-sys.matlab/msg/ff4a311272efbd15&quot;&gt;http://groups.google.com/group/comp.soft-sys.matlab/msg/ff4a311272efbd15&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
On Apr 24, 10:19 am, &quot;David Doria&quot; &amp;lt;daviddo...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; After more looking, it seems that does in fact work - that&lt;br&gt;
&amp;gt; was just a simple demo i thought I could give.  However:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; peakssaveas(gcf,'test.png','png')&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; doesn'tcrashmatlab, but saves an entirely black image!&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If I runsaveas(gcf,'test3.png','png') on my actual data (a&lt;br&gt;
&amp;gt; surf plot) then matlab doescrash.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Any clues?</description>
    </item>
    <item>
      <pubDate>Thu, 24 Apr 2008 17:13:40 -0400</pubDate>
      <title>Re: print causes matlab to crash in linux</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168194#428670</link>
      <author>Richard Quist</author>
      <description>Ben wrote:&lt;br&gt;
&amp;gt; I'm having a similar problem.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; When I try to save an image file, using&lt;br&gt;
&amp;gt; saveas(&amp;lt;handle&amp;gt;,'filename.eps','epsc2'),&lt;br&gt;
&amp;gt; it crashes my entire desktop, not just matlab.     It seems to happen&lt;br&gt;
&amp;gt; when i have a relatively complicated image, for example one with 4&lt;br&gt;
&amp;gt; subplots.    It doesn't crash every single time, I can usually save a&lt;br&gt;
&amp;gt; file once, then the second time it crashes.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; It does this in both command line mode and in desktop mode.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The only solution I've found is to use the &quot;print&quot; command, e.g.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; print -f2 -depsc2  filename.eps&lt;br&gt;
&amp;gt; (where -f&amp;lt;...&amp;gt;  is the figure handle, in my case, I'm trying to save&lt;br&gt;
&amp;gt; figure 2).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; It doesn't seem to be crashing (yet).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; On Apr 24, 10:19 am, &quot;David Doria&quot; &amp;lt;daviddo...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;&amp;gt; After more looking, it seems that does in fact work - that&lt;br&gt;
&amp;gt;&amp;gt; was just a simple demo i thought I could give.  However:&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; peaks&lt;br&gt;
&amp;gt;&amp;gt; saveas(gcf,'test.png','png')&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; doesn'tcrashmatlab, but saves an entirely black image!&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; If I run saveas(gcf,'test3.png','png') on my actual data (a&lt;br&gt;
&amp;gt;&amp;gt; surf plot) then matlab doescrash.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Any clues?&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
There can be a number of causes. I suggest you contact your local support &lt;br&gt;
office so they can address the specific situations.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
&lt;br&gt;
Richard Quist&lt;br&gt;
Software Developer&lt;br&gt;
The MathWorks, Inc.</description>
    </item>
    <item>
      <pubDate>Thu, 24 Apr 2008 17:18:38 -0400</pubDate>
      <title>Re: print causes matlab to crash in linux</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168194#428674</link>
      <author>Richard Quist</author>
      <description>Ben wrote:&lt;br&gt;
&amp;gt; Update: Check this message for a possible solution:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://groups.google.com/group/comp.soft-sys.matlab/msg/ff4a311272efbd15&quot;&gt;http://groups.google.com/group/comp.soft-sys.matlab/msg/ff4a311272efbd15&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; On Apr 24, 10:19 am, &quot;David Doria&quot; &amp;lt;daviddo...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;&amp;gt; After more looking, it seems that does in fact work - that&lt;br&gt;
&amp;gt;&amp;gt; was just a simple demo i thought I could give.  However:&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; peakssaveas(gcf,'test.png','png')&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; doesn'tcrashmatlab, but saves an entirely black image!&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; If I runsaveas(gcf,'test3.png','png') on my actual data (a&lt;br&gt;
&amp;gt;&amp;gt; surf plot) then matlab doescrash.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Any clues?&lt;br&gt;
&amp;gt; &lt;br&gt;
That particular message only applies if MATLAB was started with the -nojvm option&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
&lt;br&gt;
Richard Quist&lt;br&gt;
Software Developer&lt;br&gt;
The MathWorks, Inc.</description>
    </item>
    <item>
      <pubDate>Tue, 27 May 2008 21:58:01 -0400</pubDate>
      <title>Re: print causes matlab to crash in linux</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168194#434394</link>
      <author>Levi Kilcher</author>
      <description>I had a similar problem in which not only matlab crashed,&lt;br&gt;
but the entire xsession.  I posted my fix here:&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_thread/158572&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_thread/158572&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
--&lt;br&gt;
LFK</description>
    </item>
  </channel>
</rss>

