Creating new world with same name crashes with NullPointerException
The bug
Creating a new survival world after getting a new recipe in another world with the same name(Old: "New World", New: "New World", saved as "New World-") crashes the game while building terrain (it works fine when reloading it). Doesn't happen with the normal launcher (and resetting the settings with it fixes it for the new launcher too). Doesn't happen if the new world is not called the same or if you didn't get a new recipe before saving the world.
Crash report
---- Minecraft Crash Report ---- // You're mean. Time: 4/26/17 11:01 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error at gf.a(SourceFile:234) at bhb.t(SourceFile:1687) at bhb.ax(SourceFile:964) at bhb.a(SourceFile:404) at net.minecraft.client.main.Main.main(SourceFile:123)
Hopper crash: MCX-3508750
Exit code: 65280
Crash analysis
gf.a(SourceFile:234) corresponds to NetworkManager.closeChannel(ITextComponent message).
public void closeChannel(ITextComponent message) { if (this.channel.isOpen()) { this.channel.close().awaitUninterruptibly(); // <-- this line this.terminationReason = message; } }
[Mod] Pokechu22: Given that it crashes on the second line and not in the if statement, channel is not null, but instead the ChannelFuture produced by calling close is.
I'm not entirely sure how that could happen, given that newPromise is called each time (within netty) and that shouldn't return null.
Environment
2.0.579-dev-linux, Oracle Java 8, Arch Linux x64, Kernel 4.10.8-1-ARCH
Linked Issues
Created Issue:
Creating new world with same name crashes with NullPointerException
Creating a new survival world after getting a new recipe in another world with the same name(Old: "New World", New: "New World", saved as "New World-") crashes the game while building terrain(it works fine when reloading it)
Doesnt happen with the normal launcher(and resetting the settings with it fixes it for the new launcher too)
Launcher log shows exit code 65280.
Happens after a fresh install(delete .minecraft, run launcher again), tried twice
Doesnt happen if the new world is not called the same or if you didnt get a new recipe before saving the world
Code analysis of the crash by @neko shows that it happens in this.channel.close().awaitUninterruptibly
public void closeChannel(ITextComponent message) { if (this.channel.isOpen()) { this.channel.close().awaitUninterruptibly(); this.terminationReason = message; } }Environment
2.0.579-dev-linux, Oracle Java 8, Arch Linux x64, Kernel 4.10.8-1-ARCH
Creating a new survival world after getting a new recipe in another world with the same name(Old: "New World", New: "New World", saved as "New World-") crashes the game while building terrain(it works fine when reloading it)
Doesnt happen with the normal launcher(and resetting the settings with it fixes it for the new launcher too)
Launcher log shows exit code 65280.
Happens after a fresh install(delete .minecraft, run launcher again), tried twice
Doesnt happen if the new world is not called the same or if you didnt get a new recipe before saving the world
Code analysis of the crash by @neko shows that it happens in this.channel.close().awaitUninterruptibly
public void closeChannel(ITextComponent message) { if (this.channel.isOpen()) { this.channel.close().awaitUninterruptibly();this.terminationReason = message; } }The bug
Creating a new survival world after getting a new recipe in another world with the same name(Old: "New World", New: "New World", saved as "New World-") crashes the game while building terrain (it works fine when reloading it). Doesn't happen with the normal launcher (and resetting the settings with it fixes it for the new launcher too). Doesn't happen if the new world is not called the same or if you didn't get a new recipe before saving the world.
Crash report
---- Minecraft Crash Report ---- // You're mean. Time: 4/26/17 11:01 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error at gf.a(SourceFile:234) at bhb.t(SourceFile:1687) at bhb.ax(SourceFile:964) at bhb.a(SourceFile:404) at net.minecraft.client.main.Main.main(SourceFile:123)Hopper crash: MCX-3508750
Exit code: 65280Code analysis
gf.a(SourceFile:234) corresponds to NetworkManager.closeChannel(ITextComponent message).
public void closeChannel(ITextComponent message) { if (this.channel.isOpen()) { this.channel.close().awaitUninterruptibly(); // <-- this line this.terminationReason = message; } }
The bug
Creating a new survival world after getting a new recipe in another world with the same name(Old: "New World", New: "New World", saved as "New World-") crashes the game while building terrain (it works fine when reloading it). Doesn't happen with the normal launcher (and resetting the settings with it fixes it for the new launcher too). Doesn't happen if the new world is not called the same or if you didn't get a new recipe before saving the world.
Crash report
---- Minecraft Crash Report ---- // You're mean. Time: 4/26/17 11:01 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error at gf.a(SourceFile:234) at bhb.t(SourceFile:1687) at bhb.ax(SourceFile:964) at bhb.a(SourceFile:404) at net.minecraft.client.main.Main.main(SourceFile:123)Hopper crash: MCX-3508750
Exit code: 65280C
odeanalysisgf.a(SourceFile:234) corresponds to NetworkManager.closeChannel(ITextComponent message).
public void closeChannel(ITextComponent message) { if (this.channel.isOpen()) { this.channel.close().awaitUninterruptibly(); // <-- this line this.terminationReason = message; } }The bug
Creating a new survival world after getting a new recipe in another world with the same name(Old: "New World", New: "New World", saved as "New World-") crashes the game while building terrain (it works fine when reloading it). Doesn't happen with the normal launcher (and resetting the settings with it fixes it for the new launcher too). Doesn't happen if the new world is not called the same or if you didn't get a new recipe before saving the world.
Crash report
---- Minecraft Crash Report ---- // You're mean. Time: 4/26/17 11:01 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error at gf.a(SourceFile:234) at bhb.t(SourceFile:1687) at bhb.ax(SourceFile:964) at bhb.a(SourceFile:404) at net.minecraft.client.main.Main.main(SourceFile:123)Hopper crash: MCX-3508750
Exit code: 65280Crash analysis
gf.a(SourceFile:234) corresponds to NetworkManager.closeChannel(ITextComponent message).
public void closeChannel(ITextComponent message) { if (this.channel.isOpen()) { this.channel.close().awaitUninterruptibly(); // <-- this line this.terminationReason = message; } }
The bug
Creating a new survival world after getting a new recipe in another world with the same name(Old: "New World", New: "New World", saved as "New World-") crashes the game while building terrain (it works fine when reloading it). Doesn't happen with the normal launcher (and resetting the settings with it fixes it for the new launcher too). Doesn't happen if the new world is not called the same or if you didn't get a new recipe before saving the world.
Crash report
---- Minecraft Crash Report ---- // You're mean. Time: 4/26/17 11:01 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error at gf.a(SourceFile:234) at bhb.t(SourceFile:1687) at bhb.ax(SourceFile:964) at bhb.a(SourceFile:404) at net.minecraft.client.main.Main.main(SourceFile:123)Hopper crash: MCX-3508750
Exit code: 65280Crash analysis
gf.a(SourceFile:234) corresponds to NetworkManager.closeChannel(ITextComponent message).
public void closeChannel(ITextComponent message) { if (this.channel.isOpen()) { this.channel.close().awaitUninterruptibly(); // <-- this line this.terminationReason = message; } }[Mod] Pokechu22: Given that it crashes on the second line and not in the if statement, channel is not null, but instead the ChannelFuture produced by calling close is.
I'm not entirely sure how that could happen, given that newPromise is called each time (within netty) and that shouldn't return null.
is duplicated by
I also receive this crash when loading a pre-existing world. Takes a few times exiting and re-entering to trigger it for me.