Fix Insufficient Memory Errors During Polyspace Report Generation
Issue
When generating reports from Polyspace® results containing a very large number of defects or coding rule violations, you might encounter insufficient memory errors.
The error message can look like this message:
....
Exporting views...
Initializing...
Polyspace Report Generator
Generating Report
.....
Converting report
Opening log file: C:\Users\auser\AppData\Local\Temp\java.log.7512
Document conversion failed
.....
Java exception occurred:
java.lang.OutOfMemoryError: Java heap space
Possible Solutions
To resolve the issue, you can try increasing the available heap memory or reporting the results over multiple reports instead of in a single report.
Increase Java Heap Size
If the error occurs during report generation, try increasing the Java® heap size. The default heap size in a 64-bit architecture is 1024 MB.
To increase the size:
Navigate to
. Where:polyspaceroot\polyspace\bin\architectureis the installation folder.polyspacerootis your computer architecture, for instance,architecturewin32,win64, etc.
Change the default heap size that is specified in the file,
java.opts. For example, to increase the heap size to 2 GB, replace1024mwith2048m.If you do not have write permission for the file, copy the file to another location. After you have made your changes, copy the file back to
.polyspaceroot\polyspace\bin\architecture\
Export Polyspace Results to Tab-Delimited Text File
Instead of generating a PDF or HTML report directly, you can export the results to a tab-delimited text (TSV) file. The results export is faster than report generation and can complete in reasonable time even for large result sets. For more information, see:
See Also
polyspace-report-generator | polyspace-results-export