JDK-8312564 : FX8-3DFeatures.SpecularColorTestApp throws NPE
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: internal
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: generic
  • Submitted: 2023-07-24
  • Updated: 2023-10-30
  • Resolved: 2023-08-28
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
internalFixed
Related Reports
Blocks :  
Relates :  
Description
FX8-3DFeatures.SpecularColorTestApp and FX8-3DFeatures.WritableMapTestApp are throwing below exception:

java.lang.NullPointerException: Cannot invoke "com.sun.prism.Texture.lock()" because "altTex" is null
    at javafx.graphics@21-internal/com.sun.prism.impl.BaseTexture.getSharedTexture(BaseTexture.java:215)
    at javafx.graphics@21-internal/com.sun.prism.impl.BaseResourceFactory.getCachedTexture(BaseResourceFactory.java:213)
    at javafx.graphics@21-internal/com.sun.prism.impl.BaseResourceFactory.getCachedTexture(BaseResourceFactory.java:170)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGImageView.renderContent(NGImageView.java:121)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.CacheFilter.renderNodeToCache(CacheFilter.java:687)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.CacheFilter.render(CacheFilter.java:587)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.renderCached(NGNode.java:2379)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2065)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGImageView.doRender(NGImageView.java:103)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1966)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:579)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2074)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1966)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:579)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2074)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1966)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:579)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2074)
    at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1966)
    at javafx.graphics@21-internal/com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:480)
    at javafx.graphics@21-internal/com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:329)
    at javafx.graphics@21-internal/com.sun.javafx.tk.quantum.UploadingPainter.run(UploadingPainter.java:156)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
    at javafx.graphics@21-internal/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at javafx.graphics@21-internal/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:126)
    at java.base/java.lang.Thread.run(Thread.java:833)
Comments
Changeset: 3270176c Author: Jayathirth Rao D V <jayathirth.d.v@oracle.com> Committer: aghaisas <ajitgh@gmail.com> Date: 2023-08-28 20:29:40 +0000 URL: https://git.openjdk.org/jfx-sandbox/commit/3270176c730c72975a2c60b275d76322c3a9d19d
28-08-2023

Both these tests throw NPE because we don't have createSharedTexture() logic in MTLTexture.java When we want to re-use the same texture for different wrap modes we use createSharedTexture() logic. When we launch fx83dfeatures.SpecularColorTestApp from apps/toys/FX8-3DFeatures we see blank screen at first and later on update we see the content. This was happening because of this NPE. We need implement createSharedTexture() for MTLTexture also.
28-08-2023