2 Replies Latest reply on Dec 1, 2009 8:30 AM by singmajesty

    FDB hangs intermittently and needs to be killed

    singmajesty Level 1



      Do you guys have any idea what may cause this issue?


      Sometimes when you publish a project, the debugger says it is ready, and Flash Player 10 is running, but its window never appears. When trying to compile again, the OS reports that the SWF file is locked.


      The problem does not occur with Flash Player 9, but I have been able to repeat this issue with every version of Flash Player 10, using the external debug player on Windows. It happens intermittently so it is very hard to track down.


      For what I know, Java (running mxmlc/fcsh/fdb) gets hung up. It sometimes starts working again if you kill every instance of FlashPlayer.exe ... ending the current debug session. It also starts to work if you kill every instance of Java.exe and try again.


      I have not seen this issue when debugging by hand. The issue appears to be with the combination of Java and the Flash 10 player, and I have the feeling that it occurs because of something happening too quickly. Yes, I am using FlashDevelop, but it should not matter. FlashDevelop compiles the SWF, copies the result to the target directory, starts the debugger, then launches the external player when the debugger is ready. It offers the same commands I give the debugger by hand, so maybe Flash Player 10 has some kind of "warm up" period which sometimes gets the best of the debugger. Either way, FlashDevelop launches FDB, waits for the prompt, and offers commands.


      Does Flex Builder use the same apps as the Flex SDK? Perhaps it does not occur because FlashDevelop runs faster. The problem is more likely to occur with bigger, more complicated files. Perhaps Flash Player 10 loads up, reports itself as ready, but still has to load up code. If for some reason this initialization stage takes a frame too long, FDB tries to talk to it as if it were ready, but its come through just too soon.


      You can see more details about this here:




      It's been over two years since I started having this issue. I stuck with Flash Player 9 for a long time because of it. Now that I use Flash Player 10 for all my projects, it feels like its time to try and figure out what's going on here. It's easy to pass the buck and say its a FlashDevelop problem, but that really is not what I am seeing ... and if FlashDevelop had to do something different, like add an artificial pause to wait for Flash Player to initialize, it would at least be helpful to know what needs to be done to negotiate the debugger without hanging it.


      I appreciate your help and I don't mean to come across as confrontational if I sound that way. I'm just hoping to get down to a real answer and not assume that this is "just the way things are"


      Thank you!

        • 1. Re: FDB hangs intermittently and needs to be killed
          mike_morearty Level 1

          I have a few thoughts.  For one thing, reading through the thread over on flashdevelop.org, some (and perhaps all) of the problems people encountered were due to a bug in the Flash player, which was fixed this past summer.  (The Flash Builder record of the bug is here: http://bugs.adobe.com/jira/browse/FB-16153 -- but the bug was actually in the player.)


          So please make sure you have the latest debugger version of the Flash player.  You can get the latest version here: http://www.adobe.com/support/flashplayer/downloads.html


          That is almost certainly the cause of the "WARNING: The Player that you are using does not support all fdb commands" message that member "elyon" described in his post on June 4, 2009.  Hopefully it will help with whatever problems you are running into.


          In another post that same day, elyon saw this output from FDB:


          Adobe fdb (Flash Player Debugger) [build 4852]
          Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
          Waiting for Player to connect
          Player connected; session starting.
          Unexpected error while processing command.
          For diagnostic purposes stack trace follows:


          But apparently there was no stack after that message.  If you can reproduce that error message, the way to get stack dumps to appear is to pass "-Dtrace.error=true" to Java when it launches FDB.  This is a Java property, so it must be passed as an argument to Java, not to FDB.  For example, if launching FDB from the command line, you can launch it like this:


          java -Dtrace.error=true fdb.jar


          > Does Flex Builder use the same apps as the Flex SDK?


          Yes, but not in quite the same way FlashDevelop does.  FDB has a public Java API that can be called by any Java app to control debugging, and that's what Flex Builder does, unlike FlashDevelop's approach.  So, FlashDevelop and Flex Builder are using the exact same underlying debugger code; it's possible that there is some sort of problem with FlashDevelop's communication over the pipe, I just don't know.


          You say you haven't seen this issue when "debugging by hand" -- you mean when using FDB directly?  If so, then I suppose the Flash player version isn't the problem.  I'd be interested to see a repro case that involved just FDB (perhaps reading commands from a file or a pipe if that's the easiest way to reproduce it).


          There is nothing unusual about FDB's communication with stdin and stdout, it's pretty standard stuff.   Also, it's all open source, http://opensource.adobe.com, so you can debug it if you want.


          - Mike Morearty
            Flash Builder team

          • 2. Re: FDB hangs intermittently and needs to be killed
            singmajesty Level 1

            Hi Mike,


            Thank you for your feedback!


            Please leave this thread open as I go over the items you mentioned to try and get to the bottom of this. Fixing this will make a lot of developers happy :)