Why do I receive Java 'Out of memory' errors when loading a G-Protein model in SimBiology 2.1.1 (R2007a)?

5 views (last 30 days)
If I have one of my projects loaded via SBILOADPROJECT, and then open SBIODESKTOP and select to load the same project via the "Most Recent Projects" section of the "My Projects" window, the project doesn't load and a Java error is output to the MATLAB prompt. This does not appear to be a problem for all of my project files, and the issue is not consistently reproducible.
The error I receive is as follows:
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError
at java.io.WinNTFileSystem.getBooleanAttributes(Native Method)
at java.io.File.exists(Unknown Source)
at com.mathworks.mlwidgets.html.HTMLUtils.getUrlFromLocation(HTMLUtils.java:121)
at com.mathworks.mlwidgets.html.HTMLUtils.getUrlStringFromLocation(HTMLUtils.java:91)
at com.mathworks.mlwidgets.html.ICERenderer$MyStormBase.renderContent(ICERenderer.java:697)
at ice.storm.Pilot.renderContent(Pilot.java:264)
at ice.pilots.html4.DefaultActionHandler.handleDefaultActionOnLinks(DefaultActionHandler.java:919)
at ice.pilots.html4.DefaultActionHandler.handleEvent(DefaultActionHandler.java:215)
at ice.pilots.html4.DDocument.processEventImpl(DDocument.java:590)
at ice.pilots.html4.DDocument.processEvent(DDocument.java:514)
at ice.pilots.html4.DNode.dispatchEvent(DNode.java:645)
at ice.pilots.html4.DefaultActionHandler.handleEvent(DefaultActionHandler.java:290)
at ice.pilots.html4.DDocument.processEventImpl(DDocument.java:590)
at ice.pilots.html4.DDocument.processEvent(DDocument.java:514)
at ice.pilots.html4.DNode.dispatchEvent(DNode.java:645)
at ice.pilots.html4.CSSLayout.callDispatchEvent(CSSLayout.java:1375)
at ice.pilots.html4.CSSLayout.do_handleEvent(CSSLayout.java:1176)
at ice.pilots.html4.CSSLayout.handleEvent(CSSLayout.java:1089)
at ice.pilots.html4.DocPaneXml.uiEvent(DocPaneXml.java:262)
at
[snip...]

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This issue can occur when loading a SimBiology project, and is a particular concern with the G-Protein model.
The following workaround is successful in most cases:
Modify the 'java.opts' (in $MATLAB/bin/win32/java.opts, where $MATLAB is theMATLAB root directory) file and add the following lines:
-XX:PermSize=72m
-XX:MaxPermSize=72m
-Xmx256m
-Dcom.sun.management.jmxremote
Note that you may need to create 'java.opts' if it does not already exist and put it in your MATLAB startup directory.
Also note the following:
When a Java class is loaded it is loaded into permgen memory space. Once memory is taken from that area it is not released. This is the way Java works and is not considered a MATLAB error.
In release R2007a, MATLAB allocates 32MB for loading Java classes. MATLAB on its own takes almost the full 32MB. Therefore a product that contains many Java classes such as SimBiology can run into memory problems. The product starts erroring because the class that is needed to perform some action cannot be loaded. This is why a Java 'OutOfMemory' exception is returned.
We are planning on increasing this Java class memory allocation from 32MB to 64 MB in a future release.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2007a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!