java.lang.OutOfMemoryError: Java heap space occurs analyzing a small .pas file
Closed this issue · 4 comments
Prerequisites
- This bug is in SonarDelphi, not SonarQube or my Delphi code.
- This bug has not already been reported.
SonarDelphi version
1.3.0
SonarQube version
No response
Issue description
Installed SonarDelphi and attempted to analyze a file. This was my first attempt at using SonarDelphi. After analyzing for over 20 seconds, a dialog appeared that stated
`DelphiLint encountered a problem during analysis.
An error was raised (java.lang.OutOfMemoryError: Java heap space ).`
The .pas file being analyzed has 464 lines of code. The laptop used has 32GB of physical memory and 13.5GB physical was available at the time of the scan. I was asked to create an issue and include Java version info, which is
openjdk 17.0.10 2024-01-16 OpenJDK Runtime Environment Temurin-17.0.10+7 (build 17.0.10+7) OpenJDK Client VM Temurin-17.0.10+7 (build 17.0.10+7, mixed mode, emulated-client)
Steps to reproduce
Install SonarDelphi in Delphi 11.3.
Analyze a small .pas source file.
Minimal Delphi code exhibiting the issue
No response
Hi @JonRobertson,
Very much appreciate the bug report - but can you raise this issue on the delphilint repository instead?
This sounds like it's (more likely) a problem with the way the DelphiLint IDE plugin is invoking java.
@JonRobertson, this issue should now be resolved in DelphiLint 1.0.1. Please try it out - if the issue isn't resolved, please raise a new issue on the DelphiLint repository.
@fourls I am no longer getting the Java heap space error after installing DelphiLint 1.0.1.
Great to hear! I'm glad the problem is resolved.