7 Replies Latest reply on Dec 8, 2010 12:00 PM by John Wolfsteiner

    Importing textflow into textarea freezes Flash player

    schipmold

      I'm running into an issue when loading textflow content into a spark textarea and was wondering if someone has seen this behaviour before.

       

      I'm retrieving textflow xml from a server and displaying this in a textarea so the user can edit it and save it back to the database.

      This all works just fine in 99% of the cases, but I've had two reports now where users cant open the item anymore and their browser freezes.

       

      After troubleshooting I noticed that flash player actually times out (see error below) when it load particular textflow whereas practically identical textflow loads and renders in half a second.

       

      While trying to eliminate possible causes in the textflow i came to the following three xml's.

       

      The first does NOT load and freezes flash player for ages before timing out.

      Both the second and third xmls work just fine and load in a split second...

       

      The difference between #1 and #2 is the length of a string in a span.

      The difference between #1 and #3 is the presence of a link.

       

      Does anyone have any idea what may be causing this? I really can't figure it out

       

      Thanks

      Skip

       

      Example textflow:

      <TextFlow whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"><p><span>"DDDDDDDDDDDDD jkljljlkjkljk lj klj klj kdjfkl jkfdj klfkj klfj fdkljg klfdjg fkjgkldjglk dfjgklfdj klf jgkfdjgdj kljgklfjh djfhjfdhjhg jkfdhg jfhg kjdfh hjdfkh gjkhfd gjkhfdg jfh gjfdgjkhfdjgkhjkghfdjk hgjkdfhglkdfj gkldfj kl</span></p><p><span></span></p><p><span>  glkjglkdjklgdjfk gjkdj gklfjg dklfjg kldfjgkl jfdklg jfkldjgklfdjg kdfjgkl dfjkg jfdklgj klfdjgklfdj gkldfj gkljd klgjdfkl gjdklf jgkldf jgkldfjgkljdfklg jdfkljg dfkjg klfdj gkldfjglkdhgjhdfjhjdkhgjdkfhglkdfjgkldfjkgljdklgjkl jkkfj lkfj dfklg jkdfjg kldfj gklgj fdklgj dklfjklj   gjdlkfj gkldfj gkldfjgkldfjgkl dfj lkd jkldfjkgjkl gkldfj gkljgklgjdklgj kldfjg kdfjg kljdfgjdfkljgkldjkgjfklgjd gkjdjfdkl gjlfdkjkldfh</span></p><p><span></span></p><p direction="ltr" justificationRule="auto" justificationStyle="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="start" textAlignLast="start" textIndent="0" textJustify="interWord"><a href="http://www.flickr.com/photos/"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#0000ff" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="device" fontSize="12" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textDecoration="underline" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">hhhhhhh</span></a></p></TextFlow>

       

      <TextFlow whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"><p><span>"DDDDDDDDDDDDD jkljljlkjkljk lj klj klj kdjfkl jkfdj klfkj klfj fdkljg klfdjg fkjgkldjglk dfjgklfdj klf jgkfdjgdj kljgklfjh djfhjfdhjhg jkfdhg jfhg kjdfh hjdfkh gjkhfd gjkhfdg jfh gjfdgjkhfdjgkhjkghfdjk hgjkdfhglkdfj gkldfj kl</span></p><p><span></span></p><p><span>  glkjglkdjklgdjfk gjkdj gklfjg dklfjg</span></p><p><span></span></p><p direction="ltr" justificationRule="auto" justificationStyle="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="start" textAlignLast="start" textIndent="0" textJustify="interWord"><a href="http://www.flickr.com/photos/"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#0000ff" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="device" fontSize="12" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textDecoration="underline" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">hhhhhhh</span></a></p></TextFlow>

       

      <TextFlow whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"><p><span>"DDDDDDDDDDDDD jkljljlkjkljk lj klj klj kdjfkl jkfdj klfkj klfj fdkljg klfdjg fkjgkldjglk dfjgklfdj klf jgkfdjgdj kljgklfjh djfhjfdhjhg jkfdhg jfhg kjdfh hjdfkh gjkhfd gjkhfdg jfh gjfdgjkhfdjgkhjkghfdjk hgjkdfhglkdfj gkldfj kl</span></p><p><span></span></p><p><span>  glkjglkdjklgdjfk gjkdj gklfjg dklfjg kldfjgkl jfdklg jfkldjgklfdjg kdfjgkl dfjkg jfdklgj klfdjgklfdj gkldfj gkljd klgjdfkl gjdklf jgkldf jgkldfjgkljdfklg jdfkljg dfkjg klfdj gkldfjglkdhgjhdfjhjdkhgjdkfhglkdfjgkldfjkgljdklgjkl jkkfj lkfj dfklg jkdfjg kldfj gklgj fdklgj dklfjklj   gjdlkfj gkldfj gkldfjgkldfjgkl dfj lkd jkldfjkgjkl gkldfj gkljgklgjdklgj kldfjg kdfjg kljdfgjdfkljgkldjkgjfklgjd gkjdjfdkl gjlfdkjkldfh</span></p><p><span></span></p><p direction="ltr" justificationRule="auto" justificationStyle="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="start" textAlignLast="start" textIndent="0" textJustify="interWord"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#0000ff" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="device" fontSize="12" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textDecoration="underline" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">hhhhhhh</span></p></TextFlow>

       

       

      Importing of textflow into textarea:

       

      var flow:TextFlow = TextFlowUtil.importFromString(textXMLString, "preserve");

      flow.whiteSpaceCollapse = "preserve";

      editor.textFlow = flow;

       

       

      Error when flash player times out:

       

      Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.

      at flashx.textLayout.container::ContainerController/fillShapeChildren()

      at flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::updateCompositionShapes()

      at flashx.textLayout.compose::StandardFlowComposer/updateCompositionShapes()

      at flashx.textLayout.compose::StandardFlowComposer/updateToController()

      at flashx.textLayout.compose::StandardFlowComposer/updateAllControllers()

      at flashx.textLayout.container::TextContainerManager/updateContainer()

      at spark.components::RichEditableText/updateDisplayList()

      at mx.core::UIComponent/validateDisplayList()

      at mx.managers::LayoutManager/validateDisplayList()

      at mx.managers::LayoutManager/doPhasedInstantiation()

      at mx.managers::LayoutManager/doPhasedInstantiationCallback()