Minecraftforge: [1.12] Strange Netty Handshake Cast Crash

Created on 21 Jul 2017  ·  3Comments  ·  Source: MinecraftForge/MinecraftForge

I've noticed a bug every so often I try to create a new world or enter a world. The game would finish creating it, but then when it gets to sending me to the world, it spits out this long error and it displays '0%' on the screen. I'm using Forge 14.21.1.2413 with several mods that I'm using to create a modpack. Here's my FML Log

Most helpful comment

This bug was introduced in commit https://github.com/MinecraftForge/MinecraftForge/commit/3fee319bc0513bd06ce956019a15308fb829ce65. NetworkDispatcher::insertIntoChannel now calls setAutoRead(true), which causes the channel to immediately process incoming messages. But insertIntoChannel is (via some bouncer methods) called from NetHandlerLoginClient::handleLoginSuccess before that methods sets the net handler to NetHandlerPlayClient. This will work, only if the client has not received messages here yet, so that setAutoRead has nothing to process. Otherwise FML will try to process it's handshake using the login net handler. The fix should be to first set the net handler in handleLoginSuccess and then call fmlClientHandshake. PR incoming.

All 3 comments

I'm also sometimes getting this crash, but I got it in dev environment: https://pastebin.com/raw/ufWMNRZJ

It had only the mod I as working on, and nothing else, I don't have fml log.

@Barteks2x The oddest thing is.. it doesn't even appear that a mod had to do with it.. It doesn't say anything about any of the mods in the logs

This bug was introduced in commit https://github.com/MinecraftForge/MinecraftForge/commit/3fee319bc0513bd06ce956019a15308fb829ce65. NetworkDispatcher::insertIntoChannel now calls setAutoRead(true), which causes the channel to immediately process incoming messages. But insertIntoChannel is (via some bouncer methods) called from NetHandlerLoginClient::handleLoginSuccess before that methods sets the net handler to NetHandlerPlayClient. This will work, only if the client has not received messages here yet, so that setAutoRead has nothing to process. Otherwise FML will try to process it's handshake using the login net handler. The fix should be to first set the net handler in handleLoginSuccess and then call fmlClientHandshake. PR incoming.

Was this page helpful?
0 / 5 - 0 ratings