multi line commnets under <fx:style> throws error
compiler throws "java.lang.NullPointerException" error this is because of comments under fx:style
<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/royale/basic"
xmlns:j="library://ns.apache.org/royale/jewel">
<fx:Style>
/*.TitleBar{
border:solid 1px grey;
}*/
/*.DataContainer{
border:solid 1px grey;
}*/
</fx:Style>
I tried replacing HelloWorld.mxml with
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/royale/basic" >
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
</js:valuesImpl>
<js:initialView>
<js:View>
<js:Label text="Hello World!" />
</js:View>
</js:initialView>
<fx:Style>
/*.TitleBar{
border:solid 1px grey;
}*/
/*.DataContainer{
border:solid 1px grey;
}*/
</fx:Style>
</js:Application>
And it is compiling correctly for me. Can you please do the same and report?
I can still see the error. something is wrong while reading the comments inside script tag. Few or the use case are
- I am with "<j:Application>" not "js:"
- it happens only with Main.mxml which uses "<j:>" tag
- it doesn't happens while using such comments inside other mxml component/ file
attaching my screenshot

Yes, I was able to reproduce it too. This is the stack trace
[mxmlc] C:\dev\full_royale_sdk\royale-asjs\examples\royale\HelloWorld\src\main\royale\HelloWorld.mxml Error: Internal error in ABC generator subsystem, when generating code for: C:\dev\full_royale_sdk\royale-asjs\examples\royale\HelloWorld\src\main\royale\HelloWorld.mxml: java.lang.NullPointerException
[mxmlc] at org.antlr.runtime.tree.BaseTreeAdaptor.isNil(BaseTreeAdaptor.java:73)
[mxmlc] at org.antlr.runtime.tree.CommonTreeNodeStream.nextElement(CommonTreeNodeStream.java:104)
[mxmlc] at org.antlr.runtime.misc.LookaheadStream.fill(LookaheadStream.java:113)
[mxmlc] at org.antlr.runtime.misc.LookaheadStream.syncAhead(LookaheadStream.java:107)
[mxmlc] at org.antlr.runtime.misc.LookaheadStream.LT(LookaheadStream.java:129)
[mxmlc] at org.apache.royale.compiler.internal.css.CSSTree.stylesheet(CSSTree.java:204)
[mxmlc] at org.apache.royale.compiler.internal.css.CSSDocument.parse(CSSDocument.java:81)
[mxmlc] at org.apache.royale.compiler.internal.tree.mxml.MXMLStyleNode.getCSSDocument(MXMLStyleNode.java:94)
[mxmlc] at org.apache.royale.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processMXMLStyle(MXMLClassDirectiveProcessor.java:4332)
[mxmlc] at org.apache.royale.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processNode(MXMLClassDirectiveProcessor.java:990)
[mxmlc] at org.apache.royale.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.traverse(MXMLClassDirectiveProcessor.java:864)
[mxmlc] at org.apache.royale.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.traverse(MXMLClassDirectiveProcessor.java:834)
[mxmlc] at org.apache.royale.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processMainClassDefinitionNode(MXMLClassDirectiveProcessor.java:656)
[mxmlc] at org.apache.royale.compiler.internal.as.codegen.GlobalDirectiveProcessor.declareMXMLDocument(GlobalDirectiveProcessor.java:551)
[mxmlc] at org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProcessor.java:236)
[mxmlc] at org.apache.royale.compiler.internal.as.codegen.DirectiveProcessor.traverse(DirectiveProcessor.java:192)
[mxmlc] at org.apache.royale.compiler.internal.as.codegen.ABCGenerator.generate(ABCGenerator.java:126)
[mxmlc] at org.apache.royale.compiler.internal.units.MXMLCompilationUnit.handleABCBytesRequest(MXMLCompilationUnit.java:202)
[mxmlc] at org.apache.royale.compiler.internal.units.CompilationUnitBase.processABCBytesRequest(CompilationUnitBase.java:876)
[mxmlc] at org.apache.royale.compiler.internal.units.CompilationUnitBase.access$300(CompilationUnitBase.java:109)2.078204 seconds
[mxmlc]
[mxmlc] at org.apache.royale.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase.java:313)
[mxmlc] at org.apache.royale.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase.java:309)
[mxmlc] at org.apache.royale.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:228)
[mxmlc] at org.apache.royale.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:222)
[mxmlc] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[mxmlc] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[mxmlc] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[mxmlc] at java.lang.Thread.run(Thread.java:748)
[mxmlc]
[mxmlc]
[mxmlc]
[mxmlc] Error: Unexpected exception 'java.lang.NullPointerException' at org.antlr.runtime.tree.BaseTreeAdaptor.isNil:73
[mxmlc]
I think this guy had a similar issue, but I am not sure how to implement his solution in our case.
Closed in apache/royale-compiler@79276bf122b05d1553eaa0616fdb6936da39d272