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

Binary css causes app built with jdk7 to not run under jdk8b92 and not load css under java7u21

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 8
    • 7u15, 8
    • javafx
    • java8 b92, osx 10.8, macbook air 2012

      Reported by John Smith (john_smith@symantec.com)

      I have a jar which was built with the jdk7 packaging tools with the csstobin option set to true. The packager placed a .bss binary css file in the resultant package and no .css file. When I attempt to run the jar on Java8b92 the application encounters a NullPointerException and is unable to start.

      The binary package for the app may be downloaded from:
      http://code.google.com/p/willow-browser/downloads/detail?name=Willow-0.1-prerelease.jar

      The css used in the app is:
      http://code.google.com/p/willow-browser/source/browse/src/main/resources/org/jewelsea/willow/willow.css

      Stack Trace attached . . . apologies for the length.

      Johns-MacBook-Air:Downloads lilyshard$ java -jar Willow-0.1-prerelease.jar
      Exception in Application start method
      java.lang.NullPointerException
      at com.sun.javafx.css.ParsedValueImpl.readBinary(ParsedValueImpl.java:650)
      at com.sun.javafx.css.Declaration.readBinary(Declaration.java:185)
      at com.sun.javafx.css.Rule.readBinary(Rule.java:207)
      at com.sun.javafx.css.Stylesheet.readBinary(Stylesheet.java:198)
      at com.sun.javafx.css.Stylesheet.loadBinary(Stylesheet.java:228)
      at com.sun.javafx.css.StyleManager.loadStylesheetUnPrivileged(StyleManager.java:886)
      at com.sun.javafx.css.StyleManager.loadStylesheet(StyleManager.java:720)
      at com.sun.javafx.css.StyleManager.gatherSceneStylesheets(StyleManager.java:1268)
      at com.sun.javafx.css.StyleManager.findMatchingStyles(StyleManager.java:1317)
      at javafx.scene.CssStyleHelper.createStyleHelper(CssStyleHelper.java:118)
      at javafx.scene.Node.impl_processCSS(Node.java:8587)
      at javafx.scene.Parent.impl_processCSS(Parent.java:1179)
      at javafx.scene.Node.processCSS(Node.java:8515)
      at javafx.scene.Scene.doCSSPass(Scene.java:540)
      at javafx.scene.Scene.access$3600(Scene.java:188)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2385)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:358)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:601)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:581)
      at com.sun.javafx.tk.quantum.QuantumToolkit$17.run(QuantumToolkit.java:446)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:351)
      at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:304)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:778)
      Caused by: java.lang.RuntimeException: Exception in Application start method
      at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:867)
      at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56)
      at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: java.lang.NullPointerException
      at com.sun.javafx.css.ParsedValueImpl.readBinary(ParsedValueImpl.java:650)
      at com.sun.javafx.css.Declaration.readBinary(Declaration.java:185)
      at com.sun.javafx.css.Rule.readBinary(Rule.java:207)
      at com.sun.javafx.css.Stylesheet.readBinary(Stylesheet.java:198)
      at com.sun.javafx.css.Stylesheet.loadBinary(Stylesheet.java:228)
      at com.sun.javafx.css.StyleManager.loadStylesheetUnPrivileged(StyleManager.java:886)
      at com.sun.javafx.css.StyleManager.loadStylesheet(StyleManager.java:720)
      at com.sun.javafx.css.StyleManager.gatherSceneStylesheets(StyleManager.java:1268)
      at com.sun.javafx.css.StyleManager.findMatchingStyles(StyleManager.java:1317)
      at javafx.scene.CssStyleHelper.createStyleHelper(CssStyleHelper.java:118)
      at javafx.scene.Node.impl_processCSS(Node.java:8587)
      at javafx.scene.Parent.impl_processCSS(Parent.java:1179)
      at javafx.scene.Node.processCSS(Node.java:8515)
      at javafx.scene.Scene.doCSSPass(Scene.java:540)
      at javafx.scene.Scene.preferredSize(Scene.java:1578)
      at javafx.scene.Scene.impl_preferredSize(Scene.java:1645)
      at javafx.stage.Window$9.invalidated(Window.java:729)
      at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:107)
      at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:141)
      at javafx.stage.Window.setShowing(Window.java:795)
      at javafx.stage.Window.show(Window.java:810)
      at javafx.stage.Stage.show(Stage.java:242)
      at org.jewelsea.willow.Willow.start(Willow.java:84)
      at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:810)
      at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:260)
      at com.sun.javafx.application.PlatformImpl$5$1.run(PlatformImpl.java:226)
      at com.sun.javafx.application.PlatformImpl$5$1.run(PlatformImpl.java:223)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:223)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
      Exception running application org.jewelsea.willow.Willow
      Johns-MacBook-Air:Downloads lilyshard$




      ---------


      Johns-MacBook-Air:Downloads lilyshard$ java -Dbinary.css=false -jar Willow-0.1-prerelease.jar
      Jun 08, 2013 2:40:19 AM com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged
      WARNING: Resource "org/jewelsea/willow/willow.css" not found.
      Johns-MacBook-Air:Downloads lilyshard$


      -----------

      Johns-MacBook-Air:Downloads lilyshard$ java -version
      java version "1.8.0-ea"
      Java(TM) SE Runtime Environment (build 1.8.0-ea-b92)
      Java HotSpot(TM) 64-Bit Server VM (build 25.0-b34, mixed mode)
      Johns-MacBook-Air:Downloads lilyshard$


      -----------


      Note that although the app used to work fine with jdk7, it also no longer works correctly with jdk7u21, but the behaviour is different from jdk8b92. With jdk7 the app still runs (with no css loaded) and outputs the message "Cannot add stylesheet. 256"

      This particular 256 error seems related to the 512 error mentioned in mailing list threads.
      http://markmail.org/message/l4hmpppo2dy2t54g#query:+page:1+mid:sz4o2xj5bhhovpn6+state:results

      Johns-MacBook-Air:Downloads lilyshard$ java -jar Willow-0.1-prerelease.jar
      Cannot add stylesheet. 256
      CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces.
      Johns-MacBook-Air:Downloads lilyshard$

      (I think the CoreAnimation warning is unrelated to the css errors).


            dgrieve David Grieve
            dgrieve David Grieve
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: