Misty World

Misty World

512k Downloads

StringIndexOutOfBoundsException crashing on startup.

momocow opened this issue ยท 5 comments

commented

Crash report

https://pastebin.com/aNd7UsLr

I'm playing with the modpack Exoria v1.3.0c in single player survival mode.
The error crashed the game while initializing today.

The game had no problem last night, the only one weird behavior was that the game took quite a few minutes without being responsive when I stopped and saved the game with the ingame menu triggered via esc. Without waiting patiently I shut it down by the red cross button on the top right of the game window. Not sure if this caused any files corrupt or not.

commented

Thank you for message.
This is a minor bug.
I will release a fix in the next update.
I do not think that this will ever be done at all.

commented

Very strange.
But, if the error did not repeat, maybe it was just an accidental failure?
Anyway, I added a check for the string length.

commented

Did you change something in the .lang file?
This could be due to the fact that the names of some blocks are shorter than 2 characters.
What I mean is that if this happens again, you can fix it quickly.

commented

No, I did not change anything but installed the modpack and launched it.

My minecraft language was set to zh_TW (Traditional Chinese). But it seems there's no zh_TW support in this mod, the language of this mod should fallback to en_US.
image

I did some simple searches in the en_US.lang. Since the error stack said

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1948)
    at ru.liahim.mist.block.MistBlockWettableFalling.func_190948_a(MistBlockWettableFalling.java:49)

I picked up three keywords, "block", "wettable", "falling", to search for, but saw nothing that would be the problem.

image

commented

I have more clues about this.

First of all, it's not an accidental failure, it always crashes when I try to launch the game.
I've successfully launched this game instance for only once; that is, the first time that I created a new world. After I shut the game down, I've never successfully relaunched it again.

The only difference between the first launch and the latter one is that I changed the language settings from en_US to zh_TW, before I shut the game down, there was no problem. But I cannot relaunch the game with the language set to zh_TW.

After coming up with this thought, I decide to have a try. I change the lang field in the options.txt to en_US, and the game successfully launches again!!!!
(perhaps it's because there was no such zh_TW.lang so you got an empty string? I'm not sure, it's just my sixth sense ๐Ÿ˜‚)

Hope this info helpful.