[
https://issues.apache.org/jira/browse/FLEX-34807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14598396#comment-14598396
]
Aleksey edited comment on FLEX-34807 at 6/28/15 4:32 PM:
---------------------------------------------------------
This is still happening and very easy to reproduce and debug. I have done some
debugging. Issue is happening on the second iteration of the loop in the
TextFlowEdit on the line 244: var
destinationParagraph:ParagraphElement = destinationLeaf.getParagraph();
At the end of the loop:
destinationLeaf = (scrapElement is
FlowLeafElement) ? FlowLeafElement(scrapElement).getNextLeaf() :
FlowGroupElement(scrapElement).getLastLeaf().getNextLeaf();
insertPosition = destinationLeaf ?
destinationLeaf.getAbsoluteStart() : textFlow.textLength - 1;
As you can see there is a check for null of destinationLeaf, so it is assumed
that it can be null but at the same time it is still being referenced on the
line 244 without any check.
At the end of the loop:
was (Author: shmatov):
This is still happening and very easy to reproduce and debug
> TLF - EditManager - TextFlowEdit -insertTextScrap
> -------------------------------------------------
>
> Key: FLEX-34807
> URL: https://issues.apache.org/jira/browse/FLEX-34807
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: RichEditableText
> Affects Versions: Apache Flex 4.12.0, Apache Flex 4.13.0, Apache Flex
> 4.14.0
> Reporter: Robbyn Gerhardt
> Labels: editmanager, richeditabletext, tlf
> Attachments: Bildschirmfoto 2015-03-19 um 15.28.19.png,
> Bildschirmfoto 2015-03-20 um 09.06.47.png, TextEditorTest.air,
> TextEditorTest.fxp
>
>
> 1. Copy Formatted text from RichEditableText Editor, see Image
> 2. Insert Formatted text from the clipboard with Ctrl + V in the editor. Then
> comes the error.
> TypeError: Error #1009: Cannot access a property or method of a null object
> reference.
> at
> flashx.textLayout.edit::TextFlowEdit$/insertTextScrap()[/Users/erik/Documents/ApacheFlex/git/flex-tlf/textLayout/src/flashx/textLayout/edit/TextFlowEdit.as:244]
> at
> flashx.textLayout.operations::PasteOperation/doOperation()[/Users/erik/Documents/ApacheFlex/git/flex-tlf/textLayout/src/flashx/textLayout/operations/PasteOperation.as:102]
> at
> flashx.textLayout.edit::EditManager/doInternal()[/Users/erik/Documents/ApacheFlex/git/flex-tlf/textLayout/src/flashx/textLayout/edit/EditManager.as:767]
> at
> flashx.textLayout.edit::EditManager/doOperation()[/Users/erik/Documents/ApacheFlex/git/flex-tlf/textLayout/src/flashx/textLayout/edit/EditManager.as:647]
> at
> flashx.textLayout.edit::EditManager/pasteTextScrap()[/Users/erik/Documents/ApacheFlex/git/flex-tlf/textLayout/src/flashx/textLayout/edit/EditManager.as:1806]
> at
> flashx.textLayout.edit::EditManager/editHandler()[/Users/erik/Documents/ApacheFlex/git/flex-tlf/textLayout/src/flashx/textLayout/edit/EditManager.as:270]
> at
> flashx.textLayout.container::ContainerController/editHandler()[/Users/erik/Documents/ApacheFlex/git/flex-tlf/textLayout/src/flashx/textLayout/container/ContainerController.as:2739]
> at
> flashx.textLayout.container::TextContainerManager/editHandler()[/Users/erik/Documents/ApacheFlex/git/flex-tlf/textLayout/src/flashx/textLayout/container/TextContainerManager.as:1876]
> at flash.display::NativeMenuItem/select()
> at flash.display::NativeMenuItem/performKeyEquivalent()
> at flash.display::NativeMenu/_menuItemPerformKeyEquivalent()
> at flash.display::NativeMenu/performKeyEquivalent()
> at flash.display::NativeMenuItem/_menuPerformKeyEquivalent()
> at flash.display::NativeMenuItem/performKeyEquivalent()
> at flash.display::NativeMenu/_menuItemPerformKeyEquivalent()
> at flash.display::NativeMenu/performKeyEquivalent()
> at flash.desktop::NativeApplication/_menuPerformKeyEquivalent()
> at flash.desktop::NativeApplication/_onKeyDownCapture()
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)