JDK-8115803 : Null pointer exception in Graphic core on http://www.mtruapehu.com/
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: fx2.0
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2011-08-11
  • Updated: 2015-06-17
  • Resolved: 2011-08-23
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
fx2.0Fixed
Related Reports
Blocks :  
Blocks :  
Description
Please, execute standard presidio browser 
bash-3.2$ cd apps/internal/Browser/
bash-3.2$ ant run

and paste [http://www.mtruapehu.com/] to address field.
Soon you will get 

java.lang.NullPointerException
	at com.sun.scenario.effect.impl.prism.ps.PPSDrawable.create(PPSDrawable.java:54)
	at com.sun.scenario.effect.impl.prism.ps.PPSRenderer.createCompatibleImage(PPSRenderer.java:146)
	at com.sun.scenario.effect.impl.prism.ps.PPSRenderer.createCompatibleImage(PPSRenderer.java:60)
	at com.sun.scenario.effect.Effect.createCompatibleImage(Effect.java:462)
	at com.sun.webpane.sg.prism.WCGraphicsPrismContext$Layer.<init>(WCGraphicsPrismContext.java:1041)
	at com.sun.webpane.sg.prism.WCGraphicsPrismContext$ClipLayer.<init>(WCGraphicsPrismContext.java:1080)
	at com.sun.webpane.sg.prism.WCGraphicsPrismContext.setClip(WCGraphicsPrismContext.java:177)
	at com.sun.webpane.platform.graphics.GraphicsDecoder.decode(GraphicsDecoder.java:205)
	at com.sun.webpane.platform.graphics.WCRenderQueue.decode(WCRenderQueue.java:35)
	at com.sun.webpane.platform.WebPage.paint2GC(WebPage.java:632)
	at com.sun.webpane.platform.WebPage.paint(WebPage.java:611)
	at com.sun.javafx.sg.prism.NGWebView.renderContent(NGWebView.java:68)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:179)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
	at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1108)
	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:187)
	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:391)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:179)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
	at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1108)
	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:187)
	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:391)
	at com.sun.javafx.sg.prism.NGNode.renderRectClip(NGNode.java:316)
	at com.sun.javafx.sg.prism.NGNode.renderClip(NGNode.java:341)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:171)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
	at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1108)
	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:187)
	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:391)
	at com.sun.javafx.sg.prism.NGNode.renderRectClip(NGNode.java:316)
	at com.sun.javafx.sg.prism.NGNode.renderClip(NGNode.java:341)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:171)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
	at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1108)
	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:187)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:179)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
	at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1108)
	at com.sun.javafx.tk.quantum.PaintRunnable.doPaint(PaintRunnable.java:217)
	at com.sun.javafx.tk.quantum.PaintRunnable.paintImpl(PaintRunnable.java:148)
	at com.sun.javafx.tk.quantum.PaintRunnable.run(PaintRunnable.java:325)
	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$ObservedRunnable.run(QuantumRenderer.java:67)
	at java.lang.Thread.run(Thread.java:722)
Comments
Verified with Presidio b41.
23-08-2011

Fixed in http://jfxsrc.us.oracle.com/javafx/presidio/scrum/graphics/runtime/rev/69bca3a37e68
23-08-2011

Approved for b42 at 8/18 bug court
19-08-2011

Thanks Jim! I've replaced createCompatibleImage() with getCompatibleImage(). The updated fix: http://javaweb.us.oracle.com/jcg/fx-webrevs/RT-15878/2
16-08-2011

The WC code is misusing the (internal) APIs. They should be doing either one of the following: img = getCompatibleImage(...); ... releaseCompatibeleImage(img); OR: img = createCompatibleImage(...); ... img.flush(); They should not be mixing these two mechanisms...
15-08-2011

Here's a fix for the leak in WCGraphicsPrismContext: http://javaweb.us.oracle.com/jcg/fx-webrevs/RT-15878/1 The problem is, Layer doesn't have code to release its [buffer]. It relies on subclasses to implement proper cleanup. Of those subclasses, ClipLayer releases the buffer, but TransparencyLayer doesn't. I introduce a new method, Layer.dispose() that is called automatically from renderLayer() so that subclasses don't have to worry about buffer any more. Note that this fix doesn't make any difference because of RT-15960.
15-08-2011

I've identified one leak in WCGraphicsPrismContext, but the majority seems to come from decora/quantum. I've filed RT-15960 and RT-15961.
15-08-2011

Effect.createCompatibleImage will return null if cannot allocate enough resources. This is probably happening due to a resource leak, possibly in WebView.
11-08-2011