flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Tynjala (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLEX-35323) NullPointerException when setting property of <fx:Object/> with binding
Date Wed, 07 Jun 2017 16:38:19 GMT

     [ https://issues.apache.org/jira/browse/FLEX-35323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Josh Tynjala resolved FLEX-35323.
---------------------------------
       Resolution: Fixed
         Assignee: Josh Tynjala
    Fix Version/s: Apache FalconJX 0.8.0

Fixed in commit 57a56977f5f75fb8c41144cf035d78eadd9a75d0

> NullPointerException when setting property of <fx:Object/> with binding
> -----------------------------------------------------------------------
>
>                 Key: FLEX-35323
>                 URL: https://issues.apache.org/jira/browse/FLEX-35323
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Falcon
>    Affects Versions: Apache FalconJX 0.7.0, Apache FalconJX 0.8.0
>            Reporter: Josh Tynjala
>            Assignee: Josh Tynjala
>             Fix For: Apache FalconJX 0.8.0
>
>
> Using the following code:
> {code:title=src/InternalError.mxml}
> <?xml version="1.0" encoding="utf-8"?>
> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> 	xmlns:js="library://ns.apache.org/flexjs/basic"
> 	xmlns:local="*">
> 	<fx:Declarations>
> 		<fx:Object test="{MY_CONST}"/>
> 	</fx:Declarations>
> 	<js:initialView>
> 		<js:View>
> 			<js:Label id="label" text="Hello World" x="100" y="100"/>
> 		</js:View>
> 	</js:initialView>
> 	<js:valuesImpl>
> 		<js:SimpleCSSValuesImpl />
> 	</js:valuesImpl>
> 	<fx:Script><![CDATA[
> 		public static const MY_CONST:String = "hello";
> 	]]></fx:Script>
> </js:Application>
> {code}
> Compile with js/bin/mxmlc:
> {code}
> mxmlc src/InternalError.mxml
> {code}
> The following error will be included in the output:
> {code}
> InternalError.mxml Error: Internal error in ABC generator subsystem, when generating
code for: /Users/joshtynjala/Development/NextGenAS/examples/HelloFlexJS/src/HelloFlexJS.mxml:
java.lang.NullPointerException
> 	at org.apache.flex.compiler.internal.as.codegen.LexicalScope.getNameFromDefinition(LexicalScope.java:1178)
> 	at org.apache.flex.compiler.internal.as.codegen.LexicalScope.getBinding(LexicalScope.java:1069)
> 	at org.apache.flex.compiler.internal.codegen.databinding.BindingDestinationMaker.makeDestinationFunctionInstructionList(BindingDestinationMaker.java:131)
> 	at org.apache.flex.compiler.internal.codegen.databinding.BindingInfo.<init>(BindingInfo.java:114)
> 	at org.apache.flex.compiler.internal.codegen.databinding.BindingAnalyzer.analyze(BindingAnalyzer.java:56)
> 	at org.apache.flex.compiler.internal.codegen.databinding.BindingDatabase.analyze(BindingDatabase.java:122)
> 	at org.apache.flex.compiler.internal.codegen.databinding.MXMLBindingDirectiveHelper.visitNode(MXMLBindingDirectiveHelper.java:116)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processMXMLDataBinding(MXMLClassDirectiveProcessor.java:4803)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processMXMLPropertySpecifier(MXMLClassDirectiveProcessor.java:3702)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processNode(MXMLClassDirectiveProcessor.java:962)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.traverse(MXMLClassDirectiveProcessor.java:861)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.traverse(MXMLClassDirectiveProcessor.java:831)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processMXMLObject(MXMLClassDirectiveProcessor.java:3014)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processNode(MXMLClassDirectiveProcessor.java:919)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.traverse(MXMLClassDirectiveProcessor.java:861)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.traverse(MXMLClassDirectiveProcessor.java:831)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processMXMLDeclarations(MXMLClassDirectiveProcessor.java:4132)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processNode(MXMLClassDirectiveProcessor.java:977)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.traverse(MXMLClassDirectiveProcessor.java:861)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.traverse(MXMLClassDirectiveProcessor.java:831)
> 	at org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor.processMainClassDefinitionNode(MXMLClassDirectiveProcessor.java:653)
> 	at org.apache.flex.compiler.internal.as.codegen.GlobalDirectiveProcessor.declareMXMLDocument(GlobalDirectiveProcessor.java:518)
> 	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:199)
> 	at org.apache.flex.compiler.internal.units.CompilationUnitBase.processABCBytesRequest(CompilationUnitBase.java:876)
> 	at org.apache.flex.compiler.internal.units.CompilationUnitBase.access$300(CompilationUnitBase.java:109)
> 	at org.apache.flex.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase.java:313)
> 	at org.apache.flex.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase.java:309)
> 	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)
> {code}
> Can reproduce with both FlexJS 0.7.0 and the latest 0.8.0 release branch nightly.
> Simply setting the property without binding does not produce a NullPointerException.
> Instead of using <fx:Object/>, if you switch to the following code, there is no
NullPointerException:
> {code}
> <js:Label text="{MY_CONST}"/>
> {code}
> With that in mind, it may have something to do with the fact that the Object class is
dynamic.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message