You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following stacktrace when trying to convert my story state to JSON:
java.lang.ArrayIndexOutOfBoundsException: Index 26 out of bounds for length 26
at com.bladecoder.ink.runtime.Json.writeRuntimeObject(Json.java:174) ~[blade-ink-1.1.1.jar:na]
at com.bladecoder.ink.runtime.Json.writeListRuntimeObjs(Json.java:48) ~[blade-ink-1.1.1.jar:na]
at com.bladecoder.ink.runtime.Flow$2.write(Flow.java:50) ~[blade-ink-1.1.1.jar:na]
at com.bladecoder.ink.runtime.SimpleJson$Writer.writePropertyString(SimpleJson.java:388) ~[blade-ink-1.1.1.jar:na]
at com.bladecoder.ink.runtime.SimpleJson$Writer.writeProperty(SimpleJson.java:306) ~[blade-ink-1.1.1.jar:na]
at com.bladecoder.ink.runtime.Flow.writeJson(Flow.java:47) ~[blade-ink-1.1.1.jar:na]
at com.bladecoder.ink.runtime.StoryState$2.write(StoryState.java:1240) ~[blade-ink-1.1.1.jar:na]
at com.bladecoder.ink.runtime.SimpleJson$Writer.writePropertyString(SimpleJson.java:388) ~[blade-ink-1.1.1.jar:na]
at com.bladecoder.ink.runtime.SimpleJson$Writer.writeProperty(SimpleJson.java:306) ~[blade-ink-1.1.1.jar:na]
at com.bladecoder.ink.runtime.StoryState.writeJson(StoryState.java:1237) ~[blade-ink-1.1.1.jar:na]
at com.bladecoder.ink.runtime.StoryState.toJson(StoryState.java:924) ~[blade-ink-1.1.1.jar:na]
Possibly useful information
The stacktrace points to a place in the code where an array (controlCommandNames) is being accessed at index 26, but there are only 26 entries in it (max index would be 25). The index is coming from ControlCommand.CommandType.ordinal(), which is an enum that indeed has 27 values, so the last value would have an ordinal of 26.
My best guess is that this is related to supporting the latest version of Ink, and the controlCommandNames array was supposed to be updated to add a new entry and it was missed?
The text was updated successfully, but these errors were encountered:
I uploaded v1.1.2 that should fix this error. But I couldn't test it. Could you verify that the bug is fixed? Also if you could upload an .ink file that fails to verify by myself would be nice too.
Thanks for the quick turnaround, yes it seems to be fixed now. Here's my .ink file (uploaded as .txt because GitHub won't accept it as .ink): three_little_pigs.ink.txt
blade-ink version: 1.1.1
What is wrong
I get the following stacktrace when trying to convert my story state to JSON:
Possibly useful information
The stacktrace points to a place in the code where an array (
controlCommandNames
) is being accessed at index 26, but there are only 26 entries in it (max index would be 25). The index is coming fromControlCommand.CommandType.ordinal()
, which is an enum that indeed has 27 values, so the last value would have an ordinal of 26.My best guess is that this is related to supporting the latest version of Ink, and the
controlCommandNames
array was supposed to be updated to add a new entry and it was missed?The text was updated successfully, but these errors were encountered: