Josh Tynjala created FLEX-35226:
-----------------------------------

             Summary: [Falcon] Compiler crashes with stack trace if MXML file 
is empty
                 Key: FLEX-35226
                 URL: https://issues.apache.org/jira/browse/FLEX-35226
             Project: Apache Flex
          Issue Type: Bug
          Components: Falcon
    Affects Versions: Apache FlexJS 0.7.0
            Reporter: Josh Tynjala
            Assignee: Josh Tynjala


<flexjs>/js/bin/mxmlc src/Main.mxml 
Using Falcon codebase: 
/Users/joshtynjala/Development/Flex/sdks/flexjs-nightly/js/bin/../..
Using Flex SDK: 
/Users/joshtynjala/Development/Flex/sdks/flexjs-nightly/js/bin/../..
/Users/joshtynjala/Desktop/TestFlexJS/src/Main.mxml Internal error in syntax 
tree request subsystem, when generating code for: 
/Users/joshtynjala/Desktop/TestFlexJS/src/Main.mxml: 
java.lang.ArrayIndexOutOfBoundsException: 0
        at 
org.apache.flex.compiler.internal.units.MXMLCompilationUnit.handleSyntaxTreeRequest(MXMLCompilationUnit.java:89)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase.processSyntaxTreeRequest(CompilationUnitBase.java:836)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase.access$100(CompilationUnitBase.java:108)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase$2$1.call(CompilationUnitBase.java:260)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase$2$1.call(CompilationUnitBase.java:256)
        at 
org.apache.flex.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:228)
        at 
org.apache.flex.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:222)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)



/Users/joshtynjala/Desktop/TestFlexJS/src/Main.mxml Internal error in file 
scope builder subsystem, when generating code for: 
/Users/joshtynjala/Desktop/TestFlexJS/src/Main.mxml: 
java.lang.NullPointerException
        at 
org.apache.flex.compiler.internal.units.requests.ASFileScopeRequestResult.checkExternallyVisibleDefinitions(ASFileScopeRequestResult.java:101)
        at 
org.apache.flex.compiler.internal.units.requests.ASFileScopeRequestResult.checkExternallyVisibleDefinitions(ASFileScopeRequestResult.java:121)
        at 
org.apache.flex.compiler.internal.units.requests.ASFileScopeRequestResult.<init>(ASFileScopeRequestResult.java:58)
        at 
org.apache.flex.compiler.internal.units.MXMLCompilationUnit.handleFileScopeRequest(MXMLCompilationUnit.java:180)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase.processFileScopeRequest(CompilationUnitBase.java:861)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase.access$200(CompilationUnitBase.java:108)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase$3$1.call(CompilationUnitBase.java:285)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase$3$1.call(CompilationUnitBase.java:281)
        at 
org.apache.flex.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:228)
        at 
org.apache.flex.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:222)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)



/Users/joshtynjala/Desktop/TestFlexJS/src/Main.mxml Internal error in outgoing 
dependency subsystem, when generating code for: 
/Users/joshtynjala/Desktop/TestFlexJS/src/Main.mxml: 
java.lang.NullPointerException
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase.startParsingImports(CompilationUnitBase.java:907)
        at 
org.apache.flex.compiler.internal.units.MXMLCompilationUnit.handleOutgoingDependenciesRequest(MXMLCompilationUnit.java:240)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase.processOutgoingDependenciesRequest(CompilationUnitBase.java:889)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase.access$500(CompilationUnitBase.java:108)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase.java:385)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase.java:381)
        at 
org.apache.flex.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:228)
        at 
org.apache.flex.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:222)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)



/Users/joshtynjala/Desktop/TestFlexJS/src/Main.mxml Internal error in ABC 
generator subsystem, when generating code for: 
/Users/joshtynjala/Desktop/TestFlexJS/src/Main.mxml: 
java.lang.NullPointerException
        at 
org.apache.flex.compiler.internal.units.EmbedCompilationUnitFactory.collectEmbedDatas(EmbedCompilationUnitFactory.java:132)
        at 
org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generate(ABCGenerator.java:180)
        at 
org.apache.flex.compiler.internal.units.MXMLCompilationUnit.handleABCBytesRequest(MXMLCompilationUnit.java:199)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase.processABCBytesRequest(CompilationUnitBase.java:873)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase.access$300(CompilationUnitBase.java:108)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase.java:310)
        at 
org.apache.flex.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase.java:306)
        at 
org.apache.flex.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:228)
        at 
org.apache.flex.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:222)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

In the currently nightly, an empty ActionScript file will creates a proper 
problem instead, and it should be the same with MXML:

<flexjs>/js/bin/asjsc src/Main.as 
Using Falcon codebase: 
/Users/joshtynjala/Development/Flex/sdks/flexjs-nightly/js/bin/../..
Using Flex SDK: 
/Users/joshtynjala/Development/Flex/sdks/flexjs-nightly/js/bin/../..
/Users/joshtynjala/Desktop/TestFlexJS/src/Main.as No externally-visible 
definition with the name 'Main' was found.


/Users/joshtynjala/Desktop/TestFlexJS/src/Main.as No externally-visible 
definition with the name 'Main' was found.

It appears that an ActionScript file has a similar stack trace if compiled with 
FlexJS 0.7.0, so something has been fixed on the ActionScript side in the 
nightlies.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to