5 Replies Latest reply on Nov 21, 2012 9:28 AM by DhaouFlex

    Can't build anymore! Uncaught exception in compiler (NullPointerException)

    Freydaklin Level 1

      Hello,

       

      I've been working on a pretty big project since some months now, and everything went fine until my Flash Builder 4.0.1 suddenly stopped building popping this compiler error:

       

      An internal build error has occurred. Right-click for more information. [Project name] Unknown Flex Problem

       

      I checked the error log, and found out an uncaught NullPointerException is causing this issue.

      Now, while writing code, I press CTRL+S every few seconds (my Flash Builder sometimes stops responding, that's why), and the issue popped together with many other errors.

      I was expecting errors, because I changed class member types. As a result a lot of code using the class raised errors, so I started fixing that, until somewhat everything was fixed.

      I then figured out this strange error and checked the logs.

       

      My code does not contain empty switch statements (I read somewhere that can cause the NullPointerException too), and looking at the last called functions, it seems the compiler tries to "get" a nonexistent/emtpy (null) variable, and crashes on/near a hashing function.

       

      I tried refreshing the project, comenting out parts of the code I recently worked on, restarting Flash Builder, cleaning + rebuilding the project, and downloading an update that made FB go from 4.0.0 to 4.0.1. Nothing helped.

       

      This project is really important and I can't afford doing it all over in HTML (if that is even possible)!

      I'd really appreciate any suggestions, ideas, tips, etc...

       

       

      Below is the full error, a fragment of the error log:

       

      !ENTRY com.adobe.flexbuilder.project 4 43 2010-09-21 16:27:15.339
      !MESSAGE Uncaught exception in compiler
      !STACK 0
      java.lang.NullPointerException
           at flex2.compiler.util.QName.hashCode(QName.java:122)
           at java.util.HashMap.get(Unknown Source)
           at flex2.compiler.util.QNameMap.get(QNameMap.java:48)
           at flex2.compiler.as3.reflect.As3Class.getVariable(As3Class.java:195)
           at flex2.compiler.as3.binding.DataBindingFirstPassEvaluator.findEvents(DataBindingFirstPassEvaluator.java:769)
           at flex2.compiler.as3.binding.DataBindingFirstPassEvaluator.watchExpression(DataBindingFirstPassEvaluator.java:1244)
           at flex2.compiler.as3.binding.DataBindingFirstPassEvaluator.evaluate(DataBindingFirstPassEvaluator.java:728)
           at macromedia.asc.parser.QualifiedIdentifierNode.evaluate(QualifiedIdentifierNode.java:48)
           at flex2.compiler.as3.binding.DataBindingFirstPassEvaluator.evaluate(DataBindingFirstPassEvaluator.java:542)
           at macromedia.asc.parser.GetExpressionNode.evaluate(GetExpressionNode.java:55)
           at flex2.compiler.as3.binding.DataBindingFirstPassEvaluator.evaluate(DataBindingFirstPassEvaluator.java:695)
           at macromedia.asc.parser.MemberExpressionNode.evaluate(MemberExpressionNode.java:57)
           at flash.swf.tools.as3.EvaluatorAdapter.evaluate(EvaluatorAdapter.java:327)
           at macromedia.asc.parser.ListNode.evaluate(ListNode.java:44)
           at flash.swf.tools.as3.EvaluatorAdapter.evaluate(EvaluatorAdapter.java:327)
           at macromedia.asc.parser.ListNode.evaluate(ListNode.java:44)
           at flex2.compiler.as3.binding.DataBindingFirstPassEvaluator.evaluate(DataBindingFirstPassEvaluator.java:481)
           at macromedia.asc.parser.FunctionCommonNode.evaluate(FunctionCommonNode.java:106)
           at flex2.compiler.as3.binding.DataBindingFirstPassEvaluator.evaluate(DataBindingFirstPassEvaluator.java:356)
           at macromedia.asc.parser.ClassDefinitionNode.evaluate(ClassDefinitionNode.java:106)
           at flash.swf.tools.as3.EvaluatorAdapter.evaluate(EvaluatorAdapter.java:349)
           at macromedia.asc.parser.StatementListNode.evaluate(StatementListNode.java:60)
           at flash.swf.tools.as3.EvaluatorAdapter.evaluate(EvaluatorAdapter.java:934)
           at macromedia.asc.parser.ProgramNode.evaluate(ProgramNode.java:80)
           at flex2.compiler.as3.binding.DataBindingExtension.generate(DataBindingExtension.java:133)
           at flex2.compiler.as3.As3Compiler.generate(As3Compiler.java:815)
           at flex2.compiler.mxml.ImplementationCompiler.generate(ImplementationCompiler.java:380)
           at flex2.compiler.mxml.MxmlCompiler.generate(MxmlCompiler.java:276)
           at flex2.compiler.CompilerAPI.generate(CompilerAPI.java:4063)
           at flex2.compiler.CompilerAPI.generate(CompilerAPI.java:4026)
           at flex2.compiler.CompilerAPI.batch2(CompilerAPI.java:541)
           at flex2.compiler.CompilerAPI.batch(CompilerAPI.java:1274)
           at flex2.compiler.CompilerAPI.compile(CompilerAPI.java:1496)
           at flex2.tools.oem.Application.compile(Application.java:1188)
           at flex2.tools.oem.Application.recompile(Application.java:1133)
           at flex2.tools.oem.Application.compile(Application.java:819)
           at flex2.tools.flexbuilder.BuilderApplication.compile(BuilderApplication.java:344)
           at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder$MyBuilder.mybuild(ASApplicationBuilder.java:276)
           at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder.build(ASApplicationBuilder.java:127)
           at com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.build(ASBuilder.java:190)
           at com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.build(ASItemBuilder.java:74)
           at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildItem(FlexProjectBuilder.java:480)
           at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.build(FlexProjectBuilder.java:306)
           at com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.build(FlexIncrementalBuilder.java:157)
           at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
           at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
           at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
           at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
           at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
           at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
           at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
           at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
           at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
           at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
           at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
           at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)