I just logged my first bug against Flex:
http://bugs.adobe.com/jira/browse/FB-18017
I’m not sure if it’s actually a problem with the compiler or with FlexBuilder. My guess is that a compiler bug is not properly handled by the UI — which makes it hard for me to track down, since the UI problem may be masking the underlying issue.
No doubt, the root cause is some bad coding on my part. But bad code shouldn’t be able to break the compiler, and a compiler failure shouldn’t be able to break the UI. To be more specific, it doesn’t break the UI, but it seems that there’s no way to correct the error, recompile and continue. Once it breaks, I need to restart FlexBuilder to be able to recompile. But if the code that triggers the compiler bug isn’t fixed, it’ll come back up on restart. Not very useful for debugging. I suppose I should know what I did wrong and just fix it, but if developers knew everything you wouldn’t need compilers.
Anyway, I’d probably scrap Flex right about now, and mutter something about half-baked betas released to production, but because Adobe is having a Bug Quash next weekend, and I’m going, I’ll try to figure out more information about it and take it with me.
I’ll be doubly impressed if I get more than a “can’t repro” or “as designed”, though I’d be impressed enough if someone actually look at it at all.
I won’t bother posting my project that triggered it, though I hope to be able to narrow it down, and maybe even trigger it with just the SDK, but here’s the stack trace which FlexBuilder helpfully pointed me to:
!SESSION 2009-03-20 13:30:39.171 ———————————————– eclipse.buildId=unknown java.version=1.5.0_11 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 !ENTRY com.adobe.flexbuilder.project 4 43 2009-03-20 13:33:28.109 !MESSAGE Uncaught exception in compiler !STACK 0 java.lang.ClassCastException: macromedia.asc.parser.MetaDataEvaluator$KeyValuePair at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:226) at macromedia.asc.parser.SetExpressionNode.evaluate(SetExpressionNode.java:58) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:193) at macromedia.asc.parser.MemberExpressionNode.evaluate(MemberExpressionNode.java:57) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:611) at macromedia.asc.parser.VariableBindingNode.evaluate(VariableBindingNode.java:64) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:392) at macromedia.asc.parser.ListNode.evaluate(ListNode.java:44) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:567) at macromedia.asc.parser.VariableDefinitionNode.evaluate(VariableDefinitionNode.java:48) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:771) at macromedia.asc.parser.ClassDefinitionNode.evaluate(ClassDefinitionNode.java:106) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:406) at macromedia.asc.parser.StatementListNode.evaluate(StatementListNode.java:60) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:860) at macromedia.asc.parser.ProgramNode.evaluate(ProgramNode.java:80) at flex2.compiler.as3.Compiler.analyze3(Compiler.java:531) at flex2.compiler.mxml.InterfaceCompiler.analyze3(InterfaceCompiler.java:378) at flex2.compiler.mxml.Compiler.analyze3(Compiler.java:147) at flex2.compiler.API.analyze(API.java:2537) at flex2.compiler.API.analyze(API.java:2432) at flex2.compiler.API.batch2(API.java:406) at flex2.compiler.API.batch(API.java:1117) at flex2.compiler.API.compile(API.java:1290) at flex2.tools.oem.Application.compile(Application.java:1074) at flex2.tools.oem.Application.recompile(Application.java:1026) at flex2.tools.oem.Application.compile(Application.java:678) at flex2.tools.flexbuilder.BuilderApplication.compile(BuilderApplication.java:354) at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder$MyBuilder.mybuild(ASApplicationBuilder.java:271) at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder.build(ASApplicationBuilder.java:122) at com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.build(ASBuilder.java:139) at com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.build(ASItemBuilder.java:73) at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildItem(Unknown Source) at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.build(Unknown Source) at com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.build(Unknown Source) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:624) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:166) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:197) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:246) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:249) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:302) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:334) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:137) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)