Contenido principal

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:

  1. Navigate to polyspaceroot\polyspace\bin\architecture. Where:

    • polyspaceroot is the installation folder.

    • architecture is your computer architecture, for instance, win32, win64, etc.

  2. Change the default heap size that is specified in the file, java.opts. For example, to increase the heap size to 2 GB, replace 1024m with 2048m.

  3. 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

|

Topics