2
19
Fork
You've already forked array
3

Exception in thread "JavaFX Application Thread" java.lang.IllegalStateException: No spans have been added #38

Open
opened 2025年11月18日 23:41:59 +01:00 by kapitaali · 0 comments
Contributor
Copy link

I have been able to create instances of all kinds of Java classes, but doing

baosClass ← jvm:findClass "java.io.ByteArrayOutputStream"
baosConstructor ← jvm:findConstructor⟦baosClass⟧
baos ← jvm:createInstance⟦baosConstructor⟧

results in

Exception in thread "JavaFX Application Thread" java.lang.IllegalStateException: No spans have been added
 at org.fxmisc.richtext.model.StyleSpansBuilder.create(StyleSpansBuilder.java:158)
 at org.fxmisc.richtext.model.Paragraph.decompose(Paragraph.java:69)
 at org.fxmisc.richtext.model.Paragraph.<init>(Paragraph.java:95)
 at org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilder.addParagraph(ReadOnlyStyledDocumentBuilder.java:100)
 at org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilder.addParagraph(ReadOnlyStyledDocumentBuilder.java:93)
 at com.dhsdevelopments.kap.gui.display.DisplayKt.makeKapValueDoc(display.kt:94)
 at com.dhsdevelopments.kap.gui.styledarea.ROStyledArea.appendExpressionResultEnd$lambda0ドル(ROStyledArea.kt:330)
 at com.dhsdevelopments.kap.gui.styledarea.ROStyledArea.withUpdateEnabled(ROStyledArea.kt:291)
 at com.dhsdevelopments.kap.gui.styledarea.ROStyledArea.withUpdateEnabled$default(ROStyledArea.kt:285)
 at com.dhsdevelopments.kap.gui.styledarea.ROStyledArea.appendExpressionResultEnd(ROStyledArea.kt:328)
 at com.dhsdevelopments.kap.gui.styledarea.ROStyledArea.appendExpressionResultEnd$default(ROStyledArea.kt:323)
 at com.dhsdevelopments.kap.gui.ResultList3.addResult(ResultList3.kt:192)
 at com.dhsdevelopments.kap.gui.Client.displayResult(Client.kt:496)
 at com.dhsdevelopments.kap.gui.Client.evalSource$lambda0ドル0ドル(Client.kt:486)
 at javafx.graphics@25.0.1/com.sun.javafx.application.PlatformImpl.lambda$runLater0ドル(PlatformImpl.java:424)
 at javafx.graphics@25.0.1/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
 at javafx.graphics@25.0.1/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
 at javafx.graphics@25.0.1/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop0ドル(GtkApplication.java:240)
 at java.base/java.lang.Thread.run(Thread.java:1474)
I have been able to create instances of all kinds of Java classes, but doing ``` baosClass ← jvm:findClass "java.io.ByteArrayOutputStream" baosConstructor ← jvm:findConstructor⟦baosClass⟧ baos ← jvm:createInstance⟦baosConstructor⟧ ``` results in ``` Exception in thread "JavaFX Application Thread" java.lang.IllegalStateException: No spans have been added at org.fxmisc.richtext.model.StyleSpansBuilder.create(StyleSpansBuilder.java:158) at org.fxmisc.richtext.model.Paragraph.decompose(Paragraph.java:69) at org.fxmisc.richtext.model.Paragraph.<init>(Paragraph.java:95) at org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilder.addParagraph(ReadOnlyStyledDocumentBuilder.java:100) at org.fxmisc.richtext.model.ReadOnlyStyledDocumentBuilder.addParagraph(ReadOnlyStyledDocumentBuilder.java:93) at com.dhsdevelopments.kap.gui.display.DisplayKt.makeKapValueDoc(display.kt:94) at com.dhsdevelopments.kap.gui.styledarea.ROStyledArea.appendExpressionResultEnd$lambda0ドル(ROStyledArea.kt:330) at com.dhsdevelopments.kap.gui.styledarea.ROStyledArea.withUpdateEnabled(ROStyledArea.kt:291) at com.dhsdevelopments.kap.gui.styledarea.ROStyledArea.withUpdateEnabled$default(ROStyledArea.kt:285) at com.dhsdevelopments.kap.gui.styledarea.ROStyledArea.appendExpressionResultEnd(ROStyledArea.kt:328) at com.dhsdevelopments.kap.gui.styledarea.ROStyledArea.appendExpressionResultEnd$default(ROStyledArea.kt:323) at com.dhsdevelopments.kap.gui.ResultList3.addResult(ResultList3.kt:192) at com.dhsdevelopments.kap.gui.Client.displayResult(Client.kt:496) at com.dhsdevelopments.kap.gui.Client.evalSource$lambda0ドル0ドル(Client.kt:486) at javafx.graphics@25.0.1/com.sun.javafx.application.PlatformImpl.lambda$runLater0ドル(PlatformImpl.java:424) at javafx.graphics@25.0.1/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at javafx.graphics@25.0.1/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at javafx.graphics@25.0.1/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop0ドル(GtkApplication.java:240) at java.base/java.lang.Thread.run(Thread.java:1474) ```
Sign in to join this conversation.
No Branch/Tag specified
master
jdk25
tmp-generic-window-management
experiment-assign-to-function-expression
feature-error-highlight
feature-mosaic-ui
feature-sdl
feature-rationalise-reduced
adaptive-experiment
bugfix-linux-charconversions
vector-ops
vector-jvm
sane-reduce
formatter
bitarrays
array-builder
jvm-android-split-new
nested-function-calls-bug
multi-dimensional-string-formatting
ride-impl
codeberg-test
jvm-android-split
libreoffice-module-classloader
optimise-single-element-array
parser-callbacks
new-jline-completion
java-readline
test-tools
int-list-opt
linux-ffi
ffi
isqrt
inter-thread-datatransfer
metadata-highlight
numeric-total-ordering
libreoffice
langbar-javafx
port-mpbignum-to-wasmjs
aesh-test
zero-parser
java21
fxcontrols-spreadsheet-fork
javafx-reporting
new-http
new-optimiser
sixel-renderer
native-input
lambda-scope
custom-renderer
formatter-test
local-functions-fix
kap-rational
bigint2
bigint
reporting
dynamic-assign
structure-viewer2
return-impl
escape-analysis
fork-new-syntax
structural-under
axis-eval
binomial-impl
new-enclose
short-fn-definition
compose-impl
specialised-arrays
ops
domino
clientweb
lcm
gui-experiments
suspend
thread-support
closures_wip
inner-join
maths_axis
keyboard
resultlist3
error-locations
axis-work
No results found.
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
loke/array#38
Reference in a new issue
loke/array
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?