Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8127953

CSS effect syntax containing blank breaks FX Thread

      This issue has been found by a SB customer that added a blank char to the effect syntax. This has the bad side effect to make FX Thread to deal with an untapped Exception when CSS is applied (class cast exception String, expected Effect)

      I attached a simple test case, the faulty syntax is: -fx-effect: dropshadow ( one-pass-box , black , 8 , 0.0 , 5 , 10 );

      Until now, we have worked at making CSS error non fatal in order to preserve SB. This exception path has been missed.

          [JDK-8127953] CSS effect syntax containing blank breaks FX Thread

          Ok, so close against b14.

          Alexander Kirov (Inactive) added a comment - Ok, so close against b14.

          David Grieve added a comment -
          Yes, it is normal that the app should continue to work after a parsing error or an exception from parsing.

          David Grieve added a comment - Yes, it is normal that the app should continue to work after a parsing error or an exception from parsing.

          Is that normal, that there is an exception, but application continues working?

          java.lang.IllegalArgumentException: Parsed value is not an Effect
          at com.sun.javafx.css.converters.EffectConverter.convert(EffectConverter.java:59)
          at com.sun.javafx.css.converters.EffectConverter.convert(EffectConverter.java:41)
          at com.sun.javafx.css.StyleHelper.calculateValue(StyleHelper.java:1272)
          at com.sun.javafx.css.StyleHelper.lookup(StyleHelper.java:951)
          at com.sun.javafx.css.StyleHelper.transitionToState(StyleHelper.java:706)
          at javafx.scene.Node.impl_processCSS(Node.java:7342)
          at javafx.scene.Parent.impl_processCSS(Parent.java:1146)
          at javafx.scene.control.Control.impl_processCSS(Control.java:1102)
          at javafx.scene.Node.processCSS(Node.java:7310)
          at javafx.scene.Node.processCSS(Node.java:7304)
          at javafx.scene.Scene.doCSSPass(Scene.java:444)
          at javafx.scene.Scene.access$3800(Scene.java:169)
          at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2163)
          at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:363)
          at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
          at com.sun.javafx.tk.quantum.QuantumToolkit$9.run(QuantumToolkit.java:329)
          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:62)
          at java.lang.Thread.run(Thread.java:662)

          Alexander Kirov (Inactive) added a comment - Is that normal, that there is an exception, but application continues working? java.lang.IllegalArgumentException: Parsed value is not an Effect at com.sun.javafx.css.converters.EffectConverter.convert(EffectConverter.java:59) at com.sun.javafx.css.converters.EffectConverter.convert(EffectConverter.java:41) at com.sun.javafx.css.StyleHelper.calculateValue(StyleHelper.java:1272) at com.sun.javafx.css.StyleHelper.lookup(StyleHelper.java:951) at com.sun.javafx.css.StyleHelper.transitionToState(StyleHelper.java:706) at javafx.scene.Node.impl_processCSS(Node.java:7342) at javafx.scene.Parent.impl_processCSS(Parent.java:1146) at javafx.scene.control.Control.impl_processCSS(Control.java:1102) at javafx.scene.Node.processCSS(Node.java:7310) at javafx.scene.Node.processCSS(Node.java:7304) at javafx.scene.Scene.doCSSPass(Scene.java:444) at javafx.scene.Scene.access$3800(Scene.java:169) at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2163) at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:363) at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460) at com.sun.javafx.tk.quantum.QuantumToolkit$9.run(QuantumToolkit.java:329) 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:62) at java.lang.Thread.run(Thread.java:662)

          David Grieve added a comment -

          David Grieve added a comment -   http://jfxsrc.us.oracle.com/javafx/2.2/scrum/controls/rt/rev/fa6dd67f61a5

            dgrieve David Grieve
            jfdenise Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: