The default Quartz renderer introduces serious memory leak issue on JavaFX. This OOM problem can be reproduced with our PathAnimation demo. The demo runs fine with -Dapple.awt.graphics.UseQuartz=false. But as noted in RT-5008, "The workaround of setting -Dapple.awt.graphics.UseQuartz=false won't work for applets, ..."
This is a serious deployment problem for Soma on Mac with pre Snow Leopard users.
bash-3.2$ javafx pathanimation.Main
Unexpected exception caught in MasterTimer.timePulse():
java.lang.OutOfMemoryError: Java heap space
at com.sun.javafx.scene.paint.MultipleGradientPaintContext.calculateSingleArrayGradient(Mul\
tipleGradientPaintContext.java:363)
at com.sun.javafx.scene.paint.MultipleGradientPaintContext.calculateLookupData(MultipleGrad\
ientPaintContext.java:297)
at com.sun.javafx.scene.paint.MultipleGradientPaintContext.<init>(MultipleGradientPaintCont\
ext.java:209)
at com.sun.javafx.scene.paint.RadialGradientPaintContext.<init>(RadialGradientPaintContext.\
java:124)
at com.sun.javafx.scene.paint.RadialGradientPaint.createContext(RadialGradientPaint.java:56\
1)
at apple.awt.OSXSurfaceData.setupPaint(OSXSurfaceData.java:761)
at apple.awt.OSXSurfaceData.setupGraphicsState(OSXSurfaceData.java:1086)
at apple.awt.CPeerSurfaceData.setupGraphicsState(CPeerSurfaceData.java:136)
at apple.awt.OSXSurfaceData.setupGraphicsState(OSXSurfaceData.java:1014)
at apple.awt.OSXSurfaceData.drawfillShape(OSXSurfaceData.java:1391)
at apple.awt.CRenderer.drawfillShape(CRenderer.java:541)
at apple.awt.CRenderer.fill(CRenderer.java:566)
at sun.java2d.pipe.ValidatePipe.fill(ValidatePipe.java:142)
at sun.java2d.SunGraphics2D.fill(SunGraphics2D.java:2580)
at com.sun.scenario.scenegraph.SGRectangle.fillShape(SGRectangle.java:242)
at com.sun.scenario.scenegraph.SGAbstractGeometry.paint(SGAbstractGeometry.java:154)
at com.sun.scenario.scenegraph.SGLeaf.renderContent(SGLeaf.java:146)
at com.sun.scenario.scenegraph.SGNode.doRender(SGNode.java:599)
at com.sun.scenario.scenegraph.SGNode.render(SGNode.java:549)
at com.sun.scenario.scenegraph.SGGroup.renderContent(SGGroup.java:336)
at com.sun.scenario.scenegraph.SGNode.doRender(SGNode.java:599)
at com.sun.scenario.scenegraph.SGNode.render(SGNode.java:549)
at com.sun.scenario.scenegraph.SGGroup.renderContent(SGGroup.java:336)
at com.sun.scenario.scenegraph.SGNode.doRender(SGNode.java:599)
at com.sun.scenario.scenegraph.SGNode.render(SGNode.java:574)
at com.sun.scenario.scenegraph.SGGroup.renderContent(SGGroup.java:336)
at com.sun.scenario.scenegraph.SGNode.doRender(SGNode.java:599)
at com.sun.scenario.scenegraph.SGNode.render(SGNode.java:549)
at com.sun.scenario.scenegraph.SGGroup.renderContent(SGGroup.java:336)
at com.sun.scenario.scenegraph.SGNode.doRender(SGNode.java:599)
at com.sun.scenario.scenegraph.SGNode.render(SGNode.java:549)
at com.sun.scenario.scenegraph.JSGPanel.paintComponent(JSGPanel.java:251)
************************
Using top to monitor the process memory:
Processes: 85 total, 4 running, 81 sleeping... 345 threads 08:02:04
Load Avg: 0.78, 0.83, 0.72 CPU usage: 29.55% user, 10.00% sys, 60.45% idle
SharedLibs: num = 8, resident = 59M code, 1592K data, 4756K linkedit.
MemRegions: num = 22267, resident = 2071M + 15M private, 510M shared.
PhysMem: 624M wired, 2317M active, 190M inactive, 3386M used, 710M free.
VM: 13G + 377M 382580(0) pageins, 2665458(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
4990 mdworker 0.0% 0:00.11 3 50 31 676K 3348K 2152K 31M
4979 java 44.4% 2:13.32 16 584 10744 1311M+ 61M- 1333M- 1863M-
4961 sh 0.0% 0:00.02 1 13 19 408K 600K 912K 18M
4917 RPDLAgentH 0.1% 0:01.16 3 15 26 13M 184K 13M 31M
***********************t
This is a serious deployment problem for Soma on Mac with pre Snow Leopard users.
bash-3.2$ javafx pathanimation.Main
Unexpected exception caught in MasterTimer.timePulse():
java.lang.OutOfMemoryError: Java heap space
at com.sun.javafx.scene.paint.MultipleGradientPaintContext.calculateSingleArrayGradient(Mul\
tipleGradientPaintContext.java:363)
at com.sun.javafx.scene.paint.MultipleGradientPaintContext.calculateLookupData(MultipleGrad\
ientPaintContext.java:297)
at com.sun.javafx.scene.paint.MultipleGradientPaintContext.<init>(MultipleGradientPaintCont\
ext.java:209)
at com.sun.javafx.scene.paint.RadialGradientPaintContext.<init>(RadialGradientPaintContext.\
java:124)
at com.sun.javafx.scene.paint.RadialGradientPaint.createContext(RadialGradientPaint.java:56\
1)
at apple.awt.OSXSurfaceData.setupPaint(OSXSurfaceData.java:761)
at apple.awt.OSXSurfaceData.setupGraphicsState(OSXSurfaceData.java:1086)
at apple.awt.CPeerSurfaceData.setupGraphicsState(CPeerSurfaceData.java:136)
at apple.awt.OSXSurfaceData.setupGraphicsState(OSXSurfaceData.java:1014)
at apple.awt.OSXSurfaceData.drawfillShape(OSXSurfaceData.java:1391)
at apple.awt.CRenderer.drawfillShape(CRenderer.java:541)
at apple.awt.CRenderer.fill(CRenderer.java:566)
at sun.java2d.pipe.ValidatePipe.fill(ValidatePipe.java:142)
at sun.java2d.SunGraphics2D.fill(SunGraphics2D.java:2580)
at com.sun.scenario.scenegraph.SGRectangle.fillShape(SGRectangle.java:242)
at com.sun.scenario.scenegraph.SGAbstractGeometry.paint(SGAbstractGeometry.java:154)
at com.sun.scenario.scenegraph.SGLeaf.renderContent(SGLeaf.java:146)
at com.sun.scenario.scenegraph.SGNode.doRender(SGNode.java:599)
at com.sun.scenario.scenegraph.SGNode.render(SGNode.java:549)
at com.sun.scenario.scenegraph.SGGroup.renderContent(SGGroup.java:336)
at com.sun.scenario.scenegraph.SGNode.doRender(SGNode.java:599)
at com.sun.scenario.scenegraph.SGNode.render(SGNode.java:549)
at com.sun.scenario.scenegraph.SGGroup.renderContent(SGGroup.java:336)
at com.sun.scenario.scenegraph.SGNode.doRender(SGNode.java:599)
at com.sun.scenario.scenegraph.SGNode.render(SGNode.java:574)
at com.sun.scenario.scenegraph.SGGroup.renderContent(SGGroup.java:336)
at com.sun.scenario.scenegraph.SGNode.doRender(SGNode.java:599)
at com.sun.scenario.scenegraph.SGNode.render(SGNode.java:549)
at com.sun.scenario.scenegraph.SGGroup.renderContent(SGGroup.java:336)
at com.sun.scenario.scenegraph.SGNode.doRender(SGNode.java:599)
at com.sun.scenario.scenegraph.SGNode.render(SGNode.java:549)
at com.sun.scenario.scenegraph.JSGPanel.paintComponent(JSGPanel.java:251)
************************
Using top to monitor the process memory:
Processes: 85 total, 4 running, 81 sleeping... 345 threads 08:02:04
Load Avg: 0.78, 0.83, 0.72 CPU usage: 29.55% user, 10.00% sys, 60.45% idle
SharedLibs: num = 8, resident = 59M code, 1592K data, 4756K linkedit.
MemRegions: num = 22267, resident = 2071M + 15M private, 510M shared.
PhysMem: 624M wired, 2317M active, 190M inactive, 3386M used, 710M free.
VM: 13G + 377M 382580(0) pageins, 2665458(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
4990 mdworker 0.0% 0:00.11 3 50 31 676K 3348K 2152K 31M
4979 java 44.4% 2:13.32 16 584 10744 1311M+ 61M- 1333M- 1863M-
4961 sh 0.0% 0:00.02 1 13 19 408K 600K 912K 18M
4917 RPDLAgentH 0.1% 0:01.16 3 15 26 13M 184K 13M 31M
***********************t