Menu

#61 Exception: Null or negative value for CSS time

closed
nobody
None
1
2015-02-11
2014-11-14
mercury
No

While trying out a large CSS file I saw this exception:

Caused by: java.lang.IllegalArgumentException: Null or negative value for CSS time
    at cz.vutbr.web.csskit.TermTimeImpl.setValue(TermTimeImpl.java:14)
    at cz.vutbr.web.csskit.TermTimeImpl.setValue(TermTimeImpl.java:5)
    at cz.vutbr.web.csskit.TermFactoryImpl.createDimension(TermFactoryImpl.java:174)
    at cz.vutbr.web.csskit.antlr.CSSTreeParser.valuepart(CSSTreeParser.java:2322)
    at cz.vutbr.web.csskit.antlr.CSSTreeParser.term(CSSTreeParser.java:1985)
    at cz.vutbr.web.csskit.antlr.CSSTreeParser.terms(CSSTreeParser.java:1887)
    at cz.vutbr.web.csskit.antlr.CSSTreeParser.declaration(CSSTreeParser.java:1717)
    at cz.vutbr.web.csskit.antlr.CSSTreeParser.declarations(CSSTreeParser.java:1593)
    at cz.vutbr.web.csskit.antlr.CSSTreeParser.ruleset(CSSTreeParser.java:1528)
    at cz.vutbr.web.csskit.antlr.CSSTreeParser.statement(CSSTreeParser.java:565)
    at cz.vutbr.web.csskit.antlr.CSSTreeParser.stylesheet(CSSTreeParser.java:475)
    at cz.vutbr.web.csskit.antlr.CSSParserFactory$SourceType$2.parse(CSSParserFactory.java:99)

I didn't boil it down to a small test-case yet, but I guess the exception stack trace might be sufficient for you.

thanks!

Discussion

  • Radek Burget

    Radek Burget - 2014-11-14

    Hopefully fixed by this commit. I don't have the input data for testing so you should do the tests by yourself.

     
  • mercury

    mercury - 2014-11-15

    Thanks for the changes. I boiled down the input to this rule:

    div { transition:0.2s -0.05s transform ease-in-out; }
    

    I haven't checked yet if your commit works.

     
  • Radek Burget

    Radek Burget - 2014-11-15

    I am afraid that the transition property itself is not supported yet. It should be transformed to the transition-* properties but a support needs to be added to cz.vutbr.web.domassign.SupportedCSS3 and DeclarationTransformer

     
  • mercury

    mercury - 2014-11-15

    Fix verified: the exception is not thrown with your commit!

    The support for transition property was not critical for me. The exception was more critical because the rest of the stylesheet was not getting processed.

    You may close this bug as far as the exception is concerned. Thanks!

     
  • Radek Burget

    Radek Burget - 2014-11-15
    • status: open --> accepted
     
  • Radek Burget

    Radek Burget - 2015-02-11

    Closed in 1.20.

     
  • Radek Burget

    Radek Burget - 2015-02-11
    • status: accepted --> closed
     

Anonymous
Anonymous

Add attachments
Cancel