-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
jfx17
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
Linux 4.18.0-372.16.1.el8_6.x86_64 #1 SMP Wed Jul 13 15:36:40 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
openjdk version "11.0.15" 2022-04-19 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.15+10-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.15+10-LTS, mixed mode, sharing)
javafx 17.0.1
Windows 10 Pro 21H1
openjdk 17.0.1
javafx 17.0.2
A DESCRIPTION OF THE PROBLEM :
The latest comment onJDK-8224260 by K. Rushforth from 2019-06-01 states:
> The "Sample" program fails on FX 8, but passes on FX 11 and later. This is because ProgressIndicator's use of Window::showingProperty() has changed such that it no longer hits this bug.
Apparently there has been a regression: The "Sample" program reproduceably fails at least on FX 17+ (17.0.1, 17.0.2), both on Linux and Windows.
A side note:
JDK-8224260 's title sounds very technical, but can have very real effects: If applications have any logic w.r.t. dialog/sub-stage behavior implemented in change listeners on Stage.showingProperty, this logic will NOT be triggered on the initial showing==true change. (On subsequent showing==true changes, the listener is triggered as expected).
With the apparently regressed ProgressIndicator behavior, this means that the introduction of a ProgressIndicator anywhere in the Scene graph in a stage's contents (e.g. in a widget provided by a third-party library) might suddenly break application behavior because the expected listener call on the first showing==true is never received.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use the Sample and Sample2 code from the original bug report. If desired, I can provide another, similar sample.
CUSTOMER SUBMITTED WORKAROUND :
* As already stated, register another change listener on Stage.showingProperty .
* Use Stage.setOnShowing and Stage.setOnHiding instead - both seem to be triggered correctly.
FREQUENCY : always
Linux 4.18.0-372.16.1.el8_6.x86_64 #1 SMP Wed Jul 13 15:36:40 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
openjdk version "11.0.15" 2022-04-19 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.15+10-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.15+10-LTS, mixed mode, sharing)
javafx 17.0.1
Windows 10 Pro 21H1
openjdk 17.0.1
javafx 17.0.2
A DESCRIPTION OF THE PROBLEM :
The latest comment on
> The "Sample" program fails on FX 8, but passes on FX 11 and later. This is because ProgressIndicator's use of Window::showingProperty() has changed such that it no longer hits this bug.
Apparently there has been a regression: The "Sample" program reproduceably fails at least on FX 17+ (17.0.1, 17.0.2), both on Linux and Windows.
A side note:
With the apparently regressed ProgressIndicator behavior, this means that the introduction of a ProgressIndicator anywhere in the Scene graph in a stage's contents (e.g. in a widget provided by a third-party library) might suddenly break application behavior because the expected listener call on the first showing==true is never received.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use the Sample and Sample2 code from the original bug report. If desired, I can provide another, similar sample.
CUSTOMER SUBMITTED WORKAROUND :
* As already stated, register another change listener on Stage.showingProperty .
* Use Stage.setOnShowing and Stage.setOnHiding instead - both seem to be triggered correctly.
FREQUENCY : always
- duplicates
-
JDK-8224260 ChangeListener not triggered when adding a new listener in invalidated method
-
- Resolved
-
- relates to
-
JDK-8224260 ChangeListener not triggered when adding a new listener in invalidated method
-
- Resolved
-