Mojira Archive
MC-116713

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.

Fixed

[Mod] Urielsalis

Maria Lemón

2017-04-27, 05:28 AM

2017-05-03, 11:18 AM

2017-05-02, 02:31 PM

2

4

Confirmed

crash, network, null-pointer-exception, world

Minecraft 17w17a, Minecraft 17w17b

Minecraft 17w18a