Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-108343

Minecraft crashes with "java.lang.NullPointerException: Ticking screen" while pinging server on multiplayer server list (previously due to network issues, now more frequent)

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 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
    • Labels:
    • Environment:

      OS: Windows 10 (ver 10.0, arch amd64)
      Java: 1.8.0_25 (by Oracle Corporation)
      Launcher: Minecraft Launcher 1.6.61 (bootstrap 100)
      Minecraft: 1.10.2 (updated Sun Sep 18 19:33:11 CEST 2016)

    • Confirmation Status:
      Confirmed

      Description

      Note

      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

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                grum [Mojang] Grum (Erik Broes)
                Reporter:
                EnderNator10 Ender Ossel
              • Votes:
                20 Vote for this issue
                Watchers:
                17 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: