Skip navigation
Currently Being Moderated

How to debug this?

Oct 5, 2010 5:21 PM

Under Flash Player 10.1 on Windows, we are suddenly getting an error that did not occur under player 9 or 10, and does not appear in any version of player on Mac.  The biggest problem is that the entire error stack is inside the Flash framework, initiated by a callLaterDispatcher.  Flash complains that an index is out of bounds, but gives zero information on what the parent or child object is, or what the index number is that is being passed.

 

I have all bug given up trying to find the source of the problem in our code, which runs for several thousand lines, covering half a dozen internally created classes.  I see a 'hook' at (C:\autobuild\3.2.0\frameworks\...), but cannot even see that folder on my system? (yes, I have 'show invisible' set for my file system -- this is Windoze XP, for what it's worth).

 

Any suggestions on how to track down a problem like this?

 

RangeError: Error #2006: The supplied index is out of bounds.
    at flash.display::DisplayObjectContainer/getChildAt()
    at mx.core::Container/getChildAt()[C:\autobuild\3.2.0\frameworks\project s\framework\src\mx\core\Container.as:2334]
    at fl.managers::FocusManager/addFocusables()
    at fl.managers::FocusManager/addFocusables()
    at fl.managers::FocusManager/addFocusables()
    at fl.managers::FocusManager/addFocusables()
    at fl.managers::FocusManager/addFocusables()
    at fl.managers::FocusManager/activate()
    at fl.managers::FocusManager()
    at fl.core::UIComponent/createFocusManager()
    at fl.core::UIComponent/initializeFocusManager()
    at fl.core::UIComponent/addedHandler()
    at flash.display::DisplayObjectContainer/addChild()
    at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::createContentPane()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Contai ner.as:4665]
     at  mx.core::Container/createOrDestroyScrollbars()[C:\autobuild\3.2.0\fra   meworks\projects\framework\src\mx\core\Container.as:4410]
    at  mx.core::Container/createScrollbarsIfNeeded()[C:\autobuild\3.2.0\fram   eworks\projects\framework\src\mx\core\Container.as:4359]
    at  mx.core::Container/createContentPaneAndScrollbarsIfNeeded()[C:\autobu   ild\3.2.0\frameworks\projects\framework\src\mx\core\Container.as:4175 ]
    at mx.core::Container/validateDisplayList()[C:\autobuild\3.2.0\framework s\projects\framework\src\mx\core\Container.as:2691]
     at  mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\3.2.0\f   rameworks\projects\framework\src\mx\managers\LayoutManager.as:622]
     at  mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0   \frameworks\projects\framework\src\mx\managers\LayoutManager.as:695]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
     at  mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\framew   orks\projects\framework\src\mx\core\UIComponent.as:8628]
    at  mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\framewo   rks\projects\framework\src\mx\core\UIComponent.as:8568]

 
Replies
  • Currently Being Moderated
    Oct 5, 2010 11:14 PM   in reply to BurtJ

    Not sure why you are having version-specific problems.  This call stack is

    typical of mixing Flash fl.. components with Flex components.  They are

    incompatible.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 5, 2010 11:53 PM   in reply to BurtJ

    Try launching this from the debugger. When the app breaks you can look into the variables/expressions panel and find which component is throwing this. Then look at what children is that component adding/removing.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 6, 2010 12:46 AM   in reply to BurtJ

    Yeah, I think I misunderstood.

     

    Normally when you have a flex app, even if breaks in the flash player code, you can still see the debugger freezing and you can find the causing component. When you have a flash component acting as a flex one I think that might not work anymore.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 6, 2010 1:04 PM   in reply to BurtJ

    fl.. components and mx.. components cannot co-exist. It works sometimes,

    but often you will hit these issues with the fl FocusManager.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 6, 2010 5:32 PM   in reply to BurtJ

    flash.. is not fl..

     

    You can use all the flash.. stuff you want.  Somehow, a fl.. component

    got into your app.  You can use link-reports to find out how if it isn't

    apparent.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 6, 2010 6:18 PM   in reply to BurtJ

    The fl.. components come with the Flash IDE in the CreativeSuite.  And

    even older versions before that.

     

    If someone starts using the built-in components from the Flash IDE in a Flex

    app, trouble like this occurs.  The call stack listed an fl.. class which

    is why I am offering this as the root cause of the problem.  I still don't

    see how changing player versions could really cause it unless there was a

    subtle timing issue.

     

    You can create your own components in Flash and use them in Flex via the

    Flex/Flash Component Kit, but you can't use fl.. components in those

    components.

     

    If you don't want to wonder all night, you can always load up on caffeine,

    get back in your car and head back to the office.  However, if it helps, the

    call stack is like a fingerprint.  It has implicated the fl.. components.

    They will need to be removed at some point.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 7, 2010 11:51 AM   in reply to BurtJ

    Hi,

     

    If looking through the code didn't work try looking over the user interface for elements like: Flash Checkbox, Flash RadioButton, Flash TextInput, Flash TextArea, ColorPicker, etc. Your code breaks because of a UIComponent subclass so you can look here : http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/index.html and go through the list of subclasses, and their subclasses, etc ... and see if your Flash components use any of them.

     

    Good luck, you're gonna need it .

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 7, 2010 1:57 PM   in reply to BurtJ

    Looking at the original stack dump, it indicates that there is no debug info

    for the fl.. components.  So it could be in one of those Flash SWF files.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 7, 2010 8:42 PM   in reply to BurtJ

    FlexBuilder won't use fl.. component unless someone has placed them in the

    lib-path.

     

    Did you verify the exception is the same and has fl.. in the callstack?

    Did you verify from the debugger console that only one SWF got loaded?

    If you have done both, then generate another link-report and post it.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 8, 2010 10:56 AM   in reply to BurtJ

    It is possible that in 10.1 or due to some other change, something is sizing

    slightly differently than before and causing scrollbars to show up.  The

    fl.managers.FocusManager can't handle the way Flex puts up scrollbars.

     
    |
    Mark as:
  • Currently Being Moderated
    May 9, 2013 3:30 AM   in reply to BurtJ

    RangeError: Error #2006: 提供的索引超出范围。

              at flash.display::DisplayObjectContainer/getChildAt()

              at mx.core::Container/getChildAt()[E:\dev\4.y\frameworks\projects\mx\src \mx\core\Container.as:2751]

              at MainApp/getChildAt()[D:\!Source\SrcClient\Main\AppMain\src\MainApp.mx ml:239]

              at fl.managers::FocusManager/addFocusables()[D:\Program Files\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\managers\FocusManager.as:272]

              at fl.managers::FocusManager/addFocusables()[D:\Program Files\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\managers\FocusManager.as:274]

              at fl.managers::FocusManager/addFocusables()[D:\Program Files\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\managers\FocusManager.as:274]

              at fl.managers::FocusManager/activate()[D:\Program Files\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\managers\FocusManager.as:465]

              at fl.managers::FocusManager()[D:\Program Files\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\managers\FocusManager.as:178]

              at fl.core::UIComponent/createFocusManager()[D:\Program Files\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\core\UIComponent.as:1621]

              at fl.core::UIComponent/initializeFocusManager()[D:\Program Files\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\core\UIComponent.as:1532]

              at fl.core::UIComponent/addedHandler()[D:\Program Files\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\core\UIComponent.as:1553]

              at flash.display::DisplayObjectContainer/addChild()

              at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::createContentPane()[E:\dev\4.y\frameworks\projects\mx\src\mx\core\Container.as:5437]

              at mx.core::Container/createOrDestroyScrollbars()[E:\dev\4.y\frameworks\ projects\mx\src\mx\core\Container.as:5183]

              at mx.core::Container/createScrollbarsIfNeeded()[E:\dev\4.y\frameworks\p rojects\mx\src\mx\core\Container.as:5132]

              at mx.core::Container/createContentPaneAndScrollbarsIfNeeded()[E:\dev\4. y\frameworks\projects\mx\src\mx\core\Container.as:4929]

              at mx.core::Container/validateDisplayList()[E:\dev\4.y\frameworks\projec ts\mx\src\mx\core\Container.as:3312]

              at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.y\framework s\projects\framework\src\mx\managers\LayoutManager.as:736]

              at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\framewo rks\projects\framework\src\mx\managers\LayoutManager.as:819]

              at mx.managers::LayoutManager/validateNow()[E:\dev\4.y\frameworks\projec ts\framework\src\mx\managers\LayoutManager.as:878]

              at mx.core::Application/resizeHandler()[E:\dev\4.y\frameworks\projects\m x\src\mx\core\Application.as:1734]

              at mx.core::Application/commitProperties()[E:\dev\4.y\frameworks\project s\mx\src\mx\core\Application.as:1086]

              at mx.core::UIComponent/validateProperties()[E:\dev\4.y\frameworks\proje cts\framework\src\mx\core\UIComponent.as:8219]

              at mx.managers::LayoutManager/validateProperties()[E:\dev\4.y\frameworks \projects\framework\src\mx\managers\LayoutManager.as:597]

              at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\framewo rks\projects\framework\src\mx\managers\LayoutManager.as:813]

              at mx.managers::LayoutManager/validateNow()[E:\dev\4.y\frameworks\projec ts\framework\src\mx\managers\LayoutManager.as:878]

              at mx.core::Application/resizeHandler()[E:\dev\4.y\frameworks\projects\m x\src\mx\core\Application.as:1734]

              at flash.events::EventDispatcher/dispatchEventFunction()

              at flash.events::EventDispatcher/dispatchEvent()

              at mx.managers::SystemManager/Stage_resizeHandler()[E:\dev\4.y\framework s\projects\framework\src\mx\managers\SystemManager.as:3227]

     

     

    /////////////////////////////////////////////////////////////////

     

    I got the Same Error

    My application with the layout desc bellow

     

    [MainApp:mx:Application]

    --[xxxx:mx:UIComponent]

    ---[a_mc_like_dialog:MovieClip]

    -----[ctrl:fl:UIComponent] //type of fl.controls.*

    -----...

     

    when MainApp handle stage resize event

    the application crash

     

     

    the cause is in function

    Container::createScrollbarsIfNeeded and it change the _firstChildIndex

    the local var

    needContentPane is true

     

     

    My solution is set MainApp's properties like this

                    horizontalScrollPolicy="off"

                    verticalScrollPolicy="off"

                    clipContent="false"

     
    |
    Mark as:
  • Currently Being Moderated
    May 9, 2013 9:42 AM   in reply to duzhiwei

    This stack trace indicates that you are mixing components from Flash Pro in your Flex app.  The built-in components from Flash Pro were not written to be compatible with Flex.  You can create your own components that don’t use Flash Pro components and build them up out of low-level shapes and sprites and integrate them in Flex with the Flash-Integration Kit.

     
    |
    Mark as:
  • Currently Being Moderated
    May 9, 2013 7:38 PM   in reply to Flex harUI

    My application with the layout desc bellow

     

    [MainApp:mx:Application]

    --[xxxx:mx:UIComponent]

    ---[a_mc_like_dialog:MovieClip]

    -----[ctrl:fl:UIComponent] //type of fl.controls.*

    -----...

     

    when MainApp handle stage resize event

    the application crash

     

     

    the cause is in function

    Container::createScrollbarsIfNeeded and it change the _firstChildIndex

    the local var

    needContentPane is true

     

     

    My solution is set MainApp's properties like this

                    horizontalScrollPolicy="off"

                    verticalScrollPolicy="off"

                    clipContent="false"

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points