Minecraft crashes with "java.lang.NullPointerException: Ticking screen" while pinging server on multiplayer server list (previously due to network issues, now more frequent)
This issue is about the game crash (back to the launcher) when opening the server list. For the similar-sounding, but completely different, disconnect with a NullPointerException while in-game, see MC-115942.
What I expected to happen was...:
Minecraft to be staying idle on the background minimalized without any issuse
What actually happened was...:
It crashed with a Ticking screen error
Steps to Reproduce:
1. Open minecraft 1.10.2
2. Minimilize it
3. maybe open a second minecraft and see if thas the issuse
Description: Ticking screen java.lang.NullPointerException: Ticking screen at io.netty.bootstrap.Bootstrap.checkAddress(Bootstrap.java:273) at io.netty.bootstrap.Bootstrap.doConnect(Bootstrap.java:150) at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:132) at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:113) at bls.b(SourceFile:165) at bls.a(SourceFile:45) at bls$1.a(SourceFile:144) at eo.l(SourceFile:382) at bls.a(SourceFile:254) at bhj.e(SourceFile:116) at bcx.t(SourceFile:1601) at bcx.av(SourceFile:968) at bcx.a(SourceFile:396) at net.minecraft.client.main.Main.main(SourceFile:124)
Hopper tickets
- MCX-2842585 (1.10.2)
- MCX-3487283 (17w14a)
Code analysis
Based on 1.11 decompiled using MCP 9.35 rc1
It looks like this crash can happen when the method net.minecraft.client.network.ServerPinger.ping(ServerData) was called while the user had an internet connection, but before a packet was received the internet connection was lost. Additionally the server needs to have a hostname which is not a literal IP address. In that case at some point the method net.minecraft.client.network.ServerPinger.ping(...).new INetHandlerStatusClient() {...}.onDisconnect(ITextComponent) is called. The problem lies in the method io.netty.bootstrap.Bootstrap.checkAddress(SocketAddress) which does check if the provided SocketAddress is an instance of InetSocketAddress (which include a null) check, but does not test if the method getAddress() returns null. This is the case if the host name cannot be resolved. As this netty version seems to be a custom build it should be fixable by Mojang.
2016-10-06, 05:14 PM
2017-06-01, 03:54 PM
2017-05-16, 01:19 PM
20
13
Minecraft 1.10.2 - Minecraft 1.12 Pre-Release 2
Minecraft 1.10.2, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w14a, Minecraft 17w15a, Minecraft 17w16a, Minecraft 17w16b, Minecraft 17w17a, Minecraft 17w17b, Minecraft 17w18a, Minecraft 17w18b, Minecraft 1.12 Pre-Release 1, Minecraft 1.12 Pre-Release 2