9 Replies Latest reply on May 18, 2011 5:34 PM by josh_on

    textLayout error 1009

    davy zhang Level 1

      I have a web chat room application used textflow to render the user message embed swf emotions. After I updated to flex 4.5 sdk, I get these errors oftenly and I just can't debug with it so I don't where went wrong exactly. Please Help me out , or just point out in what situtation will cause this error

       

      Thanks a lot

       

      TypeError: Error #1009:

             at flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::updateGraphics()[C:\Vellum\branches\v2\2.0\d ev\output\openSource\textLayout\src\flashx\textLayout\container\ContainerController.as:318 2]

             at flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::updateCompositionShapes()[C:\Vellum\branches \v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\ContainerControll er.as:3080]

             at flashx.textLayout.compose::StandardFlowComposer/updateCompositionShapes()[C:\Vellum\branc hes\v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComp oser.as:616]

             at flashx.textLayout.compose::StandardFlowComposer/updateToController()[C:\Vellum\branches\v 2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer. as:559]

             at flashx.textLayout.compose::StandardFlowComposer/updateAllControllers()[C:\Vellum\branches \v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowCompose r.as:517]

             at flashx.textLayout.container::TextContainerManager/updateContainer()[C:\Vellum\branches\v2 \2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager .as:1343]

             at spark.components::RichEditableText/updateDisplayList()[E:\dev\hero_private\frameworks\pro jects\spark\src\spark\components\RichEditableText.as:2944]

             at mx.core::UIComponent/validateDisplayList()[E:\dev\hero_private\frameworks\projects\framew ork\src\mx\core\UIComponent.as:8989]

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

             at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\hero_private\frameworks\project s\framework\src\mx\managers\LayoutManager.as:819]

             at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\hero_private\frameworks \projects\framework\src\mx\managers\LayoutManager.as:1180]

        • 1. Re: textLayout error 1009
          Flex harUI Adobe Employee

          File a bug with a small test case.

          • 2. Re: textLayout error 1009
            davy zhang Level 1

            this is where the problem...

             

            It happened in random cases, I can not even know how to reproduce it...

             

            so I ask here to see if there is some clues

             

            if you can tell me   these errors' common situation  that might be helpful

             

            I am still digging on it, hope I can reproduce it later

            • 3. Re: textLayout error 1009
              Flex harUI Adobe Employee

              Looks like it could have something to do with scrolling graphics in and out

              of view.

              1 person found this helpful
              • 4. Re: textLayout error 1009
                davy zhang Level 1

                Ok,I reproduce it with the code below, replace the 04.swf with any small swf animation is ok

                 

                click the button will raise the exception

                 

                Is there any workaround ?

                 

                <?xml version="1.0" encoding="utf-8"?>

                <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009

                                               xmlns:s="library://ns.adobe.com/flex/spark"  creationComplete="application1_creationCompleteHandler(event)"

                                               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="400" minHeight="300" xmlns:local="*"

                                                >

                         <fx:Script>

                                   <![CDATA[

                                            import flashx.textLayout.elements.InlineGraphicElement;

                                            import flashx.textLayout.elements.ParagraphElement;

                                            import flashx.textLayout.elements.TextFlow;

                                            import flashx.textLayout.formats.WhiteSpaceCollapse;

                 

                                            import mx.events.FlexEvent;

                 

                                            import spark.utils.TextFlowUtil;

                 

                                            [Bindable]

                                            private var chatTLF:TextFlow;

                                            protected function application1_creationCompleteHandler(event:FlexEvent):void

                                            {

                                                    var str:String = "";

                                                     var i:int = 30;

                                                     while(i>0){

                                                               str += i+"\n"

                                                               i--;

                                                     }

                 

                 

                                                    chatTLF = TextFlowUtil.importFromString(str,WhiteSpaceCollapse.PRESERVE);

                 

                                                     var p:ParagraphElement = new ParagraphElement();

                                                     var graphicElement:InlineGraphicElement = new InlineGraphicElement();

                                                     graphicElement.source = "04.swf";

                                                     graphicElement.width  = 28;

                                                     graphicElement.height = 30;

                                                     p.addChild(graphicElement);

                 

                                                     chatTLF.addChildAt(0,p);

                                            }

                 

                 

                 

                                            protected function chatContentBox_updateCompleteHandler(event:FlexEvent):void

                                            {

                                                     callLater(function():void{

                                                               scroller.verticalScrollBar.viewport.verticalScrollPosition = scroller.verticalScrollBar.maximum;

                                                     })

                                            }

                 

                                            protected function button1_clickHandler(event:MouseEvent):void

                                            {

                                                     var tf:TextFlow = TextFlowUtil.importFromString("aaa",WhiteSpaceCollapse.PRESERVE);

                                                     for each(var p:ParagraphElement in tf.mxmlChildren){

                                                               chatTLF.addChild(p);

                                                     }

                                            }

                 

                                   ]]>

                         </fx:Script>

                         <fx:Declarations>

                                   <!-- Place non-visual elements (e.g., services, value objects) here -->

                         </fx:Declarations>

                 

                         <s:Scroller id="scroller" x="10" y="10" width="138" height="226" verticalScrollPolicy="on">

                                   <s:RichEditableText id="chatContentBox" editable="false" focusEnabled="false"  updateComplete="chatContentBox_updateCompleteHandler(event)"

                                                                                 textAlign="left" textFlow="{chatTLF}"/>

                         </s:Scroller >

                 

                         <s:Button x="62" y="288" click="button1_clickHandler(event)" label="click me"/>

                </s:Application>

                • 5. Re: textLayout error 1009
                  bellesoft Level 1

                  We are having the same issues when displaying an image (png) loaded remotely into the text flow of the spark TextArea control

                   

                  TypeError: Error #1009: Cannot access a property or method of a null object reference.
                      at flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::updateGraphics()
                      at flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::updateCompositionShapes()

                   

                  this is after we updated to burrito release 4.5 sdk fromt the beta and recompiled our app with that. Was working fine before.

                  • 6. Re: textLayout error 1009
                    Flex harUI Adobe Employee

                    It has been identified as a bug.  The TLF team has fixed it, but I'm not

                    sure when it will be integrated into an SDK build.

                    • 7. Re: textLayout error 1009
                      bellesoft Level 1

                      thanks for the reply!

                      Do you know if there is a workaround? is there a bug number/link?

                      • 8. Re: textLayout error 1009
                        Flex harUI Adobe Employee

                        http://bugs.adobe.com/jira/browse/SDK-29654

                         

                        No known workaround as of yet.  There is a TextLayoutFramework forum that

                        might have more information.

                        1 person found this helpful
                        • 9. Re: textLayout error 1009
                          josh_on Level 1

                          This bug is being discussed here:


                          http://forums.adobe.com/message/3674136#3674136