Skip to content

Explosion when writing in a paragraph #235

Description

@openlowcode

When writing in a paragraph, the following explosion happens. As a result, the display is going back up.

Exception in thread "JavaFX Application Thread" java.lang.ArrayIndexOutOfBoundsException: -1
        at java.util.ArrayList.elementData(ArrayList.java:422)
        at java.util.ArrayList.remove(ArrayList.java:499)
        at org.openlowcode.tools.richtext.RichTextArea.splitparagraphatcurrentchar(RichTextArea.java:440)
        at org.openlowcode.tools.richtext.Paragraph$13.handle(Paragraph.java:1037)
        at org.openlowcode.tools.richtext.Paragraph$13.handle(Paragraph.java:955)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)

if this explosion is fixed, another explosion seems to be behind. 3 first lines are temporary logs added to RichTextArea after line 439 if activeparagraphindex = -1

SEVERE   11:22.736  ------------- Detected no active paragraph, does not manage split
SEVERE   11:22.739         >>> split current paragraph length/caret (6/3)
SEVERE   11:22.751         >>> split firstparagraph = 3, secondparagraph = 3
        at java.util.ArrayList.elementData(ArrayList.java:422)
        at java.util.ArrayList.get(ArrayList.java:435)
        at com.sun.javafx.collections.ObservableListWrapper.get(ObservableListWrapper.java:89)
        at com.sun.javafx.collections.VetoableListDecorator.get(VetoableListDecorator.java:306)
        at javafx.scene.Parent$2.onProposedChange(Parent.java:423)
        at com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:329)
        at org.openlowcode.tools.richtext.RichTextArea.redrawActiveParagraph(RichTextArea.java:905)
        at org.openlowcode.tools.richtext.Paragraph$13.handle(Paragraph.java:1038)
        at org.openlowcode.tools.richtext.Paragraph$13.handle(Paragraph.java:955)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions