1

Introduction

I get an OutOfMemoryError when building a System Design Description in PDF and Word format.

Steps resulting in Exception

I have already increased the heap space to the maximum of the slider (1,000MB) in the preferences and called the report generation from the command line similar to matlab -nosplash -noFigureWindows -r "load_system('mymodel'); report('SDD.rpt','-fPDF');". In reality it is a batch file calling MatLab with a m-script loading the model and generating the report to reduce typing in the command line.

Information to Simulink Model

The error occurs with a rapid prototyping model for an electric drivetrain so I can understand it takes much memory.

Machine and Software Information

The machine is a 64bit Windows 7 system with 4GB RAM with:

    MATLAB Version: 8.6.0.267246 (R2015b)
    MATLAB License Number: 706217
    Operating System: Microsoft Windows 7 Enterprise  Version 6.1 (Build 7601: Service Pack 1)
    Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode

The MatLab process itself seems not to take more than ~1.5GB even when no other applications are running so I am not sure whether I really do not have enough memory or MatLab is not able to use more than 1,000MB of memory for the report generation. In the past it was possible to set the java heap freely using -Xmxxxx in the java.opts file which is not possible any more according to the documentation.

Memory Status

>> [java.lang.Runtime.getRuntime.maxMemory,java.lang.Runtime.getRuntime.totalMemory,java.lang.Runtime.getRuntime.freeMemory]./2^20
ans =
  917.0000  186.5000  126.9733

Exception

Document conversion failed. Java exception occurred: java.lang.OutOfMemoryError: Java heap space
 at org.apache.fop.complexscripts.bidi.DelimitedTextRange.<init>(Unknown Source)
 at org.apache.fop.fo.FONode.maybeNewRange(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.flow.table.Table.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.pagination.PageSequence.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.complexscripts.bidi.BidiResolver.resolveInlineDirectionality(Unknown Source)
 at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(Unknown Source)
 at org.apache.fop.area.AreaTreeHandler.endPageSequence(Unknown Source)
 at org.apache.fop.fo.pagination.PageSequence.endOfNode(Unknown Source)
 at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(Unknown Source)
Error running report Java exception occurred: java.lang.OutOfMemoryError: Java heap space
 at org.apache.fop.complexscripts.bidi.DelimitedTextRange.<init>(Unknown Source)
 at org.apache.fop.fo.FONode.maybeNewRange(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.flow.table.Table.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.pagination.PageSequence.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.fo.FONode.collectDelimitedTextRanges(Unknown Source)
 at org.apache.fop.complexscripts.bidi.BidiResolver.resolveInlineDirectionality(Unknown Source)
 at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(Unknown Source)
 at org.apache.fop.area.AreaTreeHandler.endPageSequence(Unknown Source)
 at org.apache.fop.fo.pagination.PageSequence.endOfNode(Unknown Source)
 at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(Unknown Source)
Torsten Knodt
  • 477
  • 1
  • 5
  • 20
  • Simple solution: buy more memory. You can use the profiler tool to check what processes use the most memory – Adriaan Oct 26 '15 at 08:46
  • Perhaps me or someone else could answer if we would know which Java Version is installed and used, which command did you enter on the command line, what do you mean with "to the maximum"? Did you inrease the -Xmx value on Java 6/7 for example or another value? – Peter Paul Kiefer Oct 26 '15 at 08:48
  • ah..Yes, it's the JVM memory I suspect, I doubt buying more memory would solve it, as it is a software limitation, not that of hardware. The JVM was developed in the 90s' so it was not intended to handle volume beyond 4GB (assume you have the 32bit version). I think if you tag this with Java, some of the Java experts might be able to help you further. Also look at this: http://stackoverflow.com/questions/3030263/increasing-the-jvm-maximum-heap-size-for-memory-intensive-applications – GameOfThrows Oct 26 '15 at 09:23
  • can you check your version of the JVM (32bit or 64bit) use bash java -version, based on speculation, it seems that your Matlab not wanting to take more than 1.5GB would indicate that you have the JVM 32bit, you need to get the 64 bit version from Oracle – GameOfThrows Oct 26 '15 at 10:54
  • I have added java version and command line calling information abd it is a 64Bit JVM. In fact the 1.5GB limit of the 32Bit JVM was the reason to switch from 32Bit to 64Bit MatLab. – Torsten Knodt Oct 26 '15 at 11:10

0 Answers0