Closed carlosame closed 2 months ago
Appears to happen with any Gradle version, and even setting the max heap size to 4G does not help. The test suite got too large?
In SVGAnimationEngine
the animation engine is kept as a WeakReference
, but with the current JVMs those references do not last very long. Due to that, the SwingMemoryLeakTest
requires at least 4GB of heap space to pass and that seems to be the cause of this issue.
The proper fix would be to replace the WeakReference
in SVGAnimationEngine
with a SoftReference
, but then the whole point of those tests is lost.
After upgrading to Gradle 8.8 from 8.2.1,
./gradlew test
frequently fails with ajava.lang.OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects
after 50-100 seconds. Increasing the heap did not help.The stack trace: