5

我在 JavaFx8 中创建了一个运行良好的应用程序,但有时会显示如下所述的异常。我不明白为什么我会遇到这种异常。有没有办法跟踪这个异常。或者任何熟悉这种例外的人。请帮忙。

java.lang.NullPointerException
    at com.sun.pisces.PiscesRenderer.fillLCDAlphaMask(PiscesRenderer.java:334)
    at com.sun.prism.sw.SWGraphics.drawStringInternal(SWGraphics.java:776)
    at com.sun.prism.sw.SWGraphics.drawString(SWGraphics.java:732)
    at com.sun.javafx.sg.prism.NGText.renderText(NGText.java:319)
    at com.sun.javafx.sg.prism.NGText.renderContent(NGText.java:277)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:412)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:69)
    at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1283)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:237)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:203)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1254)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:412)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:69)
    at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1283)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:237)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:203)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1254)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:412)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:69)
    at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1283)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:237)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:203)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1254)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:412)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:69)
    at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1283)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:237)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:203)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1254)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:412)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:69)
    at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1283)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:237)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:203)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1254)
    at com.sun.javafx.sg.prism.NodeEffectInput.render(NodeEffectInput.java:154)
    at com.sun.javafx.sg.prism.NodeEffectInput.filter(NodeEffectInput.java:84)
    at com.sun.scenario.effect.Merge.filter(Merge.java:161)
    at com.sun.scenario.effect.DelegateEffect.filter(DelegateEffect.java:70)
    at com.sun.scenario.effect.impl.prism.PrEffectHelper.render(PrEffectHelper.java:164)
    at com.sun.javafx.sg.prism.NGNode$EffectFilter.render(NGNode.java:951)
    at com.sun.javafx.sg.prism.NGNode.renderEffect(NGNode.java:701)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:410)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:69)
    at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1283)
    at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:99)
    at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:202)
    at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:95)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
    at java.lang.Thread.run(Thread.java:724)
4

1 回答 1

6

Known issue which is fixed in later builds

Your NullPointerException at line 334 of PiscesRendere.java is a known bug that should be fixed if you upgrade to a later JavaFX 8 build.

RT-31384 fx8.0-b96: NullPointerException in fillLCDAlphaMask in sw pipeline

To self-troubleshoot such issues in the future

  1. You can test your code using the latest Java 8 distribution (which includes the latest JavaFX distribution).

  2. You can check the bug tracker and file the bug if the bug is not present. You will need to provide more info, e.g. your environment, reproduction steps and an executable code sample that reproduces the bug.

  3. You can debug the issue yourself based on the JavaFX source code (for example PiscesRenderer.java source is here). Note that you will need to select the correct source tag to match your build.

  4. Or you can build and patch JavaFX yourself.

于 2013-09-13T10:18:36.487 回答