flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: SystemManager seems to call addChildAt > out of bounds
Date Thu, 19 Sep 2013 22:59:52 GMT
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" <jeanmichel.vilain@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 <jeanmichel@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.


Mime
View raw message