6 Replies Latest reply on Apr 15, 2010 11:17 AM by mac_martine

    Buggy Flashbuilder 4 debugger behaviour

    giant frog Level 1

      Hi,

       

      In my application, I have a creation complete event which is getting hit 4 or 5 times, and then when I step through

      the code, it is going forwards and *backwards* .

       

      I have a stupid bug, and the debugger is no help whatsoever!!!!

       

      Jon

        • 1. Re: Buggy Flashbuilder 4 debugger behaviour
          Jason San Jose Adobe Employee

          If you can reduce this bug down to some example code, we can help figure it out or get it fixed. The times when I've seen the debugger do strange things is when my code is out of sync with the SWF.

           

          Jason San Jose

          Software Engineer, Flash Builder

          • 2. Re: Buggy Flashbuilder 4 debugger behaviour
            giant frog Level 1

            Yeah, I thought so too, and I cleared the cache several times, and rebooted to make sure but no go.

             

            My code is at work now, but I was simply manually creating a value object (class created by FB from a blaze service), so I dont

            know if that had some weird code in the constructor that was executing,

             

            i.e.

            var md:MenuData = new MenuData();

            md.label = "Window";

            md.icon = "blah.jpg";

            md.children = new ArrayCollection();           // pretty simple stuff

             

             

            but from what I have seen in FB 4, the creationcomplete function gets called alot with some NULL values before the real one finally

            executes in my components and application.

             

            Is there an update to the FB4 premium trial app?

             

            thanks,


            Jon

            • 3. Re: Buggy Flashbuilder 4 debugger behaviour
              Jason San Jose Adobe Employee

              The creationComplete event of what component? I don't see any event handling in this code. Did I misread something?

               

              Jason San Jose

              Software Engineer, Flash Builder

              • 4. Re: Buggy Flashbuilder 4 debugger behaviour
                giant frog Level 1

                no, the code is at work, its just what I remember, I will post it tomorrow.

                 

                jon

                • 5. Re: Buggy Flashbuilder 4 debugger behaviour
                  giant frog Level 1

                  ok, here is the code. it is the creationComplete event of the application

                   

                  private function init():void {
                                  util = new utils(serverUrl);
                                  paramArr = new Array();
                                  desktop.effects = new myMDIEffects();
                                  flash.net.registerClassAlias( "portalLogic.MenuData", MenuData );
                                  loginWin = new loginWindow();
                                  loginWin.paramArr = paramArr;
                                  loginWin.addEventListener("loggedIn", loggedIn);
                                  desktop.windowManager.addCenter(loginWin);
                                  loginWin.x += loginWin.width / 2;
                                 
                                   applicationMenu.label = "Window Management";

                  70                 applicationMenu.children = new ArrayCollection();
                                 
                                  var md1:MenuData = new MenuData();
                                  md1.label = "Tile";
                                  md1.action = "tile";
                  75                md1.event = "window";
                                  md1.children = new ArrayCollection();
                                  md1.image = imagePath + "assets/icon/actions/view-fullscreen.png";
                                 
                                  var md2:MenuData = new MenuData();
                                  md2.label = "Cascade";
                                  md2.action = "cascade";
                                  md2.event = "window";
                  83                md2.children = new ArrayCollection();
                                  md2.image = imagePath + "assets/icon/actions/view-fullscreen.png";
                                 
                                  var md3:MenuData = new MenuData();
                                  md3.label = "Close All";
                                  md3.action = "closeall";
                                  md3.event = "window";
                                  md3.children = new ArrayCollection();
                                  md3.image = imagePath + "assets/icon/actions/view-fullscreen.png";
                                 
                                  applicationMenu.children.addItem(md1);
                                  applicationMenu.children.addItem(md2);
                  95                applicationMenu.children.addItem(md3);

                   


                  clearing the cache, build clean, restart the browser, starting a debugging session goes as follows...


                  ignores breakpoint on 70
                  stops at breakpoint on 73
                  jumps to 75 on step
                  jumps to 83 on step
                  jumps to CSSStyleDeclaration.as 770 on step
                  jumps back to 73, 75, 83
                  jumps to CSSStyleDeclaration.as 770 on step
                  wanders off into UIComponent.as

                   

                  As I mentioned before, the MenuData valueObject class is generated by Flex from the BlazeDS service.

                   

                  ??????????

                  • 6. Re: Buggy Flashbuilder 4 debugger behaviour
                    mac_martine Level 1

                    Your code must be out of sync with your swf.

                     

                    If you are building to a server, and not locally, make 100% sure that your project is currently being built AND run where you think it is. It's likely you're project is not being built where you think it is anymore.

                     

                    For example, you could Run your project and copy the url.

                    Then do a Clean and don't build the project. Then go back to that url and make sure there's nothing there. If something is there then you aren't building where you think you are.

                     

                    I don't remember exactly what caused this when I hit this, but I remember struggling with it for a bit and the problem was what I just described.