Paper: Server crash when a player connect (Modified nbt items)

Created on 22 Sep 2018  路  9Comments  路  Source: PaperMC/Paper

Link/paste of stack trace

---- Minecraft Crash Report ----
// Shall we play a game?

Time: 9/22/18 10:25 AM
Description: Ticking player

java.lang.IllegalArgumentException: Name cannot be empty
        at org.apache.commons.lang.Validate.notEmpty(Validate.java:321)
        at org.bukkit.attribute.AttributeModifier.<init>(AttributeModifier.java:32)
        at org.bukkit.attribute.AttributeModifier.<init>(AttributeModifier.java:27)
        at org.bukkit.craftbukkit.v1_13_R2.attribute.CraftAttributeInstance.convert(CraftAttributeInstance.java:73)
        at org.bukkit.craftbukkit.v1_13_R2.inventory.CraftMetaItem.buildModifiers(CraftMetaItem.java:397)
        at org.bukkit.craftbukkit.v1_13_R2.inventory.CraftMetaItem.<init>(CraftMetaItem.java:335)
        at org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack.getItemMeta(CraftItemStack.java:457)
        at org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack.asBukkitCopy(CraftItemStack.java:72)
        at net.minecraft.server.v1_13_R2.EntityLiving.tick(EntityLiving.java:2141)
        at net.minecraft.server.v1_13_R2.EntityHuman.tick(EntityHuman.java:163)
        at net.minecraft.server.v1_13_R2.EntityPlayer.playerTick(EntityPlayer.java:402)
        at net.minecraft.server.v1_13_R2.PlayerList.disconnect(PlayerList.java:431)
        at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1449)
        at net.minecraft.server.v1_13_R2.NetworkManager.handleDisconnection(NetworkManager.java:347)
        at net.minecraft.server.v1_13_R2.ServerConnection.c(ServerConnection.java:154)
        at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1117)
        at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:434)
        at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:945)
        at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:843)
        at java.lang.Thread.run(Thread.java:748)

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------



-- Head --
Thread: Server thread
Stacktrace:
        at org.apache.commons.lang.Validate.notEmpty(Validate.java:321)
        at org.bukkit.attribute.AttributeModifier.<init>(AttributeModifier.java:32)
        at org.bukkit.attribute.AttributeModifier.<init>(AttributeModifier.java:27)
        at org.bukkit.craftbukkit.v1_13_R2.attribute.CraftAttributeInstance.convert(CraftAttributeInstance.java:73)
        at org.bukkit.craftbukkit.v1_13_R2.inventory.CraftMetaItem.buildModifiers(CraftMetaItem.java:397)
        at org.bukkit.craftbukkit.v1_13_R2.inventory.CraftMetaItem.<init>(CraftMetaItem.java:335)
        at org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack.getItemMeta(CraftItemStack.java:457)
        at org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack.asBukkitCopy(CraftItemStack.java:72)
        at net.minecraft.server.v1_13_R2.EntityLiving.tick(EntityLiving.java:2141)
        at net.minecraft.server.v1_13_R2.EntityHuman.tick(EntityHuman.java:163)

-- Player being ticked --
Details:
        Entity Type: minecraft:player (net.minecraft.server.v1_13_R2.EntityPlayer)
        Entity ID: 3573
        Entity Name: Lxct
        Entity's Exact location: -132.51, 74.91, -412.69
        Entity's Block location: World: (-133,74,-413), Chunk: (at 11,4,3 in -9,-26; contains blocks -144,0,-416 to -129,255,-401), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512[...]
        Entity's Momentum: 0.00, 0.00, 0.00
        Entity's Passengers: []
        Entity's Vehicle: ~~ERROR~~ NullPointerException: null

Stacktrace:
        at net.minecraft.server.v1_13_R2.EntityPlayer.playerTick(EntityPlayer.java:402)
        at net.minecraft.server.v1_13_R2.PlayerList.disconnect(PlayerList.java:431)
        at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1449)
        at net.minecraft.server.v1_13_R2.NetworkManager.handleDisconnection(NetworkManager.java:347)
        at net.minecraft.server.v1_13_R2.ServerConnection.c(ServerConnection.java:154)
        at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1117)
        at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:434)
        at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:945)
        at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:843)
        at java.lang.Thread.run(Thread.java:748)
-- System Details --
Details:
        Minecraft Version: 1.13.1
        Operating System: Linux (amd64) version 4.18.5-1.el7.elrepo.x86_64
        Java Version: 1.8.0_181, Oracle Corporation
        Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
        Memory: 4709151968 bytes (4490 MB) / 6442450944 bytes (6144 MB) up to 6442450944 bytes (6144 MB)
        JVM Flags: 14 total; -Xms6G -Xmx6G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G[...]
        CraftBukkit Information:
   Running: Paper version git-Paper-279 (MC: 1.13.1) (Implementing API version 1.13.1-R0.1-SNAPSHOT) true
   Plugins: { CoreProtect v2.15.1 net.coreprotect.CoreProtect [Intelli], LuckPerms v4.2.58* me.lucko.luckperms.bukkit.LPBukkitBootstrap [Luck], TPA v1.0 me.Lxct.tpa.main [Lxct], ColoredSigns v2[...]
   Warnings: DEFAULT
   Reload Count: 0
   Threads: { TIMED_WAITING luckperms-1: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215), java.util.concurrent.locks.AbstractQueuedS[...]

        Profiler Position: N/A (disabled)
        Player Count: 5 / 50; [EntityPlayer['PapaPorg'/2646, uuid='b777bbd5-2f36-4d2f-a67e-5662c8b0bde8', l='world', x=-177.22, y=66.00, z=-325.85, cx=-12, cz=-21, tl=9088870, v=true, d=false]([...]
        Data Packs: vanilla, file/addcraft_pack (incompatible), file/advancements (incompatible), file/structures (incompatible), file/bukkit (incompatible), file/garden (incompatible)
        Is Modded: Definitely; Server brand changed to 'Paper'
        Type: Dedicated Server (map_server.txt)

Plugin list:

Plugins (26): AutoAFK, ColoredSigns, ColorfulChat, CoreProtect, CustomHelp, FastAsyncWorldEdit, HealthBar, HomeSpawn, LuckPerms, MobHeads, OpenInv, ProtocolLib, React, ShopChest, Shopkeepers, SmoothSleep, SuperVanish, TAB, TagSomeone, TheNewEconomy, TPA, TreysCommandBlocker, Vault, VaultChatFormatter, WorldBorder, WorldEdit

Actions to reproduce (if known):

Give yourself an item with an attribute modifier then disconnect and reconnect.

Paper build number:

All versions over 275

Most helpful comment

This has stopped since 284. Thanks for help !

All 9 comments

Its not random. It happens to players with custom items in their inventory (with custom attributes from a datapack or plugin). CraftBukkit's new AttributeAPI is breaking a lot of things like this and disconnecting players.

Its not random. It happens to players with custom items in their inventory (with custom attributes from a datapack or plugin). CraftBukkit's new AttributeAPI is breaking a lot of things like this and disconnecting players.

Ok so this happen when i have an Item with an attribute modifier inside.

It means you have an AttributeModifier with an empty name. Give it a name (the name itself doesn't matter) and you should be fine.

Bukkit has had a non-empty name requirement for AttributeModifiers since 2016.

It means you have an AttributeModifier with an empty name. Give it a name (the name itself doesn't matter) and you should be fine.

Bukkit has had a non-empty name requirement for AttributeModifiers since 2016.

Everything works well on 275 so it's not that.

Yes it is.
at org.bukkit.attribute.AttributeModifier.<init>(AttributeModifier.java:32)

Line 32 of AttributeModifier is:
Validate.notEmpty(name, "Name cannot be empty"); which is inside the constructor.

How can i fix that ? Still crash on lastest version.
275 is the only version that doesn't crash. All versions over 275 crash.

@oxycclock will need a new stack trace if it still crashes.

try in latest build, I pushed another fix related to this.

This has stopped since 284. Thanks for help !

Was this page helpful?
0 / 5 - 0 ratings