JDK-8088198 : Exception thrown from snapshot if dimensions are larger than max texture size
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 7u6,8,openjfx11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2012-06-05
  • Updated: 2020-03-06
  • Resolved: 2020-01-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx14Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
If you run the attached test program with the HW pipeline, the following exception will be thrown:

% java helloworld.HelloBigSnapshot
java.lang.NullPointerException
	at com.sun.javafx.tk.quantum.QuantumToolkit$15.run(QuantumToolkit.java:1409)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
	at com.sun.prism.render.RenderJob.run(RenderJob.java:37)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:96)
	at java.lang.Thread.run(Thread.java:722)
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:403)
	at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
	at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalArgumentException: Unrecognized image loader: null
	at javafx.scene.image.WritableImage.loadTkImage(WritableImage.java:223)
	at javafx.scene.image.WritableImage.access$000(WritableImage.java:43)
	at javafx.scene.image.WritableImage$1.loadTkImage(WritableImage.java:48)
	at javafx.scene.Scene.doSnapshot(Scene.java:1140)
	at javafx.scene.Node.doSnapshot(Node.java:1664)
	at javafx.scene.Node.snapshot(Node.java:1707)
	at helloworld.HelloBigSnapshot.start(HelloBigSnapshot.java:24)
	at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
	at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
	at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
	at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
	... 1 more

Comments
Changeset: 1823f6ec Author: Frederic Thevenet <thevenet.fred@free.fr> Committer: Kevin Rushforth <kcr@openjdk.org> Date: 2020-01-31 14:11:47 +0000 URL: https://git.openjdk.java.net/jfx/commit/1823f6ec
31-01-2020

PR: https://github.com/openjdk/jfx/pull/68 Author: Frederic Thevenet https://github.com/fthevenet
24-12-2019

I hit this all the time. It seems to happen when I've accessed the machine running my app via Remote Desktop, which works fine. Then I come in to work and the app is no-longer rendering when I login to the machine locally. The app is alive, but all drawing doesn't work. I see this same stack trace in my logs. Nothing about the image size has changed between those two cases, and if I run the app again it works fine rendering the same node configuration to the same size image. In my case I am attempting to render a potentially large Node into a very small image with a scaling transform. Generating a thumbnail view of a rather large "document" (think something like a UML diagram). So the "destination image" would be 75x75, but the unscaled source Node would normally render to something much larger than the screen.. SnapshotParameters snapParams = new SnapshotParameters(); snapParams.setFill(Color.TRANSPARENT); snapParams.setTransform(new Scale(scale, scale)); WritableImage image = n.snapshot(snapParams,null);
03-12-2019

SQE is OK to defer this from 8u40.
19-11-2014

We will not be able to fix this for 8u40 due to lack of resources. Since this isn't a regression -- the limitation has been there since 2.2 -- we propose to fix this in 9.
12-11-2014

Targeting this to 8u40 since there seems to be some interest in getting it fixed.
13-06-2014

There have been instances of users on forum threads trying to use WebView as a screen snapshot engine. Such use cases fail when the web page is large, presumably due to texture size limitations as described in this issue.
13-06-2014

This is related to the general problem of needing to handle large textures. See RT-22669.
10-08-2013

Will look at this for 2.2, but may need to be deferred.
06-06-2012

Added new unit tests (currently disabled with @Ignore) to javafx/scene/Snapshot2Test (in tests/image/SnapshotTests). These tests should be re-enabled when this bug is fixed.
05-06-2012

Note that running with the j2d pipeline works as expected. The problem is that the renderToImage method doesn't handle tiling when the destination image is bigger than the max texture size.
05-06-2012