<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173077</link>
    <title>MATLAB Central Newsreader - Exception in thread &quot;AWT-EventQueue-0&quot; java.lang.OutOfMemoryError: Java heap space</title>
    <description>Feed for thread: Exception in thread &quot;AWT-EventQueue-0&quot; java.lang.OutOfMemoryError: Java heap space</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>Wed, 23 Jul 2008 05:19:50 -0400</pubDate>
      <title>Exception in thread &quot;AWT-EventQueue-0&quot; java.lang.OutOfMemoryError: Java heap space</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173077#444790</link>
      <author>Nasser Abbasi</author>
      <description>2007a, student version on windoz XP SP2.&lt;br&gt;
&lt;br&gt;
I use GUIDE, and after sometime of using it, I notice it gets sluggish in &lt;br&gt;
its response to editing and I see the following Java errors on the console:&lt;br&gt;
&lt;br&gt;
&quot;Exception in thread &quot;AWT-EventQueue-0&quot; java.lang.OutOfMemoryError: Java &lt;br&gt;
heap space&quot;&lt;br&gt;
&lt;br&gt;
I am not sure why it runs out of RAM so fast. as I have 4 GB of physical &lt;br&gt;
RAM.&lt;br&gt;
&lt;br&gt;
I did a google on the above and I see that others have seen this.&lt;br&gt;
&lt;br&gt;
I wonder if there is any update on this problem that someone from Mathworks &lt;br&gt;
or others can comment on.&lt;br&gt;
&lt;br&gt;
Is this still a problem in later Matlab releases?&lt;br&gt;
&lt;br&gt;
thanks,&lt;br&gt;
Nasser</description>
    </item>
    <item>
      <pubDate>Wed, 30 Jul 2008 08:34:03 -0400</pubDate>
      <title>Re: Exception in thread</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173077#446222</link>
      <author>Stefan </author>
      <description>Dear Nasser,&lt;br&gt;
&lt;br&gt;
I'm dealing with the same problems. And it seems, that noone&lt;br&gt;
really knows something about the java heap memory. I never&lt;br&gt;
got a clear response on this topic.&lt;br&gt;
&lt;br&gt;
I found a small workaround to free some heap memory.&lt;br&gt;
&lt;br&gt;
heapTotalMemory = java.lang.Runtime.getRuntime.totalMemory;&lt;br&gt;
heapFreeMemory = java.lang.Runtime.getRuntime.freeMemory;&lt;br&gt;
if(heapFreeMemory &amp;lt; (heapTotalMemory*0.01))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;java.lang.Runtime.getRuntime.gc;&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
I'm calling the java garbace collector if the free memory&lt;br&gt;
drops below a certain limit.&lt;br&gt;
&lt;br&gt;
Maybe this helps.&lt;br&gt;
Keep me up to date if you get any news according to the java&lt;br&gt;
heap memory.&lt;br&gt;
&lt;br&gt;
Best regards,&lt;br&gt;
&amp;nbsp;&amp;nbsp;Stefan.&lt;br&gt;
&lt;br&gt;
&quot;Nasser Abbasi&quot; &amp;lt;nma@12000.org&amp;gt; wrote in message&lt;br&gt;
&amp;lt;Zbzhk.16026$mh5.2132@nlpi067.nbdc.sbc.com&amp;gt;...&lt;br&gt;
&amp;gt; 2007a, student version on windoz XP SP2.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I use GUIDE, and after sometime of using it, I notice it&lt;br&gt;
gets sluggish in &lt;br&gt;
&amp;gt; its response to editing and I see the following Java&lt;br&gt;
errors on the console:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Exception in thread &quot;AWT-EventQueue-0&quot;&lt;br&gt;
java.lang.OutOfMemoryError: Java &lt;br&gt;
&amp;gt; heap space&quot;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am not sure why it runs out of RAM so fast. as I have 4&lt;br&gt;
GB of physical &lt;br&gt;
&amp;gt; RAM.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I did a google on the above and I see that others have&lt;br&gt;
seen this.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I wonder if there is any update on this problem that&lt;br&gt;
someone from Mathworks &lt;br&gt;
&amp;gt; or others can comment on.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is this still a problem in later Matlab releases?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; thanks,&lt;br&gt;
&amp;gt; Nasser&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; </description>
    </item>
    <item>
      <pubDate>Tue, 21 Oct 2008 09:57:01 -0400</pubDate>
      <title>Re: Exception in thread</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173077#606563</link>
      <author>Juan Luis </author>
      <description>I get the same error.&lt;br&gt;
&lt;br&gt;
It is disgusting, because now I get this error when I execute a file that was working perfectly some days ago. Unfortunately, I had to format my HD and now I get this strange error. &lt;br&gt;
&lt;br&gt;
I am a unexperienced user. How can I get this fixed? Thanks very much...</description>
    </item>
    <item>
      <pubDate>Tue, 21 Oct 2008 13:32:01 -0400</pubDate>
      <title>Re: Exception in thread</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173077#606605</link>
      <author>Dave Brackett</author>
      <description>&quot;Juan Luis &quot; &amp;lt;jlvalera@yahoo.es&amp;gt; wrote in message &amp;lt;gdk91d$b$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I get the same error.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; It is disgusting, because now I get this error when I execute a file that was working perfectly some days ago. Unfortunately, I had to format my HD and now I get this strange error. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am a unexperienced user. How can I get this fixed? Thanks very much...&lt;br&gt;
&lt;br&gt;
have you tried increasing the maximum allowed heap space as explained in the instructions at this page:&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/support/solutions/data/1-18I2C.html&quot;&gt;http://www.mathworks.com/support/solutions/data/1-18I2C.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
it sorted my problem when I got this error.</description>
    </item>
    <item>
      <pubDate>Thu, 25 Mar 2010 15:30:19 -0400</pubDate>
      <title>Re: Exception in thread &quot;AWT-EventQueue-0&quot; java.lang.OutOfMemoryError: Java heap space</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173077#729811</link>
      <author>Joel </author>
      <description>I have also run into some troubles with to little allocated memory for the java heap. The default max allocatalbe memory for the java heap in Matlab is 128Mb i think. You can change this by adding a file called&lt;br&gt;
java.opts in $MATLABROOT/bin/$ARCH&lt;br&gt;
If you want to change the max heap size to, for example  1024mb insert a line:&lt;br&gt;
-Xmx2048m&lt;br&gt;
in the java.opts file&lt;br&gt;
I don't know how to unallocate java heap memory when used though...&lt;br&gt;
BR&lt;br&gt;
Joel&lt;br&gt;
&lt;br&gt;
&quot;Nasser Abbasi&quot; &amp;lt;nma@12000.org&amp;gt; wrote in message &amp;lt;Zbzhk.16026$mh5.2132@nlpi067.nbdc.sbc.com&amp;gt;...&lt;br&gt;
&amp;gt; 2007a, student version on windoz XP SP2.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I use GUIDE, and after sometime of using it, I notice it gets sluggish in &lt;br&gt;
&amp;gt; its response to editing and I see the following Java errors on the console:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Exception in thread &quot;AWT-EventQueue-0&quot; java.lang.OutOfMemoryError: Java &lt;br&gt;
&amp;gt; heap space&quot;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am not sure why it runs out of RAM so fast. as I have 4 GB of physical &lt;br&gt;
&amp;gt; RAM.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I did a google on the above and I see that others have seen this.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I wonder if there is any update on this problem that someone from Mathworks &lt;br&gt;
&amp;gt; or others can comment on.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is this still a problem in later Matlab releases?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; thanks,&lt;br&gt;
&amp;gt; Nasser&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; </description>
    </item>
  </channel>
</rss>

