Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6761

Server Crash Error: java.lang.NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Major Major
    • None
    • None
    • git-Paper-787 (MC: 1.16.5)
    • BungeeTabListPlus, Citizens, CoreProtect, Denizen, Depenizen, GSit, LuckPerms, Multiverse-Core, OpenInv, PlaceholderAPI, Plan, spark, UltimateTimber, Vault, VoidGen, WorldEdit
    • Yes

      My server is based on bungee, players will switch servers in the order of bungee->lobby->survival. Sometimes (randomly happen), a player joines survival server, the errors will start spamming as:

      [14:02:21] Netty Epoll Server IO #0/ERROR: java.lang.NullPointerException: Cannot invoke "String.getBytes(java.nio.charset.Charset)" because "s" is null
      [14:02:21] Netty Epoll Server IO #2/WARN:     at net.minecraft.server.v1_16_R3.PacketDataSerializer.a(PacketDataSerializer.java:390)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at net.minecraft.server.v1_16_R3.PacketDataSerializer.a(PacketDataSerializer.java:385)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at net.minecraft.server.v1_16_R3.PacketPlayOutPlayerInfo.b(SourceFile:108)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at net.minecraft.server.v1_16_R3.PacketEncoder.encode(PacketEncoder.java:46)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at net.minecraft.server.v1_16_R3.PacketEncoder.encode(PacketEncoder.java:15)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:808)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:294)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at net.minecraft.server.v1_16_R3.NetworkManager.lambda$b$6(NetworkManager.java:323)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:384)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
      [14:02:21] Netty Epoll Server IO #2/WARN:     at java.base/java.lang.Thread.run(Thread.java:831)

       

       

      Then everyone on this server will be kicked with message: `Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException: Cannot invoke "String.getBytes(java.nio.charset.Charset)" because "s" is null`. And from now on, anyone will be kicked out immediately after joining this server (with same message), and the console shows errors as this format:

      [14:08:21] User Authenticator #4/INFO: UUID of player EERRR is e0db3735-530a-44fc-80de-6a5f0613a26c
      [14:08:21] Netty Epoll Server IO #2/ERROR: java.lang.NullPointerException
      [14:08:21] Netty Epoll Server IO #2/WARN: java.lang.NullPointerException
      [14:08:21] Netty Epoll Server IO #2/ERROR: java.lang.NullPointerException
      [14:08:21] Netty Epoll Server IO #2/WARN: java.lang.NullPointerException
      [14:08:21] [Server thread/INFO]: EERRR[/183.198.234.134:46415] logged in with entity id 3577 at ([world]-16.5, 76.0, 29.5)
      [14:08:22] [Server thread/INFO]: EERRR lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException

       

       

      Players cannot join this server until I restart server. And these errors will happed again.

            Unassigned Unassigned
            BredyAK Bredy Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: