Just have seen #592 but still having this problem.
Using 0.8.2.
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Cannot construct a Paragraph with an empty list of segments at org.fxmisc.richtext.model.Paragraph.<init>(Paragraph.java:43) at org.fxmisc.richtext.model.Paragraph.restyle(Paragraph.java:216) at org.fxmisc.richtext.model.GenericEditableStyledDocumentBase.lambda$setStyleSpans$7(GenericEditableStyledDocumentBase.java:164) at org.fxmisc.richtext.model.ReadOnlyStyledDocument.lambda$null$7(ReadOnlyStyledDocument.java:272) at org.reactfx.util.Tuple2.map(Tuple2.java:31) at org.fxmisc.richtext.model.ReadOnlyStyledDocument.lambda$replace$8(ReadOnlyStyledDocument.java:271) at org.reactfx.util.Tuple2.map(Tuple2.java:31) at org.fxmisc.richtext.model.ReadOnlyStyledDocument.replace(ReadOnlyStyledDocument.java:270) at org.fxmisc.richtext.model.ReadOnlyStyledDocument.replace(ReadOnlyStyledDocument.java:260) at org.fxmisc.richtext.model.GenericEditableStyledDocumentBase.setStyleSpans(GenericEditableStyledDocumentBase.java:158) at org.fxmisc.richtext.model.SimpleEditableStyledDocument.setStyleSpans(SimpleEditableStyledDocument.java:7) at org.fxmisc.richtext.GenericStyledArea.setStyleSpans(GenericStyledArea.java:1281)
It happens with large texts only, but no idea about the exact source.
EDIT:
Just found out it happens only if group #[^\n]*, which matches everything after a '#', is present and followed by an empty line.
Just have seen #592 but still having this problem.
Using 0.8.2.
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Cannot construct a Paragraph with an empty list of segments at org.fxmisc.richtext.model.Paragraph.<init>(Paragraph.java:43) at org.fxmisc.richtext.model.Paragraph.restyle(Paragraph.java:216) at org.fxmisc.richtext.model.GenericEditableStyledDocumentBase.lambda$setStyleSpans$7(GenericEditableStyledDocumentBase.java:164) at org.fxmisc.richtext.model.ReadOnlyStyledDocument.lambda$null$7(ReadOnlyStyledDocument.java:272) at org.reactfx.util.Tuple2.map(Tuple2.java:31) at org.fxmisc.richtext.model.ReadOnlyStyledDocument.lambda$replace$8(ReadOnlyStyledDocument.java:271) at org.reactfx.util.Tuple2.map(Tuple2.java:31) at org.fxmisc.richtext.model.ReadOnlyStyledDocument.replace(ReadOnlyStyledDocument.java:270) at org.fxmisc.richtext.model.ReadOnlyStyledDocument.replace(ReadOnlyStyledDocument.java:260) at org.fxmisc.richtext.model.GenericEditableStyledDocumentBase.setStyleSpans(GenericEditableStyledDocumentBase.java:158) at org.fxmisc.richtext.model.SimpleEditableStyledDocument.setStyleSpans(SimpleEditableStyledDocument.java:7) at org.fxmisc.richtext.GenericStyledArea.setStyleSpans(GenericStyledArea.java:1281)It happens with large texts only, but no idea about the exact source.
EDIT:
Just found out it happens only if group
#[^\n]*, which matches everything after a '#', is present and followed by an empty line.