Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-33268

Falcon Compile Error: NPE when not existing namespace is used in <fx:Style> element.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Apache Falcon 1.0
    • Apache Falcon 1.0
    • Falcon

    Description

      Code Example to reproduce error:

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx">

      <fx:Style>
      @namespace s "library://ns.adobe.com/flex/spark/";

      s|Label

      { color:red; }

      </fx:Style>

      <s:Label text="asdf " />
      </s:Application>

      Exception:
      C:\dev\apache-flex\falcon\compiler.tests\functional-tests\f\mxml\StyleNPE_2Test.mxml
      Error: Internal error in ABC generator subsystem, when generating code for: C:\dev\apache-flex\falcon\compiler.tests\functional-tests\f\mxml\StyleNPE_2Test.mxml: java.lang.NullPointerException
      at org.apache.flex.abc.instructionlist.InstructionList.addAll(InstructionList.java:420)
      at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processMXMLStyle(MXMLClassDirectiveProcessor.java:3194)
      at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processNode(MXMLClassDirectiveProcessor.java:771)
      at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.traverse(MXMLClassDirectiveProcessor.java:649)
      at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.traverse(MXMLClassDirectiveProcessor.java:619)
      at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processMainClassDefinitionNode(MXMLClassDirectiveProcessor.java:515)
      at org.apache.flex.compiler.internal.as.codegen.GlobalDirectiveProcessor.declareMXMLDocument(GlobalDirectiveProcessor.java:510)
      at org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProcessor.java:232)
      at org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.traverse(DirectiveProcessor.java:188)
      at org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generate(ABCGenerator.java:122)
      at org.apache.flex.compiler.internal.units.MXMLCompilationUnit.handleABCBytesRequest(MXMLCompilationUnit.java:198)
      at org.apache.flex.compiler.internal.units.CompilationUnitBase.processABCBytesRequest(CompilationUnitBase.java:866)
      at org.apache.flex.compiler.internal.units.CompilationUnitBase.access$3(CompilationUnitBase.java:864)
      at org.apache.flex.compiler.internal.units.CompilationUnitBase$3$1.call(CompilationUnitBase.java:309)
      at org.apache.flex.compiler.internal.units.CompilationUnitBase$3$1.call(CompilationUnitBase.java:1)
      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:1)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      Output with -ea assertion
      C:\dev\apache-flex\falcon\compiler.tests\functional-tests\f\mxml\StyleNPE_2Test.mxml
      Error: Internal error in ABC generator subsystem, when generating code for: C:\dev\apache-flex\falcon\compiler.tests\functional-tests\f\mxml\StyleNPE_2Test.mxml: java.lang.AssertionError: Unable to resolve type selector: s|Label
      at org.apache.flex.compiler.internal.css.codegen.CSSReducer.getSelecterLiteralForABC(CSSReducer.java:552)
      at org.apache.flex.compiler.internal.css.codegen.CSSReducer.reduceSelector(CSSReducer.java:499)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.action_12(CSSEmitter.java:196)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.dispatchAction(CSSEmitter.java:270)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduceAntecedent(CSSEmitter.java:1146)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduce(CSSEmitter.java:1124)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduceSubgoals(CSSEmitter.java:1171)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduceAntecedent(CSSEmitter.java:1145)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduce(CSSEmitter.java:1124)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduceSubgoals(CSSEmitter.java:1162)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduceAntecedent(CSSEmitter.java:1145)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduce(CSSEmitter.java:1124)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduceSubgoals(CSSEmitter.java:1171)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduceAntecedent(CSSEmitter.java:1145)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduce(CSSEmitter.java:1124)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduceSubgoals(CSSEmitter.java:1162)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduceAntecedent(CSSEmitter.java:1145)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.reduce(CSSEmitter.java:1124)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.burm(CSSEmitter.java:1205)
      at org.apache.flex.compiler.internal.css.codegen.CSSEmitter.burm(CSSEmitter.java:1197)
      at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processMXMLStyle(MXMLClassDirectiveProcessor.java:3185)
      at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processNode(MXMLClassDirectiveProcessor.java:771)
      at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.traverse(MXMLClassDirectiveProcessor.java:649)
      at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.traverse(MXMLClassDirectiveProcessor.java:619)
      at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processMainClassDefinitionNode(MXMLClassDirectiveProcessor.java:515)
      at org.apache.flex.compiler.internal.as.codegen.GlobalDirectiveProcessor.declareMXMLDocument(GlobalDirectiveProcessor.java:510)
      at org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProcessor.java:232)
      at org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.traverse(DirectiveProcessor.java:188)
      at org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generate(ABCGenerator.java:122)
      at org.apache.flex.compiler.internal.units.MXMLCompilationUnit.handleABCBytesRequest(MXMLCompilationUnit.java:198)
      at org.apache.flex.compiler.internal.units.CompilationUnitBase.processABCBytesRequest(CompilationUnitBase.java:866)
      at org.apache.flex.compiler.internal.units.CompilationUnitBase.access$3(CompilationUnitBase.java:864)
      at org.apache.flex.compiler.internal.units.CompilationUnitBase$3$1.call(CompilationUnitBase.java:309)
      at org.apache.flex.compiler.internal.units.CompilationUnitBase$3$1.call(CompilationUnitBase.java:1)
      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:1)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      Attachments

        1. FCL-33268.patch
          4 kB
          Cyrill Zadra

        Activity

          People

            Unassigned Unassigned
            cyrill Cyrill Zadra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: