You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Roger Whitcomb (JIRA)" <ji...@apache.org> on 2018/01/05 16:55:02 UTC

[jira] [Created] (PIVOT-1021) Undo after delete in TextPane can cause IllegalArgumentException

Roger Whitcomb created PIVOT-1021:
-------------------------------------

             Summary: Undo after delete in TextPane can cause IllegalArgumentException
                 Key: PIVOT-1021
                 URL: https://issues.apache.org/jira/browse/PIVOT-1021
             Project: Pivot
          Issue Type: Bug
          Components: wtk
            Reporter: Roger Whitcomb
            Assignee: Roger Whitcomb
            Priority: Minor


Under various conditions (such as selecting an entire word that is a TextSpan) deleting it with Ctrl/Cmd-X then Undo (Ctrl/Cmd-Z) causes an IllegalArgumentException:
java.lang.IllegalArgumentException: Child node must be an instance of org.apache.pivot.wtk.text.Block
STACK TRACE:
at org.apache.pivot.wtk.text.Document.insert(Document.java:45)
at org.apache.pivot.wtk.text.Element.add(Element.java:369)
at org.apache.pivot.wtk.TextPane$RangeRemovedEdit.undo(TextPane.java:134)
at org.apache.pivot.wtk.TextPane.undo(TextPane.java:796)
at org.apache.pivot.wtk.skin.TextPaneSkin.keyPressed(TextPaneSkin.java:1360)
at org.apache.pivot.wtk.Component$ComponentKeyListenerList.lambda$keyPressed$1(Component.java:477)
at java.lang.Iterable.forEach(Unknown Source)
at org.apache.pivot.wtk.Component$ComponentKeyListenerList.keyPressed(Component.java:477)
at org.apache.pivot.wtk.Component.keyPressed(Component.java:2711)
at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processKeyEvent(ApplicationContext.java:1566)
at java.awt.Component.processEvent(Unknown Source)
at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:945)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
...

Or sometimes an IndexOutOfBoundsException can occur instead (such as doing a second Undo right after the first).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)