-
Bug
-
Resolution: Fixed
-
P4
-
jfx21, jfx23
-
b13
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8344953 | jfx23.0.2 | Lukasz Kostyra | P4 | Resolved | Fixed | b03 |
JDK-8344784 | jfx21.0.6 | Johan Vos | P4 | Resolved | Fixed | b02 |
JDK-8344783 | jfx17.0.14 | Johan Vos | P4 | Resolved | Fixed | b02 |
On Windows:
May 31, 2024 6:59:25 PM com.sun.javafx.webkit.prism.PrismInvoker runOnRenderThread
SEVERE: RenderJob error
java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "com.sun.prism.RTTexture.contentsUseful()" because "this.txt" is null
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.PrismInvoker.runOnRenderThread(PrismInvoker.java:93)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.RTImage.getPixelBuffer(RTImage.java:203)
at javafx.web@23-ea/com.sun.webkit.MainThread.twkScheduleDispatchFunctions(Native Method)
at javafx.web@23-ea/com.sun.webkit.MainThread.lambda$fwkScheduleDispatchFunctions$0(MainThread.java:35)
at javafx.graphics@23-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at javafx.graphics@23-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
at javafx.graphics@23-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Caused by: java.lang.NullPointerException: Cannot invoke "com.sun.prism.RTTexture.contentsUseful()" because "this.txt" is null
at javafx.web@23-ea/com.sun.javafx.webkit.prism.RTImage.getTexture(RTImage.java:118)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.RTImage.getGraphics(RTImage.java:93)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.WCBufferedContext.getGraphics(WCBufferedContext.java:65)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.WCGraphicsPrismContext.getPlatformGraphics(WCGraphicsPrismContext.java:127)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.WCGraphicsPrismContext.isValid(WCGraphicsPrismContext.java:132)
at javafx.web@23-ea/com.sun.webkit.graphics.WCRenderQueue.decode(WCRenderQueue.java:107)
at javafx.web@23-ea/com.sun.webkit.graphics.WCImage.flushRQ(WCImage.java:64)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.RTImage.lambda$getPixelBuffer$2(RTImage.java:209)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
at javafx.graphics@23-ea/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at javafx.graphics@23-ea/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:126)
at java.base/java.lang.Thread.run(Thread.java:1583)
on macOS:
May 31, 2024 8:55:16 PM com.sun.javafx.webkit.prism.PrismInvoker runOnRenderThread
SEVERE: RenderJob error
java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "com.sun.prism.RTTexture.contentsUseful()" because "this.txt" is null
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.PrismInvoker.runOnRenderThread(PrismInvoker.java:93)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.RTImage.getPixelBuffer(RTImage.java:203)
at javafx.web@23-ea/com.sun.webkit.Timer.twkFireTimerEvent(Native Method)
at javafx.web@23-ea/com.sun.webkit.Timer.fireTimerEvent(Timer.java:84)
at javafx.web@23-ea/com.sun.webkit.Timer.notifyTick(Timer.java:65)
at javafx.web@23-ea/javafx.scene.web.WebEngine$PulseTimer.lambda$static$0(WebEngine.java:1205)
at javafx.graphics@23-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at javafx.graphics@23-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
at javafx.graphics@23-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Caused by: java.lang.NullPointerException: Cannot invoke "com.sun.prism.RTTexture.contentsUseful()" because "this.txt" is null
at javafx.web@23-ea/com.sun.javafx.webkit.prism.RTImage.getTexture(RTImage.java:118)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.RTImage.getGraphics(RTImage.java:93)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.WCBufferedContext.getGraphics(WCBufferedContext.java:65)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.WCGraphicsPrismContext.getPlatformGraphics(WCGraphicsPrismContext.java:127)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.WCGraphicsPrismContext.isValid(WCGraphicsPrismContext.java:132)
at javafx.web@23-ea/com.sun.webkit.graphics.WCRenderQueue.decode(WCRenderQueue.java:107)
at javafx.web@23-ea/com.sun.webkit.graphics.WCImage.flushRQ(WCImage.java:64)
at javafx.web@23-ea/com.sun.javafx.webkit.prism.RTImage.lambda$getPixelBuffer$2(RTImage.java:209)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
at javafx.graphics@23-ea/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at javafx.graphics@23-ea/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:126)
at java.base/java.lang.Thread.run(Thread.java:1583)
The attached test reproduces the issue.
Unzip the html file, run the application, and select one row of the tableView to generate the animation. Then go selecting one after the other, without waiting, and at some point the exception will show up. Resizing the stage also helps.
Note that the test has a very low Vram value (40 MB), way lower than the default 512 MB, but this is just to get the exception faster.
While the pool of resources is perfectly capable of dealing with resource management under such limit, the logs show that at some point the resources are pruned from the pool:
Pruning obsolete in pool: D3D Vram Pool
Pruning unuseful older than 1024 in pool: D3D Vram Pool
Pruning unuseful older than 512 in pool: D3D Vram Pool
Pruning unuseful older than 10 in pool: D3D Vram Pool
Pruning all older than 1024 in pool: D3D Vram Pool
Pruning all older than 512 in pool: D3D Vram Pool
Pruning all older than 100 in pool: D3D Vram Pool
Pruning everything in pool: D3D Vram Pool
or
Pruning obsolete in pool: ES2 Vram Pool
Pruning unuseful older than 1024 in pool: ES2 Vram Pool
Pruning unuseful older than 512 in pool: ES2 Vram Pool
Pruning unuseful older than 10 in pool: ES2 Vram Pool
Pruning all older than 1024 in pool: ES2 Vram Pool
Pruning all older than 512 in pool: ES2 Vram Pool
Pruning all older than 100 in pool: ES2 Vram Pool
Pruning everything in pool: ES2 Vram Pool
Last chance pruning in pool: ES2 Vram Pool
there is sometimes a texture that is removed, but it is still being referred down the line, causing the NPE.
- backported by
-
JDK-8344783 Cannot invoke "com.sun.prism.RTTexture.contentsUseful()" because "this.txt" is null
- Resolved
-
JDK-8344784 Cannot invoke "com.sun.prism.RTTexture.contentsUseful()" because "this.txt" is null
- Resolved
-
JDK-8344953 Cannot invoke "com.sun.prism.RTTexture.contentsUseful()" because "this.txt" is null
- Resolved
- relates to
-
JDK-8341852 Investigate potential threading issue in WebView's RTImage
- Open
-
JDK-8341851 Cannot invoke "com.sun.prism.d3d.D3DRTTexture.contentsUseful()" because "rtt" is null
- Open
- links to
-
Commit(master) openjdk/jfx17u/024ae5db
-
Commit(master) openjdk/jfx21u/8fa8dfbf
-
Commit(master) openjdk/jfx23u/0d05cb17
-
Commit(master) openjdk/jfx/fb06b1f8
-
Review(master) openjdk/jfx17u/218
-
Review(master) openjdk/jfx21u/83
-
Review(master) openjdk/jfx23u/32
-
Review(master) openjdk/jfx/1590