JDK-8170500 : Interminate ProgressIndicator no longer animates if scene is set on stage before content is added
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-11-30
  • Updated: 2016-12-19
  • Resolved: 2016-12-19
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.
JDK 9
9Fixed
Related Reports
Relates :  
Relates :  
Description
The test program for JDK-8170459 has highlighted a regression in behavior in the animation of indeterminate ProgressIndicator. Steps to reproduce:

1. Run the attached test program
2. BUG: notice that the ProgressIndicator does not animate.

This is a regression from JDK 8u.

If you move the "setScene" call after the ProgressIndicator is added to the scene, it works fine.
Comments
Changeset: 2bae8f04958b Author: ckyang Date: 2016-12-19 15:44 -0800 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/2bae8f04958b
19-12-2016

+1
19-12-2016

This regression is actually caused by the fix for JDK-8151165, an earlier fix solely in ProgressIndicatorSkin.java. The cause is in the short-circuiting segment in rebuildTimeline(). This additional logic seems unnecessary for the fix to JDK-8151165 and possibly wrong as it prevent the construction of the spinner Timeline. I verified that reverting this code segment fixes the problem including the 2 problems reported in JDK-8151165. diff --git a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/ProgressIndicatorSkin.java b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/ProgressIndicatorSkin.java --- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/ProgressIndicatorSkin.java +++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/ProgressIndicatorSkin.java @@ -645,10 +645,6 @@ } private void rebuildTimeline() { - if (!NodeHelper.isTreeShowing(control)) { - return; - } - if (spinEnabled) { if (indeterminateTransition == null) { indeterminateTransition = new Timeline();
14-12-2016

At the point of ProgressIndicatorSkin being instantiated, NodeHelper.treeShowingProperty(control) returns that the control is not tree showing. This puts the animation into a paused state. Also in the ProgressIndicatorSkin is a listener to NodeHelper.treeShowingProperty(control), so that when it becomes true it starts the animation. The issue appears to be that in this case, the treeShowing property never transitions to true.
30-11-2016

This is possibly a regression caused by the fix for JDK-8090322. If so, then it is a scenegraph bug and can be transferred.
30-11-2016