You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Jiem <je...@gmail.com> on 2013/09/13 04:52:05 UTC

SystemManager seems to call addChildAt > out of bounds

Hello

I'm working to a project since a long time, I did recently shifted from 4.6
to Apache Flex 10.
I got this issue and it seems to happen in a non deterministic fashion.
I can trigger it in several different ways, the 2 last calls only are the
same every time (System Manager:2130 and SystemManager:1753). It's like
something gets broken and then the next time I use the PopUpManager, it
crashes.
I'm starting to believe this is a bug inside Apache Flex, it's been weeks
this bug is around, it's very hard to reproduce and I have no step-to.

RangeError: Error #2006: The supplied index is out of bounds.
	at flash.display::DisplayObjectContainer/addChildAt()
	at
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2130]
	at
mx.managers::SystemManager/addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:1753]
	at
mx.managers::SystemManager/addChild()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:1736]
	at
mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\PopUpManagerImpl.as:344]
	at
mx.managers::PopUpManager$/addPopUp()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\PopUpManager.as:193]
	at
mx.controls::Menu/show()[E:\dev\4.y\frameworks\projects\mx\src\mx\controls\Menu.as:1648]
	at
outgame.components::IAccount/openMenu()[D:\Faeria\FaeriaClient\src\outgame\components\IAccount.as:156]
	at
outgame.components::IAccount/toggleMenu()[D:\Faeria\FaeriaClient\src\outgame\components\IAccount.as:118]

This is the code that produced that error stack:
private function openMenu():void {
        if(_isMenuOpened)
            return;
        APPLICATION.youContainer.height = CONTAINER_HEIGHT_OPENED;
        APPLICATION.opponentContainer.height = CONTAINER_HEIGHT_OPENED;
        // rebuilding menuData
        _menuData.removeAll();
        if (_account != DATA_TABLE.you[0]) {
            if (!_account.hasPrivateChatWithYou)
                addMenuAction(resource_manager.getString("ui",
"icard.startChat"), null,
                        FrontController.startPrivateChat, _account, false);
            if (!APPLICATION.opponentContainer.contains(this)) {
                addMenuAction(resource_manager.getString("ui",
"icard.gameInvite"), null, FRONT_CONTROLLER.gameInvite, this.data);
                addMenuAction(resource_manager.getString("ui",
"icard.tradeInvite"), null, FRONT_CONTROLLER.tradeInvite, this.data);
            }
        } else {
            if (APPLICATION.youContainer.contains(this))
                addMenuAction(resource_manager.getString("ui",
"icard.signOut"), null, FRONT_CONTROLLER.closeConnection, null);
            if (GAME != null)
                addMenuAction(resource_manager.getString("ui",
"icard.surrender"), null, GameComponent.surrender);
        }
        if (!APPLICATION.bottomBar.isAccountProfileOpened(Account(data)))
            addMenuAction(resource_manager.getString("ui",
"icard.viewProfile"), null, FrontController.openProfileWindow, this.data);

        // displaying
        _menu.width = width;
        _menu.show(0, MENU_OFFSET_Y);
        menuContainer.addElement(_menu);
        _isMenuOpened = true;
    }



And the _menu is created in a init() function, called only once, during the
component's creationComplete.

        _menu = Menu.createMenu(menuContainer, _menuData, false);

I'm extremely interested by clues regarding this issue. I'm running a stress
test for Faëria: Strategy Card Game, the game uses this code. It's a
client/server architecture (AS3/Java), http://faeria.net.

Cheers
Jiem



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: SystemManager seems to call addChildAt > out of bounds

Posted by Marcus Wilkinson <wi...@gmail.com>.
Jiem,

addItem should be safe, yes. However, I was experiencing a similar (if not
the same - im working from memory here) stack when I was removing and
adding a single item from the stage once a popup had closed. Updating the
SDK fixed my issue. I don't know for sure but addAll / addAllAt _must_ be
called internally in the SDK.

This problem was exposed for me very soon after updating the SDK, and I am
surprised that more people haven't suffered from this bug. I guess I'm
looking to your example to see if it can help other people who may be
experiencing the same issue, but only upgrading (or patching) the SDK would
confirm this.


On 19 September 2013 14:34, Jiem <je...@gmail.com> wrote:

> OK glad to know that addAll calls addAllAt, could explains my troubles.
> I have replaced my call to addAll by a for each loop and calls to
> addItem().
> addItem() is safe, isn't it?
> I prefer doing this than modifying the Flex SDK.
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701p2761.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: SystemManager seems to call addChildAt > out of bounds

Posted by Jiem <je...@gmail.com>.
OK glad to know that addAll calls addAllAt, could explains my troubles.
I have replaced my call to addAll by a for each loop and calls to addItem().
addItem() is safe, isn't it?
I prefer doing this than modifying the Flex SDK.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701p2761.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: SystemManager seems to call addChildAt > out of bounds

Posted by Marcus Wilkinson <wi...@gmail.com>.
Jiem,

It may still be worth looking at the addAllAt patch since addAll uses
addAllAt. Although you say you call addAll in a non-related part of your
code, I am sure the framework uses addAllAt internally.

Sorry to harp on about this patch; but until I applied it I was
experiencing an extremely similar RTE stack trace. And, IMHO it is
definitely worth trying it out if nothing else than to eliminate
possibilities. You could use the FlexSDK downloader and choose the nightly
build which should have the fix in there (unless I am wrong - you can just
check the downloaded ListCollectionView.as code once you have it installed)

Marcus


On 18 September 2013 22:52, Jiem <je...@gmail.com> wrote:

> Hey Markus,
> Thanks for trying to help me out.
> It seems addAllAt is bugged, not addAll. I only use addAll once in my code,
> in a very non related area.
> My code crashes for another reason... I'm totally out of clue, which is
> very
> annoying because my game goes in permanent beta in two days. :(
>
>
> Marcus Wilkinson wrote
> > Jiem,
> >
> > I too was having a few invalid index errors. My specific error was when
> > using a Data Group and using addAll() on the Data Provider for that Data
> > Group. The issue is here:
> > https://issues.apache.org/jira/browse/FLEX-33683
> > and the fix here:
> >
> https://github.com/apache/flex-sdk/commit/4a90e9574c63b2ef25870793900a0a225cd59950#frameworks/projects/framework/src/mx/collections/ListCollectionView.as
> >
> > I don't know if the issue you are experiencing has the same cause though
> >
> > Marcus
> >
> >
> > On 13 September 2013 03:52, Jiem &lt;
>
> > jeanmichel.vilain@
>
> > &gt; wrote:
> >
> >> Hello
> >>
> >> I'm working to a project since a long time, I did recently shifted from
> >> 4.6
> >> to Apache Flex 10.
> >> I got this issue and it seems to happen in a non deterministic fashion.
> >> I can trigger it in several different ways, the 2 last calls only are
> the
> >> same every time (System Manager:2130 and SystemManager:1753). It's like
> >> something gets broken and then the next time I use the PopUpManager, it
> >> crashes.
> >> I'm starting to believe this is a bug inside Apache Flex, it's been
> weeks
> >> this bug is around, it's very hard to reproduce and I have no step-to.
> >>
> >> RangeError: Error #2006: The supplied index is out of bounds.
> >>         at flash.display::DisplayObjectContainer/addChildAt()
> >>         at
> >> mx.managers::SystemManager/
> >> http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()[E
> >>
> :\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2130]
> >>         at
> >>
> >>
> mx.managers::SystemManager/addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:1753]
> >>         at
> >>
> >>
> mx.managers::SystemManager/addChild()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:1736]
> >>         at
> >>
> >>
> mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\PopUpManagerImpl.as:344]
> >>         at
> >>
> >>
> mx.managers::PopUpManager$/addPopUp()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\PopUpManager.as:193]
> >>         at
> >>
> >>
> mx.controls::Menu/show()[E:\dev\4.y\frameworks\projects\mx\src\mx\controls\Menu.as:1648]
> >>         at
> >>
> >>
> outgame.components::IAccount/openMenu()[D:\Faeria\FaeriaClient\src\outgame\components\IAccount.as:156]
> >>         at
> >>
> >>
> outgame.components::IAccount/toggleMenu()[D:\Faeria\FaeriaClient\src\outgame\components\IAccount.as:118]
> >>
> >> This is the code that produced that error stack:
> >> private function openMenu():void {
> >>         if(_isMenuOpened)
> >>             return;
> >>         APPLICATION.youContainer.height = CONTAINER_HEIGHT_OPENED;
> >>         APPLICATION.opponentContainer.height = CONTAINER_HEIGHT_OPENED;
> >>         // rebuilding menuData
> >>         _menuData.removeAll();
> >>         if (_account != DATA_TABLE.you[0]) {
> >>             if (!_account.hasPrivateChatWithYou)
> >>                 addMenuAction(resource_manager.getString("ui",
> >> "icard.startChat"), null,
> >>                         FrontController.startPrivateChat, _account,
> >> false);
> >>             if (!APPLICATION.opponentContainer.contains(this)) {
> >>                 addMenuAction(resource_manager.getString("ui",
> >> "icard.gameInvite"), null, FRONT_CONTROLLER.gameInvite, this.data);
> >>                 addMenuAction(resource_manager.getString("ui",
> >> "icard.tradeInvite"), null, FRONT_CONTROLLER.tradeInvite, this.data);
> >>             }
> >>         } else {
> >>             if (APPLICATION.youContainer.contains(this))
> >>                 addMenuAction(resource_manager.getString("ui",
> >> "icard.signOut"), null, FRONT_CONTROLLER.closeConnection, null);
> >>             if (GAME != null)
> >>                 addMenuAction(resource_manager.getString("ui",
> >> "icard.surrender"), null, GameComponent.surrender);
> >>         }
> >>         if
> (!APPLICATION.bottomBar.isAccountProfileOpened(Account(data)))
> >>             addMenuAction(resource_manager.getString("ui",
> >> "icard.viewProfile"), null, FrontController.openProfileWindow,
> >> this.data);
> >>
> >>         // displaying
> >>         _menu.width = width;
> >>         _menu.show(0, MENU_OFFSET_Y);
> >>         menuContainer.addElement(_menu);
> >>         _isMenuOpened = true;
> >>     }
> >>
> >>
> >>
> >> And the _menu is created in a init() function, called only once, during
> >> the
> >> component's creationComplete.
> >>
> >>         _menu = Menu.createMenu(menuContainer, _menuData, false);
> >>
> >> I'm extremely interested by clues regarding this issue. I'm running a
> >> stress
> >> test for Faëria: Strategy Card Game, the game uses this code. It's a
> >> client/server architecture (AS3/Java), http://faeria.net.
> >>
> >> Cheers
> >> Jiem
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701.html
> >> Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >>
>
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701p2753.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: SystemManager seems to call addChildAt > out of bounds

Posted by Jiem <je...@gmail.com>.
Hey Markus,
Thanks for trying to help me out.
It seems addAllAt is bugged, not addAll. I only use addAll once in my code,
in a very non related area.
My code crashes for another reason... I'm totally out of clue, which is very
annoying because my game goes in permanent beta in two days. :(


Marcus Wilkinson wrote
> Jiem,
> 
> I too was having a few invalid index errors. My specific error was when
> using a Data Group and using addAll() on the Data Provider for that Data
> Group. The issue is here:
> https://issues.apache.org/jira/browse/FLEX-33683
> and the fix here:
> https://github.com/apache/flex-sdk/commit/4a90e9574c63b2ef25870793900a0a225cd59950#frameworks/projects/framework/src/mx/collections/ListCollectionView.as
> 
> I don't know if the issue you are experiencing has the same cause though
> 
> Marcus
> 
> 
> On 13 September 2013 03:52, Jiem &lt;

> jeanmichel.vilain@

> &gt; wrote:
> 
>> Hello
>>
>> I'm working to a project since a long time, I did recently shifted from
>> 4.6
>> to Apache Flex 10.
>> I got this issue and it seems to happen in a non deterministic fashion.
>> I can trigger it in several different ways, the 2 last calls only are the
>> same every time (System Manager:2130 and SystemManager:1753). It's like
>> something gets broken and then the next time I use the PopUpManager, it
>> crashes.
>> I'm starting to believe this is a bug inside Apache Flex, it's been weeks
>> this bug is around, it's very hard to reproduce and I have no step-to.
>>
>> RangeError: Error #2006: The supplied index is out of bounds.
>>         at flash.display::DisplayObjectContainer/addChildAt()
>>         at
>> mx.managers::SystemManager/
>> http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()[E
>> :\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2130]
>>         at
>>
>> mx.managers::SystemManager/addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:1753]
>>         at
>>
>> mx.managers::SystemManager/addChild()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:1736]
>>         at
>>
>> mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\PopUpManagerImpl.as:344]
>>         at
>>
>> mx.managers::PopUpManager$/addPopUp()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\PopUpManager.as:193]
>>         at
>>
>> mx.controls::Menu/show()[E:\dev\4.y\frameworks\projects\mx\src\mx\controls\Menu.as:1648]
>>         at
>>
>> outgame.components::IAccount/openMenu()[D:\Faeria\FaeriaClient\src\outgame\components\IAccount.as:156]
>>         at
>>
>> outgame.components::IAccount/toggleMenu()[D:\Faeria\FaeriaClient\src\outgame\components\IAccount.as:118]
>>
>> This is the code that produced that error stack:
>> private function openMenu():void {
>>         if(_isMenuOpened)
>>             return;
>>         APPLICATION.youContainer.height = CONTAINER_HEIGHT_OPENED;
>>         APPLICATION.opponentContainer.height = CONTAINER_HEIGHT_OPENED;
>>         // rebuilding menuData
>>         _menuData.removeAll();
>>         if (_account != DATA_TABLE.you[0]) {
>>             if (!_account.hasPrivateChatWithYou)
>>                 addMenuAction(resource_manager.getString("ui",
>> "icard.startChat"), null,
>>                         FrontController.startPrivateChat, _account,
>> false);
>>             if (!APPLICATION.opponentContainer.contains(this)) {
>>                 addMenuAction(resource_manager.getString("ui",
>> "icard.gameInvite"), null, FRONT_CONTROLLER.gameInvite, this.data);
>>                 addMenuAction(resource_manager.getString("ui",
>> "icard.tradeInvite"), null, FRONT_CONTROLLER.tradeInvite, this.data);
>>             }
>>         } else {
>>             if (APPLICATION.youContainer.contains(this))
>>                 addMenuAction(resource_manager.getString("ui",
>> "icard.signOut"), null, FRONT_CONTROLLER.closeConnection, null);
>>             if (GAME != null)
>>                 addMenuAction(resource_manager.getString("ui",
>> "icard.surrender"), null, GameComponent.surrender);
>>         }
>>         if (!APPLICATION.bottomBar.isAccountProfileOpened(Account(data)))
>>             addMenuAction(resource_manager.getString("ui",
>> "icard.viewProfile"), null, FrontController.openProfileWindow,
>> this.data);
>>
>>         // displaying
>>         _menu.width = width;
>>         _menu.show(0, MENU_OFFSET_Y);
>>         menuContainer.addElement(_menu);
>>         _isMenuOpened = true;
>>     }
>>
>>
>>
>> And the _menu is created in a init() function, called only once, during
>> the
>> component's creationComplete.
>>
>>         _menu = Menu.createMenu(menuContainer, _menuData, false);
>>
>> I'm extremely interested by clues regarding this issue. I'm running a
>> stress
>> test for Faëria: Strategy Card Game, the game uses this code. It's a
>> client/server architecture (AS3/Java), http://faeria.net.
>>
>> Cheers
>> Jiem
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701.html
>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701p2753.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: SystemManager seems to call addChildAt > out of bounds

Posted by Marcus Wilkinson <wi...@gmail.com>.
Jiem,

I too was having a few invalid index errors. My specific error was when
using a Data Group and using addAll() on the Data Provider for that Data
Group. The issue is here:
https://issues.apache.org/jira/browse/FLEX-33683
and the fix here:
https://github.com/apache/flex-sdk/commit/4a90e9574c63b2ef25870793900a0a225cd59950#frameworks/projects/framework/src/mx/collections/ListCollectionView.as

I don't know if the issue you are experiencing has the same cause though

Marcus


On 13 September 2013 03:52, Jiem <je...@gmail.com> wrote:

> Hello
>
> I'm working to a project since a long time, I did recently shifted from 4.6
> to Apache Flex 10.
> I got this issue and it seems to happen in a non deterministic fashion.
> I can trigger it in several different ways, the 2 last calls only are the
> same every time (System Manager:2130 and SystemManager:1753). It's like
> something gets broken and then the next time I use the PopUpManager, it
> crashes.
> I'm starting to believe this is a bug inside Apache Flex, it's been weeks
> this bug is around, it's very hard to reproduce and I have no step-to.
>
> RangeError: Error #2006: The supplied index is out of bounds.
>         at flash.display::DisplayObjectContainer/addChildAt()
>         at
> mx.managers::SystemManager/
> http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()[E
> :\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2130]
>         at
>
> mx.managers::SystemManager/addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:1753]
>         at
>
> mx.managers::SystemManager/addChild()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:1736]
>         at
>
> mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\PopUpManagerImpl.as:344]
>         at
>
> mx.managers::PopUpManager$/addPopUp()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\PopUpManager.as:193]
>         at
>
> mx.controls::Menu/show()[E:\dev\4.y\frameworks\projects\mx\src\mx\controls\Menu.as:1648]
>         at
>
> outgame.components::IAccount/openMenu()[D:\Faeria\FaeriaClient\src\outgame\components\IAccount.as:156]
>         at
>
> outgame.components::IAccount/toggleMenu()[D:\Faeria\FaeriaClient\src\outgame\components\IAccount.as:118]
>
> This is the code that produced that error stack:
> private function openMenu():void {
>         if(_isMenuOpened)
>             return;
>         APPLICATION.youContainer.height = CONTAINER_HEIGHT_OPENED;
>         APPLICATION.opponentContainer.height = CONTAINER_HEIGHT_OPENED;
>         // rebuilding menuData
>         _menuData.removeAll();
>         if (_account != DATA_TABLE.you[0]) {
>             if (!_account.hasPrivateChatWithYou)
>                 addMenuAction(resource_manager.getString("ui",
> "icard.startChat"), null,
>                         FrontController.startPrivateChat, _account, false);
>             if (!APPLICATION.opponentContainer.contains(this)) {
>                 addMenuAction(resource_manager.getString("ui",
> "icard.gameInvite"), null, FRONT_CONTROLLER.gameInvite, this.data);
>                 addMenuAction(resource_manager.getString("ui",
> "icard.tradeInvite"), null, FRONT_CONTROLLER.tradeInvite, this.data);
>             }
>         } else {
>             if (APPLICATION.youContainer.contains(this))
>                 addMenuAction(resource_manager.getString("ui",
> "icard.signOut"), null, FRONT_CONTROLLER.closeConnection, null);
>             if (GAME != null)
>                 addMenuAction(resource_manager.getString("ui",
> "icard.surrender"), null, GameComponent.surrender);
>         }
>         if (!APPLICATION.bottomBar.isAccountProfileOpened(Account(data)))
>             addMenuAction(resource_manager.getString("ui",
> "icard.viewProfile"), null, FrontController.openProfileWindow, this.data);
>
>         // displaying
>         _menu.width = width;
>         _menu.show(0, MENU_OFFSET_Y);
>         menuContainer.addElement(_menu);
>         _isMenuOpened = true;
>     }
>
>
>
> And the _menu is created in a init() function, called only once, during the
> component's creationComplete.
>
>         _menu = Menu.createMenu(menuContainer, _menuData, false);
>
> I'm extremely interested by clues regarding this issue. I'm running a
> stress
> test for Faëria: Strategy Card Game, the game uses this code. It's a
> client/server architecture (AS3/Java), http://faeria.net.
>
> Cheers
> Jiem
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: SystemManager seems to call addChildAt > out of bounds

Posted by Jiem <je...@gmail.com>.
Sorry for my english mistakes, was in a rush when I typed :-)
I wanted to add that what's most bothering is that I could pass through this
code 10 times without crashing. Only sometimes, this exception will happen,
maybe there's some code elsewhere that corrupts this addChild's behavior.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701p2772.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: SystemManager seems to call addChildAt > out of bounds

Posted by Alex Harui <ah...@adobe.com>.
You could add event listeners to root to see if it is changing
unexpectedly.

Good luck,
-Alex

On 9/19/13 3:50 PM, "Jiem" <je...@gmail.com> wrote:

>Yes that's something I have figured out 3 years ago when I started to work
>on this project. Oh god it was a pain when I understood how bad Flex mixes
>with basic AS3 and its APIs. But I don't give up easily and today it's
>probably one the biggest game project using Flex (http://faeria.net/).
>
>GAME contains a lot of non flex stuff. It contains groups and lots of
>UIcomponent to which I attach pure Sprites and use tweens on them.
>So you mean that maybe that custom tween library does specific stuff on
>the
>root? I've just scanned its source code and there's no occurence of root.
>This API has been written by a harmless, thoughtful guy.
>
>Everything else works perfectly. An option is to find an alternative to
>using Alert. The beta starts tomorrow :-)
>
>
>
>On Fri, Sep 20, 2013 at 12:33 AM, Alex Harui [via Apache Flex Users] <
>ml-node+s2333346n2773h55@n4.nabble.com> wrote:
>
>> The Flex framework is a layer over the Flash Player.  The SystemManager
>>is
>> the framework's wrapper of the Flash 'root'.  You are supposed to only
>>use
>> Flex APIs and avoid low-level, unwrapped Flash APIs unless you really
>>know
>> what you are doing.
>>
>> I can't see anything wrong with the code snippets you've shown us, but
>>it
>> appears you are launching the alert from within a Tween which is not a
>> common practice, but should be ok, but if you have a tween doing
>>low-level
>> Flash API manipulation of the root, that could cause trouble.
>>
>> HTH,
>> -Alex
>>
>> On 9/19/13 2:58 PM, "Jiem" <[hidden
>>email]<http://user/SendEmail.jtp?type=node&node=2773&i=0>>
>> wrote:
>>
>> >I have this other stack trace (before the crash would appear for 2
>> >different
>> >reason, now only this one seems to be left as I fixed the Menu):
>> >
>> >RangeError: Error #2006: L'index indiqué sort des limites.
>> > at flash.display::DisplayObjectContainer/addChildAt()
>> > at
>> >mx.managers::SystemManager/
>> http://www.adobe.com/2006/flex/mx/internal::raw
>> 
>>>Children_addChildAt()[/Users/justinmclean/Documents/ApacheFlex4.10/frame
>>>wo
>>
>> >rks/projects/framework/src/mx/managers/SystemManager.as:2138]
>> > at
>> 
>>>mx.managers::SystemManager/addChildAt()[/Users/justinmclean/Documents/Ap
>>>ac
>>
>> 
>>>heFlex4.10/frameworks/projects/framework/src/mx/managers/SystemManager.a
>>>s:
>>
>> >1761]
>> > at
>> 
>>>mx.managers::SystemManager/addChild()[/Users/justinmclean/Documents/Apac
>>>he
>>
>> 
>>>Flex4.10/frameworks/projects/framework/src/mx/managers/SystemManager.as:
>>>17
>>
>> >44]
>> > at
>> 
>>>mx.managers::PopUpManagerImpl/addPopUp()[/Users/justinmclean/Documents/A
>>>pa
>>
>> 
>>>cheFlex4.10/frameworks/projects/framework/src/mx/managers/PopUpManagerIm
>>>pl
>>
>> >.as:352]
>> > at
>> 
>>>mx.managers::PopUpManager$/addPopUp()[/Users/justinmclean/Documents/Apac
>>>he
>>
>> 
>>>Flex4.10/frameworks/projects/framework/src/mx/managers/PopUpManager.as:2
>>>01
>>
>> >]
>> > at
>> 
>>>mx.controls::Alert$/show()[/Users/justinmclean/Documents/ApacheFlex4.10/
>>>fr
>>
>> >ameworks/projects/mx/src/mx/controls/Alert.as:626]
>> > at
>> 
>>>Function/<anonymous>()[D:\Faeria\FaeriaClient\src\ingame\effect\Victory.
>>>as
>>
>> >:62]
>> > at Function/http://adobe.com/AS3/2006/builtin::apply()
>> > at
>> 
>>>CompleteData/execute()[D:\Faeria\FaeriaClient\src\aze\motion\EazeTween.a
>>>s:
>>
>> >801]
>> > at
>> 
>>>aze.motion::EazeTween$/updateTweens()[D:\Faeria\FaeriaClient\src\aze\mot
>>>io
>>
>> >n\EazeTween.as:213]
>> > at
>> 
>>>aze.motion::EazeTween$/tick()[D:\Faeria\FaeriaClient\src\aze\motion\Eaze
>>>Tw
>>
>> >een.as:125]
>> >
>> >
>> >This where how I call Alert.show:
>> >                    Alert.show(locAlertMessage, locAlertTitle,
>> >Alert.NONMODAL, GAME, alertHandler);
>> >GAME is a SkinnableComponent, thus UIComponent
>> >I have looked into the Flex code, at line 352 of PopUpManagerImpl, he
>> >decides to addChild like this:
>> >children = topMost ? smp.popUpChildren : smp;
>> >if (DisplayObject(window).parent != children)
>> >     children.addChild(DisplayObject(window));
>> >
>> >Is this buggy...? I'm really looking to hear you, you're the only
>>person
>> >who
>> >seems able to bother and who knows his stuff.
>> >
>> >
>> >
>> >--
>> >View this message in context:
>> >
>> 
>>http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-cal
>>l
>> >-addChildAt-out-of-bounds-tp2701p2771.html
>> >Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>>discussion
>> below:
>>
>> 
>>http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-cal
>>l-addChildAt-out-of-bounds-tp2701p2773.html
>>  To unsubscribe from SystemManager seems to call addChildAt > out of
>> bounds, click 
>>here<http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.
>>jtp?macro=unsubscribe_by_code&node=2701&code=amVhbm1pY2hlbC52aWxhaW5AZ21h
>>aWwuY29tfDI3MDF8LTIwODkzNDg3Njg=>
>> .
>> 
>>NAML<http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.
>>jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.
>>naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-n
>>abble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21na
>>bble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email
>>%21nabble%3Aemail.naml>
>>
>
>
>
>-- 
>
>
>*Jean-Michel Vilain
>*Game Designer, Developper +32.498.306.824
>www.abrakam.com // jeanmichel <je...@abrakam.com>.vilain@gmail.com
>
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call
>-addChildAt-out-of-bounds-tp2701p2774.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: SystemManager seems to call addChildAt > out of bounds

Posted by Jiem <je...@gmail.com>.
Yes that's something I have figured out 3 years ago when I started to work
on this project. Oh god it was a pain when I understood how bad Flex mixes
with basic AS3 and its APIs. But I don't give up easily and today it's
probably one the biggest game project using Flex (http://faeria.net/).

GAME contains a lot of non flex stuff. It contains groups and lots of
UIcomponent to which I attach pure Sprites and use tweens on them.
So you mean that maybe that custom tween library does specific stuff on the
root? I've just scanned its source code and there's no occurence of root.
This API has been written by a harmless, thoughtful guy.

Everything else works perfectly. An option is to find an alternative to
using Alert. The beta starts tomorrow :-)



On Fri, Sep 20, 2013 at 12:33 AM, Alex Harui [via Apache Flex Users] <
ml-node+s2333346n2773h55@n4.nabble.com> wrote:

> The Flex framework is a layer over the Flash Player.  The SystemManager is
> the framework's wrapper of the Flash 'root'.  You are supposed to only use
> Flex APIs and avoid low-level, unwrapped Flash APIs unless you really know
> what you are doing.
>
> I can't see anything wrong with the code snippets you've shown us, but it
> appears you are launching the alert from within a Tween which is not a
> common practice, but should be ok, but if you have a tween doing low-level
> Flash API manipulation of the root, that could cause trouble.
>
> HTH,
> -Alex
>
> On 9/19/13 2:58 PM, "Jiem" <[hidden email]<http://user/SendEmail.jtp?type=node&node=2773&i=0>>
> wrote:
>
> >I have this other stack trace (before the crash would appear for 2
> >different
> >reason, now only this one seems to be left as I fixed the Menu):
> >
> >RangeError: Error #2006: L'index indiqué sort des limites.
> > at flash.display::DisplayObjectContainer/addChildAt()
> > at
> >mx.managers::SystemManager/
> http://www.adobe.com/2006/flex/mx/internal::raw
> >Children_addChildAt()[/Users/justinmclean/Documents/ApacheFlex4.10/framewo
>
> >rks/projects/framework/src/mx/managers/SystemManager.as:2138]
> > at
> >mx.managers::SystemManager/addChildAt()[/Users/justinmclean/Documents/Apac
>
> >heFlex4.10/frameworks/projects/framework/src/mx/managers/SystemManager.as:
>
> >1761]
> > at
> >mx.managers::SystemManager/addChild()[/Users/justinmclean/Documents/Apache
>
> >Flex4.10/frameworks/projects/framework/src/mx/managers/SystemManager.as:17
>
> >44]
> > at
> >mx.managers::PopUpManagerImpl/addPopUp()[/Users/justinmclean/Documents/Apa
>
> >cheFlex4.10/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl
>
> >.as:352]
> > at
> >mx.managers::PopUpManager$/addPopUp()[/Users/justinmclean/Documents/Apache
>
> >Flex4.10/frameworks/projects/framework/src/mx/managers/PopUpManager.as:201
>
> >]
> > at
> >mx.controls::Alert$/show()[/Users/justinmclean/Documents/ApacheFlex4.10/fr
>
> >ameworks/projects/mx/src/mx/controls/Alert.as:626]
> > at
> >Function/<anonymous>()[D:\Faeria\FaeriaClient\src\ingame\effect\Victory.as
>
> >:62]
> > at Function/http://adobe.com/AS3/2006/builtin::apply()
> > at
> >CompleteData/execute()[D:\Faeria\FaeriaClient\src\aze\motion\EazeTween.as:
>
> >801]
> > at
> >aze.motion::EazeTween$/updateTweens()[D:\Faeria\FaeriaClient\src\aze\motio
>
> >n\EazeTween.as:213]
> > at
> >aze.motion::EazeTween$/tick()[D:\Faeria\FaeriaClient\src\aze\motion\EazeTw
>
> >een.as:125]
> >
> >
> >This where how I call Alert.show:
> >                    Alert.show(locAlertMessage, locAlertTitle,
> >Alert.NONMODAL, GAME, alertHandler);
> >GAME is a SkinnableComponent, thus UIComponent
> >I have looked into the Flex code, at line 352 of PopUpManagerImpl, he
> >decides to addChild like this:
> >children = topMost ? smp.popUpChildren : smp;
> >if (DisplayObject(window).parent != children)
> >     children.addChild(DisplayObject(window));
> >
> >Is this buggy...? I'm really looking to hear you, you're the only person
> >who
> >seems able to bother and who knows his stuff.
> >
> >
> >
> >--
> >View this message in context:
> >
> http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call
> >-addChildAt-out-of-bounds-tp2701p2771.html
> >Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701p2773.html
>  To unsubscribe from SystemManager seems to call addChildAt > out of
> bounds, click here<http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2701&code=amVhbm1pY2hlbC52aWxhaW5AZ21haWwuY29tfDI3MDF8LTIwODkzNDg3Njg=>
> .
> NAML<http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 


*Jean-Michel Vilain
*Game Designer, Developper +32.498.306.824
www.abrakam.com // jeanmichel <je...@abrakam.com>.vilain@gmail.com




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701p2774.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: SystemManager seems to call addChildAt > out of bounds

Posted by Alex Harui <ah...@adobe.com>.
The Flex framework is a layer over the Flash Player.  The SystemManager is
the framework's wrapper of the Flash 'root'.  You are supposed to only use
Flex APIs and avoid low-level, unwrapped Flash APIs unless you really know
what you are doing.

I can't see anything wrong with the code snippets you've shown us, but it
appears you are launching the alert from within a Tween which is not a
common practice, but should be ok, but if you have a tween doing low-level
Flash API manipulation of the root, that could cause trouble.

HTH,
-Alex

On 9/19/13 2:58 PM, "Jiem" <je...@gmail.com> wrote:

>I have this other stack trace (before the crash would appear for 2
>different
>reason, now only this one seems to be left as I fixed the Menu):
>
>RangeError: Error #2006: L'index indiqué sort des limites.
>	at flash.display::DisplayObjectContainer/addChildAt()
>	at
>mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::raw
>Children_addChildAt()[/Users/justinmclean/Documents/ApacheFlex4.10/framewo
>rks/projects/framework/src/mx/managers/SystemManager.as:2138]
>	at
>mx.managers::SystemManager/addChildAt()[/Users/justinmclean/Documents/Apac
>heFlex4.10/frameworks/projects/framework/src/mx/managers/SystemManager.as:
>1761]
>	at
>mx.managers::SystemManager/addChild()[/Users/justinmclean/Documents/Apache
>Flex4.10/frameworks/projects/framework/src/mx/managers/SystemManager.as:17
>44]
>	at
>mx.managers::PopUpManagerImpl/addPopUp()[/Users/justinmclean/Documents/Apa
>cheFlex4.10/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl
>.as:352]
>	at
>mx.managers::PopUpManager$/addPopUp()[/Users/justinmclean/Documents/Apache
>Flex4.10/frameworks/projects/framework/src/mx/managers/PopUpManager.as:201
>]
>	at
>mx.controls::Alert$/show()[/Users/justinmclean/Documents/ApacheFlex4.10/fr
>ameworks/projects/mx/src/mx/controls/Alert.as:626]
>	at
>Function/<anonymous>()[D:\Faeria\FaeriaClient\src\ingame\effect\Victory.as
>:62]
>	at Function/http://adobe.com/AS3/2006/builtin::apply()
>	at
>CompleteData/execute()[D:\Faeria\FaeriaClient\src\aze\motion\EazeTween.as:
>801]
>	at
>aze.motion::EazeTween$/updateTweens()[D:\Faeria\FaeriaClient\src\aze\motio
>n\EazeTween.as:213]
>	at
>aze.motion::EazeTween$/tick()[D:\Faeria\FaeriaClient\src\aze\motion\EazeTw
>een.as:125]
>
>
>This where how I call Alert.show:
>                    Alert.show(locAlertMessage, locAlertTitle,
>Alert.NONMODAL, GAME, alertHandler);
>GAME is a SkinnableComponent, thus UIComponent
>I have looked into the Flex code, at line 352 of PopUpManagerImpl, he
>decides to addChild like this:
>children = topMost ? smp.popUpChildren : smp;
>if (DisplayObject(window).parent != children)
>     children.addChild(DisplayObject(window));
>
>Is this buggy...? I'm really looking to hear you, you're the only person
>who
>seems able to bother and who knows his stuff.
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call
>-addChildAt-out-of-bounds-tp2701p2771.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: SystemManager seems to call addChildAt > out of bounds

Posted by Jiem <je...@gmail.com>.
I have this other stack trace (before the crash would appear for 2 different
reason, now only this one seems to be left as I fixed the Menu):

RangeError: Error #2006: L'index indiqué sort des limites.
	at flash.display::DisplayObjectContainer/addChildAt()
	at
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/framework/src/mx/managers/SystemManager.as:2138]
	at
mx.managers::SystemManager/addChildAt()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/framework/src/mx/managers/SystemManager.as:1761]
	at
mx.managers::SystemManager/addChild()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/framework/src/mx/managers/SystemManager.as:1744]
	at
mx.managers::PopUpManagerImpl/addPopUp()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as:352]
	at
mx.managers::PopUpManager$/addPopUp()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/framework/src/mx/managers/PopUpManager.as:201]
	at
mx.controls::Alert$/show()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/mx/src/mx/controls/Alert.as:626]
	at
Function/<anonymous>()[D:\Faeria\FaeriaClient\src\ingame\effect\Victory.as:62]
	at Function/http://adobe.com/AS3/2006/builtin::apply()
	at
CompleteData/execute()[D:\Faeria\FaeriaClient\src\aze\motion\EazeTween.as:801]
	at
aze.motion::EazeTween$/updateTweens()[D:\Faeria\FaeriaClient\src\aze\motion\EazeTween.as:213]
	at
aze.motion::EazeTween$/tick()[D:\Faeria\FaeriaClient\src\aze\motion\EazeTween.as:125]


This where how I call Alert.show:
                    Alert.show(locAlertMessage, locAlertTitle,
Alert.NONMODAL, GAME, alertHandler);
GAME is a SkinnableComponent, thus UIComponent
I have looked into the Flex code, at line 352 of PopUpManagerImpl, he
decides to addChild like this:
children = topMost ? smp.popUpChildren : smp;        
if (DisplayObject(window).parent != children)
     children.addChild(DisplayObject(window));

Is this buggy...? I'm really looking to hear you, you're the only person who
seems able to bother and who knows his stuff.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701p2771.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: SystemManager seems to call addChildAt > out of bounds

Posted by Alex Harui <ah...@adobe.com>.
On 9/18/13 2:49 PM, "Jiem" <je...@gmail.com> wrote:

>Thank you, indeed it should be a UIComponent and a Group. I fixed that.
>The
>issue still occurs. I really need a solution to this and have no other
>clue.
>What else do you think could cause this out of index crash?
Lots of things.  Is the stack trace exactly the same?  If so, that would
imply a Menu is still being added as a child.  Otherwise, post the new
stack trace.


>
>
>Alex Harui wrote
>> It looks like the code calls addElement() passing in the menu.  I don't
>> believe Menu is designed to be a child component, only a popup.
>> 
>> -Alex
>> 
>> On 9/12/13 7:52 PM, "Jiem" &lt;
>
>> jeanmichel.vilain@
>
>> &gt; wrote:
>> 
>>>Hello
>>>
>>>I'm working to a project since a long time, I did recently shifted from
>>>4.6
>>>to Apache Flex 10.
>>>I got this issue and it seems to happen in a non deterministic fashion.
>>>I can trigger it in several different ways, the 2 last calls only are
>>>the
>>>same every time (System Manager:2130 and SystemManager:1753). It's like
>>>something gets broken and then the next time I use the PopUpManager, it
>>>crashes.
>>>I'm starting to believe this is a bug inside Apache Flex, it's been
>>>weeks
>>>this bug is around, it's very hard to reproduce and I have no step-to.
>>>
>>>RangeError: Error #2006: The supplied index is out of bounds.
>>>	at flash.display::DisplayObjectContainer/addChildAt()
>>>	at
>>>mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::r
>>>aw
>>>Children_addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\ma
>>>na
>>>gers\SystemManager.as:2130]
>>>	at
>>>mx.managers::SystemManager/addChildAt()[E:\dev\4.y\frameworks\projects\f
>>>ra
>>>mework\src\mx\managers\SystemManager.as:1753]
>>>	at
>>>mx.managers::SystemManager/addChild()[E:\dev\4.y\frameworks\projects\fra
>>>me
>>>work\src\mx\managers\SystemManager.as:1736]
>>>	at
>>>mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\4.y\frameworks\projects\
>>>fr
>>>amework\src\mx\managers\PopUpManagerImpl.as:344]
>>>	at
>>>mx.managers::PopUpManager$/addPopUp()[E:\dev\4.y\frameworks\projects\fra
>>>me
>>>work\src\mx\managers\PopUpManager.as:193]
>>>	at
>>>mx.controls::Menu/show()[E:\dev\4.y\frameworks\projects\mx\src\mx\contro
>>>ls
>>>\Menu.as:1648]
>>>	at
>>>outgame.components::IAccount/openMenu()[D:\Faeria\FaeriaClient\src\outga
>>>me
>>>\components\IAccount.as:156]
>>>	at
>>>outgame.components::IAccount/toggleMenu()[D:\Faeria\FaeriaClient\src\out
>>>ga
>>>me\components\IAccount.as:118]
>>>
>>>This is the code that produced that error stack:
>>>private function openMenu():void {
>>>        if(_isMenuOpened)
>>>            return;
>>>        APPLICATION.youContainer.height = CONTAINER_HEIGHT_OPENED;
>>>        APPLICATION.opponentContainer.height = CONTAINER_HEIGHT_OPENED;
>>>        // rebuilding menuData
>>>        _menuData.removeAll();
>>>        if (_account != DATA_TABLE.you[0]) {
>>>            if (!_account.hasPrivateChatWithYou)
>>>                addMenuAction(resource_manager.getString("ui",
>>>"icard.startChat"), null,
>>>                        FrontController.startPrivateChat, _account,
>>>false);
>>>            if (!APPLICATION.opponentContainer.contains(this)) {
>>>                addMenuAction(resource_manager.getString("ui",
>>>"icard.gameInvite"), null, FRONT_CONTROLLER.gameInvite, this.data);
>>>                addMenuAction(resource_manager.getString("ui",
>>>"icard.tradeInvite"), null, FRONT_CONTROLLER.tradeInvite, this.data);
>>>            }
>>>        } else {
>>>            if (APPLICATION.youContainer.contains(this))
>>>                addMenuAction(resource_manager.getString("ui",
>>>"icard.signOut"), null, FRONT_CONTROLLER.closeConnection, null);
>>>            if (GAME != null)
>>>                addMenuAction(resource_manager.getString("ui",
>>>"icard.surrender"), null, GameComponent.surrender);
>>>        }
>>>        if 
>>>(!APPLICATION.bottomBar.isAccountProfileOpened(Account(data)))
>>>            addMenuAction(resource_manager.getString("ui",
>>>"icard.viewProfile"), null, FrontController.openProfileWindow,
>>>this.data);
>>>
>>>        // displaying
>>>        _menu.width = width;
>>>        _menu.show(0, MENU_OFFSET_Y);
>>>        menuContainer.addElement(_menu);
>>>        _isMenuOpened = true;
>>>    }
>>>
>>>
>>>
>>>And the _menu is created in a init() function, called only once, during
>>>the
>>>component's creationComplete.
>>>
>>>        _menu = Menu.createMenu(menuContainer, _menuData, false);
>>>
>>>I'm extremely interested by clues regarding this issue. I'm running a
>>>stress
>>>test for Faëria: Strategy Card Game, the game uses this code. It's a
>>>client/server architecture (AS3/Java), http://faeria.net.
>>>
>>>Cheers
>>>Jiem
>>>
>>>
>>>
>>>--
>>>View this message in context:
>>>http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-ca
>>>ll
>>>-addChildAt-out-of-bounds-tp2701.html
>>>Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
>
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call
>-addChildAt-out-of-bounds-tp2701p2752.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: SystemManager seems to call addChildAt > out of bounds

Posted by Jiem <je...@gmail.com>.
Thank you, indeed it should be a UIComponent and a Group. I fixed that. The
issue still occurs. I really need a solution to this and have no other clue.
What else do you think could cause this out of index crash?


Alex Harui wrote
> It looks like the code calls addElement() passing in the menu.  I don't
> believe Menu is designed to be a child component, only a popup.
> 
> -Alex
> 
> On 9/12/13 7:52 PM, "Jiem" &lt;

> jeanmichel.vilain@

> &gt; wrote:
> 
>>Hello
>>
>>I'm working to a project since a long time, I did recently shifted from
>>4.6
>>to Apache Flex 10.
>>I got this issue and it seems to happen in a non deterministic fashion.
>>I can trigger it in several different ways, the 2 last calls only are the
>>same every time (System Manager:2130 and SystemManager:1753). It's like
>>something gets broken and then the next time I use the PopUpManager, it
>>crashes.
>>I'm starting to believe this is a bug inside Apache Flex, it's been weeks
>>this bug is around, it's very hard to reproduce and I have no step-to.
>>
>>RangeError: Error #2006: The supplied index is out of bounds.
>>	at flash.display::DisplayObjectContainer/addChildAt()
>>	at
>>mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::raw
>>Children_addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\mana
>>gers\SystemManager.as:2130]
>>	at
>>mx.managers::SystemManager/addChildAt()[E:\dev\4.y\frameworks\projects\fra
>>mework\src\mx\managers\SystemManager.as:1753]
>>	at
>>mx.managers::SystemManager/addChild()[E:\dev\4.y\frameworks\projects\frame
>>work\src\mx\managers\SystemManager.as:1736]
>>	at
>>mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\4.y\frameworks\projects\fr
>>amework\src\mx\managers\PopUpManagerImpl.as:344]
>>	at
>>mx.managers::PopUpManager$/addPopUp()[E:\dev\4.y\frameworks\projects\frame
>>work\src\mx\managers\PopUpManager.as:193]
>>	at
>>mx.controls::Menu/show()[E:\dev\4.y\frameworks\projects\mx\src\mx\controls
>>\Menu.as:1648]
>>	at
>>outgame.components::IAccount/openMenu()[D:\Faeria\FaeriaClient\src\outgame
>>\components\IAccount.as:156]
>>	at
>>outgame.components::IAccount/toggleMenu()[D:\Faeria\FaeriaClient\src\outga
>>me\components\IAccount.as:118]
>>
>>This is the code that produced that error stack:
>>private function openMenu():void {
>>        if(_isMenuOpened)
>>            return;
>>        APPLICATION.youContainer.height = CONTAINER_HEIGHT_OPENED;
>>        APPLICATION.opponentContainer.height = CONTAINER_HEIGHT_OPENED;
>>        // rebuilding menuData
>>        _menuData.removeAll();
>>        if (_account != DATA_TABLE.you[0]) {
>>            if (!_account.hasPrivateChatWithYou)
>>                addMenuAction(resource_manager.getString("ui",
>>"icard.startChat"), null,
>>                        FrontController.startPrivateChat, _account,
>>false);
>>            if (!APPLICATION.opponentContainer.contains(this)) {
>>                addMenuAction(resource_manager.getString("ui",
>>"icard.gameInvite"), null, FRONT_CONTROLLER.gameInvite, this.data);
>>                addMenuAction(resource_manager.getString("ui",
>>"icard.tradeInvite"), null, FRONT_CONTROLLER.tradeInvite, this.data);
>>            }
>>        } else {
>>            if (APPLICATION.youContainer.contains(this))
>>                addMenuAction(resource_manager.getString("ui",
>>"icard.signOut"), null, FRONT_CONTROLLER.closeConnection, null);
>>            if (GAME != null)
>>                addMenuAction(resource_manager.getString("ui",
>>"icard.surrender"), null, GameComponent.surrender);
>>        }
>>        if (!APPLICATION.bottomBar.isAccountProfileOpened(Account(data)))
>>            addMenuAction(resource_manager.getString("ui",
>>"icard.viewProfile"), null, FrontController.openProfileWindow, this.data);
>>
>>        // displaying
>>        _menu.width = width;
>>        _menu.show(0, MENU_OFFSET_Y);
>>        menuContainer.addElement(_menu);
>>        _isMenuOpened = true;
>>    }
>>
>>
>>
>>And the _menu is created in a init() function, called only once, during
>>the
>>component's creationComplete.
>>
>>        _menu = Menu.createMenu(menuContainer, _menuData, false);
>>
>>I'm extremely interested by clues regarding this issue. I'm running a
>>stress
>>test for Faëria: Strategy Card Game, the game uses this code. It's a
>>client/server architecture (AS3/Java), http://faeria.net.
>>
>>Cheers
>>Jiem
>>
>>
>>
>>--
>>View this message in context:
>>http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call
>>-addChildAt-out-of-bounds-tp2701.html
>>Sent from the Apache Flex Users mailing list archive at Nabble.com.





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call-addChildAt-out-of-bounds-tp2701p2752.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: SystemManager seems to call addChildAt > out of bounds

Posted by Alex Harui <ah...@adobe.com>.
It looks like the code calls addElement() passing in the menu.  I don't
believe Menu is designed to be a child component, only a popup.

-Alex

On 9/12/13 7:52 PM, "Jiem" <je...@gmail.com> wrote:

>Hello
>
>I'm working to a project since a long time, I did recently shifted from
>4.6
>to Apache Flex 10.
>I got this issue and it seems to happen in a non deterministic fashion.
>I can trigger it in several different ways, the 2 last calls only are the
>same every time (System Manager:2130 and SystemManager:1753). It's like
>something gets broken and then the next time I use the PopUpManager, it
>crashes.
>I'm starting to believe this is a bug inside Apache Flex, it's been weeks
>this bug is around, it's very hard to reproduce and I have no step-to.
>
>RangeError: Error #2006: The supplied index is out of bounds.
>	at flash.display::DisplayObjectContainer/addChildAt()
>	at
>mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::raw
>Children_addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\mana
>gers\SystemManager.as:2130]
>	at
>mx.managers::SystemManager/addChildAt()[E:\dev\4.y\frameworks\projects\fra
>mework\src\mx\managers\SystemManager.as:1753]
>	at
>mx.managers::SystemManager/addChild()[E:\dev\4.y\frameworks\projects\frame
>work\src\mx\managers\SystemManager.as:1736]
>	at
>mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\4.y\frameworks\projects\fr
>amework\src\mx\managers\PopUpManagerImpl.as:344]
>	at
>mx.managers::PopUpManager$/addPopUp()[E:\dev\4.y\frameworks\projects\frame
>work\src\mx\managers\PopUpManager.as:193]
>	at
>mx.controls::Menu/show()[E:\dev\4.y\frameworks\projects\mx\src\mx\controls
>\Menu.as:1648]
>	at
>outgame.components::IAccount/openMenu()[D:\Faeria\FaeriaClient\src\outgame
>\components\IAccount.as:156]
>	at
>outgame.components::IAccount/toggleMenu()[D:\Faeria\FaeriaClient\src\outga
>me\components\IAccount.as:118]
>
>This is the code that produced that error stack:
>private function openMenu():void {
>        if(_isMenuOpened)
>            return;
>        APPLICATION.youContainer.height = CONTAINER_HEIGHT_OPENED;
>        APPLICATION.opponentContainer.height = CONTAINER_HEIGHT_OPENED;
>        // rebuilding menuData
>        _menuData.removeAll();
>        if (_account != DATA_TABLE.you[0]) {
>            if (!_account.hasPrivateChatWithYou)
>                addMenuAction(resource_manager.getString("ui",
>"icard.startChat"), null,
>                        FrontController.startPrivateChat, _account,
>false);
>            if (!APPLICATION.opponentContainer.contains(this)) {
>                addMenuAction(resource_manager.getString("ui",
>"icard.gameInvite"), null, FRONT_CONTROLLER.gameInvite, this.data);
>                addMenuAction(resource_manager.getString("ui",
>"icard.tradeInvite"), null, FRONT_CONTROLLER.tradeInvite, this.data);
>            }
>        } else {
>            if (APPLICATION.youContainer.contains(this))
>                addMenuAction(resource_manager.getString("ui",
>"icard.signOut"), null, FRONT_CONTROLLER.closeConnection, null);
>            if (GAME != null)
>                addMenuAction(resource_manager.getString("ui",
>"icard.surrender"), null, GameComponent.surrender);
>        }
>        if (!APPLICATION.bottomBar.isAccountProfileOpened(Account(data)))
>            addMenuAction(resource_manager.getString("ui",
>"icard.viewProfile"), null, FrontController.openProfileWindow, this.data);
>
>        // displaying
>        _menu.width = width;
>        _menu.show(0, MENU_OFFSET_Y);
>        menuContainer.addElement(_menu);
>        _isMenuOpened = true;
>    }
>
>
>
>And the _menu is created in a init() function, called only once, during
>the
>component's creationComplete.
>
>        _menu = Menu.createMenu(menuContainer, _menuData, false);
>
>I'm extremely interested by clues regarding this issue. I'm running a
>stress
>test for Faëria: Strategy Card Game, the game uses this code. It's a
>client/server architecture (AS3/Java), http://faeria.net.
>
>Cheers
>Jiem
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/SystemManager-seems-to-call
>-addChildAt-out-of-bounds-tp2701.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.