Thanks for the quick update. I'll check out the new version and see if it complains about mystcraft.
No problem. Your error log/config file told me exactly what went wrong and it was a very quick change to make.
Thanks for the quick update. I'll check out the new version and see if it complains about mystcraft.
No problem. Your error log/config file told me exactly what went wrong and it was a very quick change to make.
EDIT: Still complains about the exact same issue. (It's version 2.1c, same exception, deleted the config and let it regenerate, so it's definitely still an issue.) What I would do is just add a config to name all null objects something like "unnamed" or "unknown", if that's feasible. Then you could use use a try catch that supplies the configured name if it's null. Of course, I don't know how you implemented it, so your solution might differ.
^ Just in-case it was missed.
^ Just in-case it was missed.
Yeah, I did miss that part (there was no new post indicator, so I didn't think to check the thread). What I did was to stick an if statement in the abbreviation save/load code where it returns the string "NULL" if the item string == null. I'll have to grab Mystcraft v0.9.1.02 and test this out.
Thanks.
(And don't forget to put mystcraft directly into the jar. It took me ages to figure out why it was refusing to run properly... :P)
Thanks.
(And don't forget to put mystcraft directly into the jar. It took me ages to figure out why it was refusing to run properly... :P)
Try version 2.1d now - I've slapped in more checks for string == null and additional checks for string == "". I couldn't see any null entries for various Mystcraft objects (linking book, descriptive book, writing desk, notebook, linkbook stand) when I tried it out, so I was unable to get it to crash and test whether the fix worked, though.
Try version 2.1d now - I've slapped in more checks for string == null and additional checks for string == "". I couldn't see any null entries for various Mystcraft objects (linking book, descriptive book, writing desk, notebook, linkbook stand) when I tried it out, so I was unable to get it to crash and test whether the fix worked, though.
Will do, shouldn't take more than ~5 minutes.
Single player appears to be fixed, but SMP still does it.
2012-08-26 00:54:59 [SEVERE] A critical error has occurred.
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at forge.Configuration.load(Configuration.java:242)
at mod_ArmourHUD.loadAbbreviatedItemName(mod_ArmourHUD.java:253)
at mod_ArmourHUD.gearWords(mod_ArmourHUD.java:725)
at mod_ArmourHUD.onTickInGame(mod_ArmourHUD.java:1339)
at BaseMod.doTickInGame(BaseMod.java:48)
at cpw.mods.fml.common.modloader.BaseModTicker.sendTick(BaseModTicker.java:104)
at cpw.mods.fml.common.modloader.BaseModTicker.tickBaseMod(BaseModTicker.java:84)
at cpw.mods.fml.common.modloader.BaseModTicker.tickEnd(BaseModTicker.java:58)
at cpw.mods.fml.common.SingleIntervalHandler.tickEnd(SingleIntervalHandler.java:22)
at cpw.mods.fml.common.FMLCommonHandler.tickEnd(FMLCommonHandler.java:185)
at cpw.mods.fml.client.FMLClientHandler.onRenderTickEnd(FMLClientHandler.java:315)
at net.minecraft.client.Minecraft.x(Minecraft.java:878)
at net.minecraft.client.Minecraft.run(Minecraft.java:753)
at java.lang.Thread.run(Unknown Source)
Display More
Single player appears to be fixed, but SMP still does it.
CodeDisplay More2012-08-26 00:54:59 [SEVERE] A critical error has occurred. java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at forge.Configuration.load(Configuration.java:242) at mod_ArmourHUD.loadAbbreviatedItemName(mod_ArmourHUD.java:253) at mod_ArmourHUD.gearWords(mod_ArmourHUD.java:725) at mod_ArmourHUD.onTickInGame(mod_ArmourHUD.java:1339) at BaseMod.doTickInGame(BaseMod.java:48) at cpw.mods.fml.common.modloader.BaseModTicker.sendTick(BaseModTicker.java:104) at cpw.mods.fml.common.modloader.BaseModTicker.tickBaseMod(BaseModTicker.java:84) at cpw.mods.fml.common.modloader.BaseModTicker.tickEnd(BaseModTicker.java:58) at cpw.mods.fml.common.SingleIntervalHandler.tickEnd(SingleIntervalHandler.java:22) at cpw.mods.fml.common.FMLCommonHandler.tickEnd(FMLCommonHandler.java:185) at cpw.mods.fml.client.FMLClientHandler.onRenderTickEnd(FMLClientHandler.java:315) at net.minecraft.client.Minecraft.x(Minecraft.java:878) at net.minecraft.client.Minecraft.run(Minecraft.java:753) at java.lang.Thread.run(Unknown Source)
That error there is from Forge's horrible config file loading code, so it's beyond my control at this point. Did you start with a fresh config file for this error?
That error there is from Forge's horrible config file loading code, so it's beyond my control at this point. Did you start with a fresh config file for this error?
I did, and it still generated the (blank)=(blank) part that kills it. A safe way to bypass this would be some check for when you actually pull/push names into the config, making sure that null values force it to exit (do an if/else clause with the is null? It would slow it down, but probably would kill the issue in its track) and instead use a predefined value. (which preferably would be editable in the config, but that's not necessary.)
Very important, it still generates the (blank)=(blank) in SSP, but it only crashes when you enter SMP. Whatever catch you used in SSP isn't transferring to SMP.
I did, and it still generated the (blank)=(blank) part that kills it. A safe way to bypass this would be some check for when you actually pull/push names into the config, making sure that null values force it to exit (do an if/else clause with the is null? It would slow it down, but probably would kill the issue in its track) and instead use a predefined value. (which preferably would be editable in the config, but that's not necessary.)
I could have sworn that I did that already. The if check comes at the beginning of the abbreviation subroutine, so a null value should be found and stopped immediately. This is a very strange error.
Version 2.2 now has Gravitation Suite integration, along with an increase in the precision of the HUD-less display from 10% to 1%. Still haven't fixed the null name bug yet, though (or made the HUD position save when you press the key, lol).
And I made a stupid copy-paste mistake on the initial v2.2 release meaning that it ignored the colour saturation value in the config and set it to maximum (thus making it a bit hard to read). If you grabbed v2.2 before this post came out, get it again (this updated 2.2 also contains an attempt by AthenianGeneral to stop the SMP Mystcraft crash, but it wasn't any more successful than my attempts).
I put pumpkin on my head and got crash and then it kept crashing right after connecting to a server.
--- BEGIN ERROR REPORT 336d9963 --------
Generated 29.8.2012 21:48
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_04, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce GTX 570/PCIe/SSE2 version 4.2.0, NVIDIA Corporation
java.lang.ArrayIndexOutOfBoundsException: 65533
at FruitDisplayLib.renderScaledChar(FruitDisplayLib.java:272)
at FruitDisplayLib.renderScaledStringAtPos(FruitDisplayLib.java:303)
at mod_ArmourHUD.graphicalStatus(mod_ArmourHUD.java:941)
at mod_ArmourHUD.onTickInGame(mod_ArmourHUD.java:1576)
at BaseMod.doTickInGame(BaseMod.java:48)
at cpw.mods.fml.common.modloader.BaseModTicker.sendTick(BaseModTicker.java:104)
at cpw.mods.fml.common.modloader.BaseModTicker.tickBaseMod(BaseModTicker.java:84)
at cpw.mods.fml.common.modloader.BaseModTicker.tickEnd(BaseModTicker.java:58)
at cpw.mods.fml.common.SingleIntervalHandler.tickEnd(SingleIntervalHandler.java:22)
at cpw.mods.fml.common.FMLCommonHandler.tickEnd(FMLCommonHandler.java:185)
at cpw.mods.fml.client.FMLClientHandler.onRenderTickEnd(FMLClientHandler.java:315)
at net.minecraft.client.Minecraft.x(Minecraft.java:878)
at net.minecraft.client.Minecraft.run(Minecraft.java:753)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 7532c057 ----------
Display More
Had to remove mod to be able to login again.
I put pumpkin on my head and got crash and then it kept crashing right after connecting to a server.
CodeDisplay More--- BEGIN ERROR REPORT 336d9963 -------- Generated 29.8.2012 21:48 Minecraft: Minecraft 1.2.5 OS: Windows 7 (amd64) version 6.1 Java: 1.7.0_04, Oracle Corporation VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation LWJGL: 2.4.2 OpenGL: GeForce GTX 570/PCIe/SSE2 version 4.2.0, NVIDIA Corporation java.lang.ArrayIndexOutOfBoundsException: 65533 at FruitDisplayLib.renderScaledChar(FruitDisplayLib.java:272) at FruitDisplayLib.renderScaledStringAtPos(FruitDisplayLib.java:303) at mod_ArmourHUD.graphicalStatus(mod_ArmourHUD.java:941) at mod_ArmourHUD.onTickInGame(mod_ArmourHUD.java:1576) at BaseMod.doTickInGame(BaseMod.java:48) at cpw.mods.fml.common.modloader.BaseModTicker.sendTick(BaseModTicker.java:104) at cpw.mods.fml.common.modloader.BaseModTicker.tickBaseMod(BaseModTicker.java:84) at cpw.mods.fml.common.modloader.BaseModTicker.tickEnd(BaseModTicker.java:58) at cpw.mods.fml.common.SingleIntervalHandler.tickEnd(SingleIntervalHandler.java:22) at cpw.mods.fml.common.FMLCommonHandler.tickEnd(FMLCommonHandler.java:185) at cpw.mods.fml.client.FMLClientHandler.onRenderTickEnd(FMLClientHandler.java:315) at net.minecraft.client.Minecraft.x(Minecraft.java:878) at net.minecraft.client.Minecraft.run(Minecraft.java:753) at java.lang.Thread.run(Unknown Source) --- END ERROR REPORT 7532c057 ----------
Had to remove mod to be able to login again.
My guess is that you're using a localisation which contains characters beyond the standard ASCII set - this crash is when it tries to look up a character with index > 255 in the array.
I did actually try to make it display Unicode text at the very beginning, but it kept crapping out for some reason (I don't remember exactly why, but I think it was due to the font glyphs not being cut out properly). Looks like I'll need to put Unicode back in...
EDIT: I've tested it and it's specific to the pumpkin. Holy crap.
Nope, I'm using English (US).
Nope, I'm using English (US).
Fixed it. Get version 2.2c from the OP.
Unicode still won't work, so I need to work on that.
Wow, that was fast. Thanks!
Wow, that was fast. Thanks!
All it took was copying the isDamageable check from the tool string builder and sticking it in the hat, shirt, trousers and shoes string builder functions - not a large change.
And I've finally fixed the bug that makes it crash with items that don't have a name. Get v2.2d to cure your crashing.