Common Flex 2 compiler errors and known issues

This TechNote describes known issues with the Flex 2 compiler that may produce errors while compiling your Flex application.

  • 175465: The following runtime error is produced because the compiler fails to report an error when there is a protected set method in base class with the same name as a protected member variable in a derived class: VerifyError: Error #1107: The ABC data is corrupt, attempt to read out of bounds.
  • 174533: An unescaped \n in a resource bundle properties file causes compiler errors that point back into generated code: Message: Syntax error: A string literal must be terminated before the line break.
  • 175233: If a resource bundle properties file is encoded in unicode , the compiler produces misleading errors, for example, Error: Syntax error: input ended before reaching the closing quotation mark for a string literal
    All strings in properties files must be Latin-1 or UTF-8 encoded.
  • 170249: No compile warning or error is thrown for mismatched objects in the source and destination of the mx :Binding tag, resulting in a runtime error.
  • 172353: A runtime error is thrown when Locale .getCurrent(Application.application.systemManager).country
    is used to retrieve the country in an application where -locale was not passed as a compiler option, for example,
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
  • 169682: When debugging, if the body of a "for" loop is a single line, single-stepping steps over the entire loop.
  • 171214: Classes implementing an interface are not required by the compiler to match the default values in their methods to the interface methods.
  • 174646: If a class contains accessor functions with different access control namespace attributes, (for example, a protected setter and a public getter) using one of them causes a compile-time-error, for example , Compiler-Error 1000: Ambiguous reference to myVar
    The workaround is to rename your getter or setter function to avoid the mismatch.
  • 175271: Dictionary doesn't handle MethodClosures correctly, making it possible to end up with two entries in the dictionary with the same function as a key. As a workaround, you can declare a variable and assign it to the closure and then keep using that variable.
  • 175264: Compiling an application that instantiates a class that generates a compiler warning will continue to report the same compiler warning even after the reference to the offending class is removed. The compiler warning will no longer be reported after a clean build.
  • 171221: The mxml compiler produces a stack trace when the mxml code has an ActionScript expression with a syntax error. For example:

    <? xml version="1.0" encoding="iso-8859-1"?> <mx:Application xmlns :mx="http://www.adobe.com/2006/mxml" > <mx:TextInput id="ti" text="{String(new Date()}"/> </mx:Application>
  • 172876: Compiler throws cryptic errors when using a variable name already used by a Flex application model base class or a Flash API class like DisplayObject. For example:
    Access of possibly undefined property x through a reference with static type String. Access of possibly undefined property y through a reference with static type String. Access of possibly undefined property text through a reference with static type flash.display :DisplayObject
  • 174788: Incremental compiling shows error after updating a resource bundle properties file, for example, Error: Unable to resolve a class for ResourceBundle: TestResources_properties
    In Flex Builder, clean the project in order to remove the error.

Additional Information

 Adobe

Get help faster and easier

New user?