[Freeze Crash]: Freezes on New World Generation
Lanse505 opened this issue ยท 11 comments
Using:
Forge: 12.17.0.1954
Enchanting+ V. 1.9.4-4.1.0.101
Not sure if this is a Mod interaction issue or not (since i'm testing this inside of a larger 1.9.4 Pack)
But whenever i try and generate a New World with Enchanting+ V. 1.9.4-4.1.0.101.
It freezes the entire client.
It does throw this in the console;
https://gist.github.com/Lanse505/d470595ebf03de308ba71b01e6c9ae02
Closed by 62e17cc
I can confirm this problem.
Enchanting+ V. 1.9.4-4.1.0.101
Forge: forge-1.9.4-12.17.0.1954
Only other mod is: Bookshelf-1.9.4-1.2.2.261
On world generation minecraft freezes without any error-log.
Thanks for your hard work o/
I got this issue with every world, even with already generated ones. The first time I experienced this issue IC2 wasn't released, so I would maybe scratch that.
Anyway I don't have to add anything crash-report wise, because I don't have any differences in my one. (Some of the crash reports I would have to pull out of the console anyway)
access_denied
Working with the code, I have tracked the inital crash to the PacketEnchantItem.java file and the toBytes(ByteBuf buf) function. In the function, after reading the enchantCost, the buf becomes unreadable. I am assuming that since the world is just created, the enchantment list is empty? Adding protection around the size check and subsequent reads to build the enchantment list, I can get the game to load. Once I activate a scroll, the next error is isolated to the ByteBufUtils.readUTF8String call. This crash has an issue reading due to an index error. Pasted below is the actual error after adding in some debug code to isolate. Ignore the line numbers, as they won't match what is in the repo.
Caused by: java.lang.IndexOutOfBoundsException: index: 9, length: 101 (expected: range(0, 25))
at io.netty.buffer.AbstractByteBuf.checkIndex(AbstractByteBuf.java:1143) ~[AbstractByteBuf.class:4.0.23.Final]
at io.netty.buffer.SlicedByteBuf.nioBuffer(SlicedByteBuf.java:261) ~[SlicedByteBuf.class:4.0.23.Final]
at io.netty.buffer.AbstractByteBuf.toString(AbstractByteBuf.java:964) ~[AbstractByteBuf.class:4.0.23.Final]
at net.minecraftforge.fml.common.network.ByteBufUtils.readUTF8String(ByteBufUtils.java:119) ~[ByteBufUtils.class:?]
at net.darkhax.eplus.common.network.packet.PacketEnchantItem.fromBytes(PacketEnchantItem.java:50) ~[PacketEnchantItem.class:?]
Other users who have reported this issue directly have told me this is an ic2 issue. I do not send any packets during world load. While this packet is mine, I am not sending it.
Edit: didn't see earlier comments where this is being reproduced without ic2
My minecraft install is the same as FlyingBoat. The only mods installed are eplus and bookshelf. IC2 is not involved in my install.
Enchanting+ V. 1.9.4-4.1.0.101
Forge: forge-1.9.4-12.17.0.1954
Only other mod is: Bookshelf-1.9.4-1.2.2.261
Here is the full stack trace below the error. Again, this is a fresh built copy of eplus from source. Used pastebin to keep the comment uncluttered.
Tried it with my own new pack and would crash on creating a world.
So made a fresh instance with just latest EnchantingPlus and IC2 and tried to create a world with both IC2 on and off but both times it would crash.
Here are the logs.
IC2 ON ~ http://pastebin.com/eLDk8es2
IC2 OFF ~ http://pastebin.com/FnaiBNMM
Update on this issue: Didn't realize it at the time, but I completely misread the issue. This is actually a known issue. It's related to how I am saving player data. I currently have a lot of other big projects that I am tied up with, so if anyone knows a better way of doing what I am doing with player saves, please let me know.