JDK-8111188 : FX App thread must not run in parallel with QuantumRenderer
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: fx2.0
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2011-02-05
  • Updated: 2015-06-16
  • Resolved: 2011-05-16
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
Duplicate :  
Description
With the merging of the FX User Thread and the native event thread, we have lost the serialization between the rendering done by the Prism Render Thread and the events processed by the FX App thread.

Eventually we want to allow the rendering of frame N on the Prism Render Thread to run in parallel with the event code, animation code, and other user runnables running on the JavaFX App Thread preparing frame N+1 by modifying the scene graph.

Until the rest of the system is ready to support this, however, we need to ensure that the FX App Thread is not running at the same time the Prism Render Thread is doing any rendering.

Comments
All the app/tests failures mentioned in dependOn bugs have been verified with b39 , along with changeset: 12002:a038bfc6e6dc by Morris and hence consider this as fixed.
08-08-2011

Fixed in presidio-graphics b1998 with this changeset changeset: 12002:a038bfc6e6dc tag: tip user: Morris Meyer <morris.meyer@sun.com> date: Mon May 16 15:14:15 2011 -0400 summary: RT-10972 - fix co-running condition on Windows
16-05-2011

-Dprism.threadcheck=true will enable co-running instrumentation
28-03-2011

I am certain that RT-11226 is primarily a 3D bounds bug.1) it's too stable and repeatable to be an MT race condition; 2) it happens with Newt (the showdirty feature isn't implemented in newt, but you can see the visual artifacts unless you turn off prism.dirtyopts or turn on prism.showdirty).
15-02-2011

I have taken a quick look at the ColorCube example mentioned in RT-11226. I'm still not convince that the dirtyopts rendering issue isn't related to MT issue. If you were the run the ColorCube program and click on the edge of the window and continue to resize the window as the cube is rotating, you will notice that the dirtyopts region is computed correctly but appear to be lagging behind.
15-02-2011

The dirtyopts rendering issue is a 3D bounds bug, not an MT issue. The NPE is almost certainly an MT issue. I have filed a new issue for the 3D bounds bug, RT-11226
15-02-2011

I forgot to mention that this is reproducible on my laptop running Windows 7, so this isn't a Mac only issue.
14-02-2011

I can reproduce this MT issue with a much simple program, PathAntialiasingTest3D, in toys/ShapeT3DTest. There are 2 things to look for here, one is a dirtyops rendering issue and other the is a NPE issue, but I believe both are related to MT issue. I have a 50% chance of hitting the dirtyops rendering bug at start-up and resizing the windows fixes the problem. The NPE issue is a little hard to reproduce, I can encounter 1 in every 10 runs. Here is the stacktrace: Prism Render Thread uncaught: java.lang.NullPointerException java.lang.NullPointerException at com.sun.prism.impl.ps.BaseShaderGraphics.setPaint(BaseShaderGraphics.java:64) at com.sun.javafx.sg.prism.NGShape.renderContent(NGShape.java:129) at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:95) at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:36) at com.sun.javafx.sg.BaseNode.render(BaseNode.java:906) at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:142) at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:95) at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:36) at com.sun.javafx.sg.BaseNode.render(BaseNode.java:906) at com.sun.javafx.tk.glass.PrismPen$PaintRunnable.paintImpl(PrismPen.java:188) at com.sun.javafx.tk.glass.PrismPen$PaintRunnable.run(PrismPen.java:293) at com.sun.javafx.tk.glass.RunnableEvent.run(RunnableEvent.java:13) at com.sun.javafx.tk.glass.GlassToolkitImpl.run(GlassToolkitImpl.java:122) at java.lang.Thread.run(Thread.java:662)
14-02-2011

I've been observing a number of different exceptions when running GUIMark2/Vector test, e.g. Prism Render Thread uncaught: java.lang.ArrayIndexOutOfBoundsException java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at com.sun.javafx.geom.Path2D$CopyIterator.currentSegment(Path2D.java:664) at com.sun.javafx.geom.Stroke.createSolidShape(Stroke.java:492) at com.sun.javafx.geom.Stroke.createCenteredStrokedShape(Stroke.java:369) at com.sun.prism.BasicStroke.createCenteredStrokedShape(BasicStroke.java:31) at com.sun.javafx.geom.Stroke.createStrokedShape(Stroke.java:345) at com.sun.javafx.sg.prism.NGShape.getStrokeShape(NGShape.java:145) at com.sun.javafx.sg.prism.NGShape.computeContentBounds(NGShape.java:182) at com.sun.javafx.sg.prism.NGNode.updateCachedContentBounds(NGNode.java:604) at com.sun.javafx.sg.prism.NGNode.getContentBounds(NGNode.java:567) at com.sun.javafx.sg.prism.NGNode.getEffectBounds(NGNode.java:554) at com.sun.javafx.sg.prism.NGNode.getClippedBounds(NGNode.java:525) at com.sun.javafx.sg.BaseNode.updateTxBounds(BaseNode.java:106) at com.sun.javafx.sg.prism.NGNode.getCompleteBounds(NGNode.java:487) at com.sun.javafx.sg.GroupBoundsHelper.recomputeBounds(GroupBoundsHelper.java:341) at com.sun.javafx.sg.GroupBoundsHelper.getContentBounds(GroupBoundsHelper.java:82) at com.sun.javafx.sg.prism.NGGroup.computeContentBounds(NGGroup.java:226) at com.sun.javafx.sg.prism.NGNode.updateCachedContentBounds(NGNode.java:604) at com.sun.javafx.sg.prism.NGNode.getContentBounds(NGNode.java:567) at com.sun.javafx.sg.prism.NGNode.getEffectBounds(NGNode.java:554) at com.sun.javafx.sg.prism.NGNode.getClippedBounds(NGNode.java:525) at com.sun.javafx.sg.BaseNode.updateTxBounds(BaseNode.java:106) at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:225) at com.sun.javafx.tk.glass.PrismPen$1.paintImpl(PrismPen.java:154) at com.sun.javafx.tk.glass.PrismPen$1.run(PrismPen.java:245) at com.sun.javafx.tk.glass.RunnableEvent.run(RunnableEvent.java:13) at com.sun.javafx.tk.glass.GlassToolkitImpl.run(GlassToolkitImpl.java:122) at java.lang.Thread.run(Thread.java:729) Prism Render Thread uncaught: java.lang.UnsupportedOperationException java.lang.UnsupportedOperationException: Paint null not supported yet. at com.sun.prism.j2d.J2DPrismGraphics.toJ2DPaint(J2DPrismGraphics.java:190) at com.sun.prism.j2d.J2DPrismGraphics.setPaint(J2DPrismGraphics.java:407) at com.sun.javafx.sg.prism.NGShape.renderContent(NGShape.java:129) at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:271) at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:169) at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:271) at com.sun.javafx.tk.glass.PrismPen$PaintRunnable.paintImpl(PrismPen.java:168) at com.sun.javafx.tk.glass.PrismPen$PaintRunnable.run(PrismPen.java:255) at com.sun.javafx.tk.glass.RunnableEvent.run(RunnableEvent.java:13) at com.sun.javafx.tk.glass.GlassToolkitImpl.run(GlassToolkitImpl.java:122) at java.lang.Thread.run(Thread.java:729) One of the reasons may be render thread running in parallel with user thread.
05-02-2011

Here is the NPE I get when I mousing over any of the thumbnails in Ensemble on Mac: run: [java] Ensemble2.goToPage[SAMPLES] [java] Prism Render Thread uncaught: java.lang.NullPointerException [java] java.lang.NullPointerException [java] at com.sun.javafx.sg.prism.NGNode$EffectFilter.render(NGNode.java:1023) [java] at com.sun.javafx.sg.prism.NGNode.renderEffect(NGNode.java:462) [java] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:269) [java] at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:169) [java] at com.sun.javafx.sg.prism.NodeEffectInput.getImageDataForNode(NodeEffectInput.java:170) [java] at com.sun.javafx.sg.prism.NodeEffectInput.filter(NodeEffectInput.java:86) [java] at com.sun.scenario.effect.FilterEffect.filter(FilterEffect.java:167) [java] at com.sun.scenario.effect.Offset.filter(Offset.java:161) [java] at com.sun.scenario.effect.Merge.filter(Merge.java:147) [java] at com.sun.scenario.effect.DelegateEffect.filter(DelegateEffect.java:68) [java] at com.sun.scenario.effect.impl.prism.PrEffectHelper.render(PrEffectHelper.java:138) [java] at com.sun.javafx.sg.prism.NGNode$EffectFilter.render(NGNode.java:1022) [java] at com.sun.javafx.sg.prism.NGNode.renderEffect(NGNode.java:462) [java] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:269) [java] at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:169) [java] at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:346) [java] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:271) [java] at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:169) [java] at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:346) [java] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:271) [java] at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:169) [java] at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:346) [java] at com.sun.javafx.sg.prism.NGNode.renderRectClip(NGNode.java:322) [java] at com.sun.javafx.sg.prism.NGNode.renderClip(NGNode.java:345) [java] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:263) [java] at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:169) [java] at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:346) [java] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:271) [java] at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:169) [java] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:271) [java] at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:169) [java] at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:346) [java] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:271) [java] at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:169) [java] at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:346) [java] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:271) [java] at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:169) [java] at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:346) [java] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:271) [java] at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:169) [java] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:271) [java] at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:169) [java] at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:346) [java] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:271) [java] at com.sun.javafx.tk.glass.PrismPen$PaintRunnable.paintImpl(PrismPen.java:176) [java] at com.sun.javafx.tk.glass.PrismPen$PaintRunnable.run(PrismPen.java:275) [java] at com.sun.javafx.tk.glass.RunnableEvent.run(RunnableEvent.java:13) [java] at com.sun.javafx.tk.glass.GlassToolkitImpl.run(GlassToolkitImpl.java:122) [java] at java.lang.Thread.run(Thread.java:680) ^Cdhcp-whq-twvpn-1-vpnpool-10-159-221-195:Ensemble cyang$
05-02-2011

This may be responsible for some of the exceptions that have been reported. In particular, Chien gets a consistent exception when mousing over any of the Ensemble example thumbnails on Mac.
05-02-2011