Skip to main content
Inspiring
February 20, 2009
Answered

Getting error in Compose call

  • February 20, 2009
  • 5 replies
  • 1007 views
In the latest Gumbo release 5022, using TLF, I am getting the following error after I call compose...

Error: Error #2175: One or more elements of the content of the TextBlock has a null ElementFormat.
at flash.text.engine::TextBlock/DoCreateTextLine()
at flash.text.engine::TextBlock/createTextLine()
at flashx.textLayout.compose::ComposeState/createTextLine()
at flashx.textLayout.compose::ComposeState/composeNextLine()
at flashx.textLayout.compose::BaseCompose/composeParagraphElement()
at flashx.textLayout.compose::BaseCompose/composeBlockElement()
at flashx.textLayout.compose::BaseCompose/composeBlockElement()
at flashx.textLayout.compose::BaseCompose/composeBlockElement()
at flashx.textLayout.compose::BaseCompose/composeBlockElement()
at flashx.textLayout.compose::BaseCompose/composeInternal()
at flashx.textLayout.compose::ComposeState/composeInternal()
at flashx.textLayout.compose::BaseCompose/composeTextFlow()
at flashx.textLayout.compose::ComposeState/composeTextFlow()
at flashx.textLayout.compose::StandardFlowComposer/ http://ns.adobe.com/textLayout/internal/2008::callTheComposer()
at flashx.textLayout.compose::StandardFlowComposer/internalCompose()
at flashx.textLayout.compose::StandardFlowComposer/compose()

When I look at the container, prior to the call, it has a content length of 0, so maybe this is a proper error. Still, I am switching over from the previous TLF format API (Container/Paragraph/Character to TextLayoutFormat), and I get this error where I never did previously.

From a code standpoint, I am essentially uising the recomputeContainers function from the Pagination Example that has been on your blog for a while, it loops to create 10 containers at a time, then compose call is made, and this process happens until the full content has been composed. This loop works a few times, but then around the 4th time (I have 30 pages and 40 controllers), I get the error on the call to compose.

My migration was not very creative, I simply found everywhere that I was using the previous format APIs and changed them to the TextLayoutFormat. Additionally, I am doing a significant TextFilter.import call from markup of which I did not make any changes to for the migration (do i need to?) at all.

Is there something in the migration step that I am missing, or is there a specific reason why Compose generates this exception now versus previous releases of Vellum/
Thanks for you attention to this,
Tim
This topic has been closed for replies.
Correct answer brian_thomas2
This has been fixed as of build 377 (not yet released).

5 replies

Adobe Employee
February 20, 2009
And thanks very much for the report and the nicely isolated markup. It's really helpful and much appreciated.

Richard
brian_thomas2
Adobe Employee
brian_thomas2Correct answer
Adobe Employee
February 23, 2009
This has been fixed as of build 377 (not yet released).
Adobe Employee
February 20, 2009
Yes. I saved it out as an xml file and imported it into one of our test apps. I got the same error.

Richard
tpf70Author
Inspiring
February 20, 2009
One other note...
there also seems to be some relation to size of the flow. I can use my markup with the empty div numerous amounts of times as long as the last couple of loops have the div with the p and span.... until it gets to be a certain size and then I get the error as stated above regardless.
Adobe Employee
February 20, 2009
Thanks for the example. The markup is completely legal. It's a bug.

Richard
tpf70Author
Inspiring
February 20, 2009
I dont mean to be redundant, but I want to be sure I am not doing something ridiculously wrong somewhere...

Did you try my sample markup and get the same error?
Thanks,
Tim
Adobe Employee
February 20, 2009
I've seen the bug but don't quite have the formula to reproduce it.

Your porting sounds fine. The only thing I can think of to watch out for is styles that have changed.
tpf70Author
Inspiring
February 20, 2009
I have some markup that causes the error in the Pagination example when used as the import text instead of the Alice in Wonderland text.

The behaviour is bizarre, because if you use the content markup (the div with id='D20070324' and its children) once or twice, it usually composes, however, if you put the content in the markup 3 or 4 times(as in the example below), it fails.

The behavior seems related to the ending Div that is empty. If I change it to:
<div id='commentsdiv8944'><p><span></span></p></div>
Then everything renders.

Is having some content in a Div a new requirement or is this a bug?

Thanks,
Tim