Skip navigation
Currently Being Moderated

List Item Renderers, State Changes, and Error #2025

Dec 20, 2007 10:20 PM

I keep getting the following error on apps that have lists with custom item renderers and state changes:

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at mx.core::UIComponent/$removeChild()
at mx.core::UIComponent/removeChild()
at mx.controls::SWFLoader/load()
at mx.controls::SWFLoader/mx.controls:SWFLoader::commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/validateClient()
at mx.controls::List/mx.controls:List::makeRowsAndColumns()
at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::u pdateDisplayList()
at mx.controls::List/mx.controls:List::updateDisplayList()
at mx.core::UIComponent/validateDisplayList()
at mx.managers::LayoutManager/::validateDisplayList()
at mx.managers::LayoutManager/::doPhasedInstantiation()
at Function/
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()

Here is an example:
It contains a List with custom ItemRenderer inside a particular state view, and a button to change state. This error does not seem to appear without changing state.

You can generate the error by following these steps:
Change State
Change State // Note the bitmap doesn't renderer
Remove All
Add // crash

I have also seen the error on "Remove" and "Change State", but I can't come up with a reliable series of steps.

Can anyone point out what I did wrong, or at least how I can avoid this error?
  • Currently Being Moderated
    Dec 21, 2007 4:10 AM   in reply to Anm_LA
    strange. Found out that it also occurs without changing state. I mean, starting from scratch randomly adding and removing states will result in a render error, after that add will result in the same error. Have you tried this without states?
    Mark as:
  • Currently Being Moderated
    Apr 30, 2013 12:26 AM   in reply to Anm_LA

    When building a list on iOS, if you are using an image for instance in the overskin, the garbage collection fails while the list is moved rapidly. It CANNOT addChild and removeChild fast enough. You then get a 2025 error.

    It will still run on a device but will lock up on rapid scroll making parts of the list fail to generate.

    Drag scroll uses an image background to get the effect.


    The screen cannot dispose of the images and replace them to avoid overload of the memory if using large lists.


    Try using a stock standard list or grid without any changes to the look and feel.


    It should work. As for formatting the cells ...


    I am sure that Adobe will look into this in FLASH. They need to look at the cellrenderer overskin in the library and allow the overskin to be made available to format change just like every other element in the library.  THIS IS A BUG.

    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