Flex Builder Woes

October 13th, 2006 by Mims H Wright

I’ve been working with Flex Builder on a project right now and I gotta say, it’s got me fuming mad. I’ve been sending poor Roger IM’s in all-caps about how I’M VERY VERY UPSET WITH THIS MOTHER FLEXING FLEX BUILDER!!!

Flex Piñata

I’ve had the following problems that I’ve been meaning to share because their solutions are ridiculous.

Problem: Application hangs up or crashes
Solution: I dunno, wait for the Mac version? Also killing the javaw.exe process seems to work better than just ending the FB program.

Problem: Your repository goes to shit.
Solution: Don’t use Subclipse. It does things without telling you. Check out your folder using Tortoise and create a new project around that.
If you love Subclipse for whatever reason, at least don’t use Tortoise at the same time on the same project.

Problem: Some error about HTML wrapper files.
Solution: Go into your project properties to the Flex Compiler area and uncheck Generate HTML wrapper file. Hit OK. then open the properties again and recheck it. Now write to Adobe and tell them how much you love this new undocumented feature.

Problem: An internal error occurred during: “Removing compiler problem markers.”
Solution: ???

Problem: General Sluggishness.
Solution: Buy extra ram. HA! Also, in Windows go to system properties > advanced tab > Performance Options and select “Adjust for Best Performance” .

Problem: You search for and open a class file but it’s missing a change you know you just made.
Solution: Sometimes, I’ve opened a class using the Open Resource command that was actually an older copy saved to the bin folder (i dunno how or why). Make sure you’re editing the one in src.

Problem: Your SWF files seem to be out of date.
Solution: Go to the navigator menu and chose Filters. Uncheck .asctionScriptProperties and hit OK. Find and open .actionScriptProperties. Mine sometimes gets this stupid list of bogus tags under where the path is something like /trunk/src/trunk/src/trunk/src/trunk/src/Creator.mxml. Clean all this junk out and replace it manually with the correct one. Save this file. Now close and reopen your project. Think about how you could have ever known how to fix this if I didn’t just tell you.
If this doesn’t work (which it eventually didn’t for me) do File > Switch Workspace and create a whole new workspace and recreate your project. It wouldn’t hurt to re-checkout the repository too.

Problem: General weirdness.
Solution: Say two Hail Marys and do Project > Clean.

OK. I’m glad I got that out of my system. Please send more problem/solutions if you have any. Thanks!

16 Responses to “Flex Builder Woes”

  1. Roger says:

    I’d say use Subclipse, or Tortoise, but not both at the same time. Bad juju! Basically, out of black magic paranoia, I close Eclipse entirely before doing any SVN operations that aren’t done through Eclipse.

    I also like to do File -> Change Workspace, to the same workspace, which basically restarts Eclipse without all that to-do.

    All open projects will slow things down. Right click any unused projects and select Close Project. Remove any Application MXML files you’re not using from the Flex Applications tab of the project properties window.

    You can make eclipse start with more memory. Check it out.

  2. Eric Cancil says:

    Have you had the one where you run your application in debug mode, and when it encounters a null object reference firefox freezes… happens EVERY time for me

  3. mims says:

    Yes! How could I have forgotten! I’ve seen the same thing on my end.
    This seems to be fixed by stopping the debug session in Flex Builder or stepping over the breakpoint. I guess it’s the correct behaviour but it’s a pain in the ass!

    thanx for the comment.

  4. Yeah, it’s actually what is supposed to happen. When you hit any error or breakpoint, the process freezes execution so you can inspect it in the debugger… this happens whether you’re running the app in the browser or the standalone player. If it didn’t freeze its state you couldn’t stop time and examine what went wrong in the debugger!

    To resume execution you can hit “Resume” (play button) in the deubug view… to stop debugging and detach the debugger you can hit “Disconnect” (the two red dots). Or to close the process entirely you can hit “Terminate” (the stop button). Resume will keep catching exceptions and breakpoints. Disconnect will let your app keep running but no more debugging. Terminate will stop debugging and close the app.

  5. mims says:

    Yes. the pain in the ass part is that FF appears to be crashed in the meatime. :-/

  6. Not crashed, frozen!
    If you need to keep a browser open / running while debugging a flash app, either:

    • Configure Flex to launch apps in a different browser, or a browser that spawns multiple processes for multiple sessions.
      Click Window → Preferences, General → Web Browser, check “Use external Web browser” and pick a browser that isn’t your default or runs in multiple processes (typically IE for firefox users).
    • Configure firefox to
      run in two processes concurrently
    • Debug your app in the Flash Player standalone version. Right-click your project and select Properties, go to Flex Compiler → HTML wrapper, uncheck “Generate HTML wrapper file.”
  7. Ok, Flex Builder is officially annoying the crap out of me too. I join in your angry torch-and-pitchfork mob now.

  8. Mims Wright says:

    Help us FDT, you’re our only hope!

  9. Chuck Williams says:

    Hey, I’ve got a solution for your “Removing compiler problem markers” issue: Delete the offending project from the navigator (be sure not to delete the contents), and re-add it again… Seems to have worked for me!

  10. Vitor Cunha says:

    Does FB executes “Building Workspace” all the time?
    It’s so damn slow and it appears for every action you do, from saving the project to typping a letter!

  11. Yep, that’s slow because it’s compiling your project! Supposedly it figures out what has changed and does incremental builds, but it is still pretty slow. You can disable this by unchecking Project → Build Automatically. However, good stuff like autocompletion and type navigation depend on having your project built and up to date, so there’s definitely a tradeoff.

  12. There are three other Flex Builder issues that are driving me nuts (I’m new to Flex though, so it could be my own fault).

    1. Flex appears to delete html files from the bin directory. When trying to run the application or debug it says that the html file can’t be found (especially the debug versions. I have confirmed that I have the most recent debug version of the Flash player).

    2. When trying to run the application, it says that there are errors in the application and asks me if I want to continue. Why are some of the errors marked with the red error icon and others aren’t. I’m now stuck with having to look through thousands of lines of code to find the “mystery” errors since Flex has supposedly found them but told me nothing about them. Any ideas on how to troubleshoot these better?

    3. I have yet to be able to export a project to another system without it being full of errors at the destination resulting from things that either didn’t copy correctly or were not packaged in with the app during the export.

  13. @Joe, hope this helps.

    1. If the Application you’re building is named Foo.mxml, and “Generate HTML Wrapper” is checked in the Project properties panel, Flex Builder creates its own Foo.html and Foo-debug.html files in the output directory on build. To change the HTML files it outputs, modify the index.template.html source in the html-template/ directory Flex Builder creates. HTML files with other names shouldn’t be clobbered.
    2. Do the errors appear in the Problems view? Choose Window→Problems and hit the filters button (leftmost icon on the top right of this view) and make sure the filter shows errors “On any element.”
    3. Usually I move the files around but leave out the directories FB creates, like .actionScriptProperties and .settings/. Then, whenever I’m setting up the project, I configure the project settings in flex builder all over again. Just a little bit of trouble (no more than a dozen clicks) but keeps the project much more portable.

    HTH! //Roger

  14. Guillaume M. says:

    I’m doing a multi player game and flex just terminate one application out of three for no apparent reason. But it work fine outside of the debugger? If anyone has a solution or a way to trace that “terminate for no apparent reason bug” I beg you to share it.

  15. ed says:

    I agree…
    FlexBuilder is complete crap!
    It freezes for no reason…
    Takes forever to compile…
    It is very incomplete as an IDE…
    It increases development time by about 40%…

    include FlexBuilder;

    RIA != RAD; // Always True

    Just my 4 cents.

  16. cal says:

    How about when you set a breakpoint in FB and the debugger never hits it… it’s not that the code never gets executed; it simply never stops at it.
    There’s also all the caching that sometimes requires a manual deletion of the FB Swccache, searchCache & projects directories in /.metadata/.plugins/com.adobe.flexbuilder.codemodel. I mean, COME ON!

Leave a Reply