NullPointer in BaseGraphics.drawTextureVO

Kevin Rushforth kevin.rushforth at oracle.com
Tue Jun 11 07:55:34 PDT 2013


> I take it there's no way to avoid the resources issue in the old JFX, 
> it's just a plain and simple bug?

I don't know of a way to completely avoid it. As far as we know there 
aren't any actual leaks in the more recent FX 2.2.x texture code, but 
the resource disposal is not deterministic and if you hit the limit of 
texture memory it does not recover gracefully (or at all).

Jim might have more insight, since he implemented the new texture 
management system for FX 8.;

-- Kevin



Daniel Zwolenski wrote:
> This is an older version, probably JFX from around jdk1.7.0_02. 
>
> I'm running it now on jdk1.7.0_21 to see what happens (takes about an 
> hour to get to the point of failure, which is why I didn't pick it up 
> when I wrote the code originally).
>
> Unfortunately chunks of the system are broken when it runs on this 
> newer code. Lots of backwards compatibility breaks, especially visual 
> ones with CSS that just make it screwy. This is an old project and I 
> don't really want to be touching this code but they have this video 
> capture bug which is killing everything. 
>
> I take it there's no way to avoid the resources issue in the old JFX, 
> it's just a plain and simple bug?
>
>
>
> On Tue, Jun 11, 2013 at 11:10 PM, Kevin Rushforth 
> <kevin.rushforth at oracle.com <mailto:kevin.rushforth at oracle.com>> wrote:
>
>     Is this from FX 2.2.x or FX 8? The stack trace suggests an earlier
>     version of FX. The only thing I can think of off hand is that the
>     HW texture couldn't be created, probably because you ran out of
>     resources. There are a few issues relating to this, which we
>     believe are fixed in FX 8 with the implementation of RT-25323.
>
>     -- Kevin
>
>
>
>     Daniel Zwolenski wrote:
>
>         Can anyone tell me what might cause the exception below in Prism?
>
>         It's from an app that captures video via a native library
>         (LTI-CIVIL) and
>         then converts that image to JFX display via:
>
>             BufferedImage buffImage =
>         AWTImageConverter.toBufferedImage(image);
>             jfxImage =
>         javafx.scene.image.Image.impl_fromExternalImage(buffImage);
>             previewView.setImage(jfxImage);
>
>
>         java.lang.NullPointerException
>         at
>         com.sun.prism.impl.BaseGraphics.drawTextureVO(BaseGraphics.java:365)
>         at
>         com.sun.prism.impl.BaseGraphics.drawTexture(BaseGraphics.java:334)
>         at
>         com.sun.prism.impl.ps
>         <http://com.sun.prism.impl.ps>.BaseShaderGraphics.drawTexture(BaseShaderGraphics.java:103)
>         at
>         com.sun.javafx.sg.prism.NGImageView.renderContent(NGImageView.java:315)
>         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
>         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
>         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1139)
>         at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:205)
>         at
>         com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:420)
>         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
>         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
>         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1139)
>         at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:205)
>         at
>         com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:420)
>         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
>         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
>         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1139)
>         at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:205)
>         at
>         com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:420)
>         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
>         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
>         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1139)
>         at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:205)
>         at
>         com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:420)
>         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
>         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
>         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1139)
>         at
>         com.sun.javafx.tk.quantum.PaintRunnable.doPaint(PaintRunnable.java:214)
>         at
>         com.sun.javafx.tk.quantum.PaintRunnable.paintImpl(PaintRunnable.java:145)
>         at
>         com.sun.javafx.tk.quantum.PaintRunnable.run(PaintRunnable.java:349)
>         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:29)
>         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:101)
>         at java.lang.Thread.run(Thread.java:722)
>          
>
>


More information about the openjfx-dev mailing list