JDK-8113613 : GUIMark2.Vector WebNode test in sw(j2d) mode throws IllegalStateException
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: fx2.0
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2011-05-18
  • Updated: 2015-06-16
  • Resolved: 2011-08-03
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
to run the benchmark with j2d you can use run-vector-bm ant target, just add
            <jvmarg value="-Djavafx.toolkit=prism" />
            <jvmarg value="-Dprism.order=j2d" />
to the target.
Sometimes it throws:
java.lang.IllegalStateException: The view has already been closed
at com.sun.glass.ui.View.checkNotClosed(View.java:138)
at com.sun.glass.ui.View.uploadPixels(View.java:363)
at com.sun.prism.j2d.J2DPresentable$Glass$1.run(J2DPresentable.java:84)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:54)
at java.lang.Thread.run(Unknown Source)

When I run the benchmark locally I've got this exception only twice, but http://aurora-ds.russia.sun.com:9500/runs/3886.FX2-graphics-scrum-42/.workload.log.825  shows that it can be thrown for every iteration,
so it looks like it is a thread race :( in single-threaded app ;)
Comments
Verified with Presidio b42.
25-08-2011

http://jfxsrc.us.oracle.com/javafx/presidio/scrum/graphics/runtime/rev/9d019ce56e39 http://jfxsrc.us.oracle.com/javafx/presidio/scrum/graphics/glass/rev/5bda2787f2cc
03-08-2011

Upgrade priority to Critical to match that of the duplicated issue.
03-08-2011

Webrev: http://beethoven.us.oracle.com/webrev/javafx/rt-13928/ Turns out that calling view.getNativeView() does the same thing that present does: it thrown an IllegalStateException if the view has been closed. So I propose to add an "isClosed()" method to View and then have J2DPresentable use it.
03-08-2011

Or I could read Anthony's comment more carefully and notice that "view.getNativeView() != 0L" is basically the isActive() I was asking for. :)
03-08-2011

I took a quick look at this, by virtue of evaluating RT-13928 which turns out to be a duplicate issue. I don't see an easy way to do this in the J2D pipeline, at least not without additional Glass API. The View has no public API to query whether it has been closed. Without that, there is no clean way to track whether or not the View has been closed. Even the TKScene (ViewScene) doesn't have this information. We would need to wire up notification from the WindowStage --> ViewScene (assuming it isn't already too late by the time WindowStage.close() is called) and then pass ViewScene rather than just the View into the J2DPresentable. This seems like overkill. To avoid having to do this, we either need an "isActive()" or similar method on View (which J2D can check), or glass needs to ignore a call to Present on a view that has been closed.
03-08-2011

The problem is that the com.sun.prism.j2d.J2DPresentable is actually executed when the window has already been closed. I see two ways to resolve the issue: 1. The J2DPresentable runnable might actually check whether the view has been closed (e.g. if (view.getNativeView() != 0L) { view.uploadPixels(); } OR 2. Glass could silently ignore an uploadPixels() request for closed views. I'm re-assigning this issue to Jim for further evaluation. Please return it back to Glass if you think option #2 is preferable.
28-06-2011

The test also fails with b191, see Aurora results here: http://aurora-ds.russia.sun.com:9500/runs/6227.FX2-80/.workload.log.15656
23-06-2011

The latest promoted build is b33. Peter, what do you mean by b34? I just download b33 from http://jfx.sfbay.sun.com/hudson/job/presidio/190/ and the issue was reproduced on second iteration.
23-06-2011

Cannot reproduce (b34). Maybe this has been fixed at Glass side. Added Glass component.
23-06-2011