Question
Null Exception During updateContainer()
I've been seeing an intermittent exception getting thrown
sometimes during the updateContainer() call in the flow composer.
It only seems to occur when an updateAllContainers() call is
triggered during flushPendingOperations() in EditManager's enter
frame handler method. It also seems to be more reproducible with
longer text flows (length > 20000), when you are editing closer
to the top of the text flow, and when you type faster. I can
usually reproduce this within a few minutes if I paste in a lot of
text and then click around in different places near the top of the
flow and start typing quickly. Also, it seems to have something to
do with a new line being created somewhere in the middle of the
flow and maybe the new line is not initialized or created when the
enter frame handler happens to trigger a call to update the
containers. I haven't been able to pinpoint the exact scenario, but
I have never seen this error occur outside of the context of
EditManager's enterFrameHandler method.
Here are a few stacktraces for the errors that occur in sequence when this situation occurs:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at flashx.textLayout.compose::StandardFlowComposer/releaseLines()
at flashx.textLayout.compose::StandardFlowComposer/updateContainer()
at flashx.textLayout.compose::StandardFlowComposer/updateAllContainers()
at flashx.textLayout.edit::EditManager/updateAllContainers()
at flashx.textLayout.edit::EditManager/finalizeDo()
at flashx.textLayout.edit::EditManager/doOperation()
at flashx.textLayout.edit::EditManager/flushPendingOperations()
at flashx.textLayout.edit::SelectionManager/enterFrameHandler()
ArgumentError: Error #2004: One of the parameters is invalid.
at Error$/throwError()
at flash.text.engine::TextBlock/createTextLine()
at flashx.textLayout.elements::TextFlowLine/ http://ns.adobe.com/textLayout/internal/2008::recreateTextLine()
at flashx.textLayout.elements::TextFlowLine/getTextLine()
at flashx.textLayout.compose::StandardFlowComposer/releaseLines()
at flashx.textLayout.compose::StandardFlowComposer/updateContainer()
at flashx.textLayout.compose::StandardFlowComposer/updateAllContainers()
at flashx.textLayout.edit::EditManager/updateAllContainers()
at flashx.textLayout.edit::EditManager/finalizeDo()
at flashx.textLayout.edit::EditManager/doOperation()
at flashx.textLayout.edit::EditManager/flushPendingOperations()
at flashx.textLayout.edit::SelectionManager/enterFrameHandler()
Thanks,
Brent
Here are a few stacktraces for the errors that occur in sequence when this situation occurs:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at flashx.textLayout.compose::StandardFlowComposer/releaseLines()
at flashx.textLayout.compose::StandardFlowComposer/updateContainer()
at flashx.textLayout.compose::StandardFlowComposer/updateAllContainers()
at flashx.textLayout.edit::EditManager/updateAllContainers()
at flashx.textLayout.edit::EditManager/finalizeDo()
at flashx.textLayout.edit::EditManager/doOperation()
at flashx.textLayout.edit::EditManager/flushPendingOperations()
at flashx.textLayout.edit::SelectionManager/enterFrameHandler()
ArgumentError: Error #2004: One of the parameters is invalid.
at Error$/throwError()
at flash.text.engine::TextBlock/createTextLine()
at flashx.textLayout.elements::TextFlowLine/ http://ns.adobe.com/textLayout/internal/2008::recreateTextLine()
at flashx.textLayout.elements::TextFlowLine/getTextLine()
at flashx.textLayout.compose::StandardFlowComposer/releaseLines()
at flashx.textLayout.compose::StandardFlowComposer/updateContainer()
at flashx.textLayout.compose::StandardFlowComposer/updateAllContainers()
at flashx.textLayout.edit::EditManager/updateAllContainers()
at flashx.textLayout.edit::EditManager/finalizeDo()
at flashx.textLayout.edit::EditManager/doOperation()
at flashx.textLayout.edit::EditManager/flushPendingOperations()
at flashx.textLayout.edit::SelectionManager/enterFrameHandler()
Thanks,
Brent
