The bug
Modifying the NBT data of a fishing hook / bobber causes Minecraft to crash.
java.lang.NullPointerException: Executing command block
How to reproduce
Place an activated repeating command block with the following command
/entitydata @e[type=!Player] {CustomName:"Test",CustomNameVisible:1b}
Use a fishing rod
→ Minecraft (server) crashes
Linked issues
is duplicated by 10
Attachments
Comments 9
This happened to me a few days ago, but it happened while setting a fishing hook's scoreboard value. My game crashed immediately when I threw a fishing hook - but it didn't happen when I tried it again.
Crash report
---- Minecraft Crash Report ----
// Oops.
Time: 18/05/16 3:05 PM
Description: Executing command block
java.lang.NullPointerException: Executing command block
at rv.a(SourceFile:324)
at p$1.a(SourceFile:188)
at p$1.apply(SourceFile:185)
at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:359)
at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:359)
at aia.a(SourceFile:2283)
at p.a(SourceFile:490)
at p.b(SourceFile:143)
at k.a(SourceFile:51)
at ahp.a(SourceFile:114)
at aku.b(SourceFile:96)
at lr.a(SourceFile:645)
at lr.d(SourceFile:216)
at net.minecraft.server.MinecraftServer.D(SourceFile:618)
at net.minecraft.server.MinecraftServer.C(SourceFile:554)
at bzg.C(SourceFile:155)
at net.minecraft.server.MinecraftServer.run(SourceFile:458)
at java.lang.Thread.run(Thread.java:745)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Server thread
Stacktrace:
at rv.a(SourceFile:324)
at p$1.a(SourceFile:188)
at p$1.apply(SourceFile:185)
at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:359)
at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:359)
at aia.a(SourceFile:2283)
at p.a(SourceFile:490)
at p.b(SourceFile:143)
at k.a(SourceFile:51)
-- Command to be executed --
Details:
Command: /scoreboard players add @e[type=!Player] age 1
Name: @
Stacktrace:
at ahp.a(SourceFile:114)
at aku.b(SourceFile:96)
-- Block being ticked --
Details:
Block: minecraft:repeating_command_block[conditional=false,facing=up]
Block location: World: (1213,4,1581), Chunk: (at 13,0,13 in 75,98; contains blocks 1200,0,1568 to 1215,255,1583), Region: (2,3; contains chunks 64,96 to 95,127, blocks 1024,0,1536 to 1535,255,2047)
Stacktrace:
at lr.a(SourceFile:645)
at lr.d(SourceFile:216)
-- Affected level --
Details:
Level name: Bug Testing
All players: 1 total; [lt['__null'/11141, l='Bug Testing', x=1224.92, y=6.17, z=1578.42]]
Chunk stats: ServerChunkCache: 1089 Drop: 0
Level seed: 80979463
Level generator: ID 01 - flat, ver 0. Features enabled: true
Level generator options:
Level spawn location: World: (1205,9,1556), Chunk: (at 5,0,4 in 75,97; contains blocks 1200,0,1552 to 1215,255,1567), Region: (2,3; contains chunks 64,96 to 95,127, blocks 1024,0,1536 to 1535,255,2047)
Level time: 258712 game time, 6000 day time
Level dimension: 0
Level storage version: 0x04ABD - Anvil
Level weather: Rain time: 1 (now: false), thunder time: 1 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
Stacktrace:
at net.minecraft.server.MinecraftServer.D(SourceFile:618)
at net.minecraft.server.MinecraftServer.C(SourceFile:554)
at bzg.C(SourceFile:155)
at net.minecraft.server.MinecraftServer.run(SourceFile:458)
at java.lang.Thread.run(Thread.java:745)
-- System Details --
Details:
Minecraft Version: 16w20a
Operating System: Mac OS X (x86_64) version 10.11.4
Java Version: 1.8.0_74, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 164454552 bytes (156 MB) / 522715136 bytes (498 MB) up to 932184064 bytes (889 MB)
JVM Flags: 2 total; -Xms512M -Xmx1000M
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
Profiler Position: N/A (disabled)
Player Count: 1 / 8; [lt['__null'/11141, l='Bug Testing', x=1224.92, y=6.17, z=1578.42]]
Type: Integrated Server (map_client.txt)
Is Modded: Probably not. Jar signature remains and both client + server brands are untouched.
Confirmed in 16w20a. Our server crashed as soon as someone used a fishing rod.
[14:07:46] [Server thread/INFO]: <§8WolfMatthewC§r> casting in 3
[14:07:47] [Server thread/INFO]: <§7Avangion§r> what happened?
[14:07:49] [Server thread/INFO]: <§8WolfMatthewC§r> 2
[14:07:51] [Server thread/INFO]: <§8WolfMatthewC§r> 1
[14:07:52] [Server thread/WARN]: Couldn't set damage of loot item 1xitem.rabbitHide@0
[14:07:52] [Server thread/ERROR]: Encountered an unexpected exception
f: Executing command block
at net.minecraft.server.MinecraftServer.D(SourceFile:622) ~[minecraft_server.16w20a.jar:?]
at lc.D(SourceFile:340) ~[minecraft_server.16w20a.jar:?]
at net.minecraft.server.MinecraftServer.C(SourceFile:554) ~[minecraft_server.16w20a.jar:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:458) [minecraft_server.16w20a.jar:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]
Caused by: java.lang.NullPointerException
at rv.a(SourceFile:324) ~[minecraft_server.16w20a.jar:?]
at p$1.a(SourceFile:188) ~[minecraft_server.16w20a.jar:?]
at p$1.apply(SourceFile:185) ~[minecraft_server.16w20a.jar:?]
at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:359) ~[minecraft_server.16w20a.jar:?]
at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:359) ~[minecraft_server.16w20a.jar:?]
at aia.a(SourceFile:2283) ~[minecraft_server.16w20a.jar:?]
at p.a(SourceFile:490) ~[minecraft_server.16w20a.jar:?]
at p.b(SourceFile:143) ~[minecraft_server.16w20a.jar:?]
at k.a(SourceFile:51) ~[minecraft_server.16w20a.jar:?]
at ahp.a(SourceFile:114) ~[minecraft_server.16w20a.jar:?]
at aku.b(SourceFile:96) ~[minecraft_server.16w20a.jar:?]
at lr.a(SourceFile:645) ~[minecraft_server.16w20a.jar:?]
at lr.d(SourceFile:216) ~[minecraft_server.16w20a.jar:?]
at net.minecraft.server.MinecraftServer.D(SourceFile:618) ~[minecraft_server.16w20a.jar:?]
... 4 more
[14:07:52] [Server thread/ERROR]: This crash report has been saved to: /home/minecraft/multicraft/servers/server3258/./crash-reports/crash-2016-05-23_14.07.52-server.txt
[14:07:52] [Server thread/INFO]: Stopping server
[14:07:52] [Server thread/INFO]: Saving players
---- Minecraft Crash Report ----
// I blame Dinnerbone.
Time: 5/23/16 2:07 PM
Description: Executing command block
java.lang.NullPointerException: Executing command block
at rv.a(SourceFile:324)
at p$1.a(SourceFile:188)
at p$1.apply(SourceFile:185)
at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:359)
at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:359)
at aia.a(SourceFile:2283)
at p.a(SourceFile:490)
at p.b(SourceFile:143)
at k.a(SourceFile:51)
at ahp.a(SourceFile:114)
at aku.b(SourceFile:96)
at lr.a(SourceFile:645)
at lr.d(SourceFile:216)
at net.minecraft.server.MinecraftServer.D(SourceFile:618)
at lc.D(SourceFile:340)
at net.minecraft.server.MinecraftServer.C(SourceFile:554)
at net.minecraft.server.MinecraftServer.run(SourceFile:458)
at java.lang.Thread.run(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Server thread
Stacktrace:
at rv.a(SourceFile:324)
at p$1.a(SourceFile:188)
at p$1.apply(SourceFile:185)
at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:359)
at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:359)
at aia.a(SourceFile:2283)
at p.a(SourceFile:490)
at p.b(SourceFile:143)
at k.a(SourceFile:51)
-- Command to be executed --
Details:
Command: /execute @e[type=ArmorStand,name=spawntp] ~ ~-1 ~ execute @e[type=ThrownEnderpearl,r=1] ~ ~ ~ execute @p ~ ~ ~ particle witchMagic ~ ~1 ~ 0.4 1 0.4 0 16
Name: @
Stacktrace:
at ahp.a(SourceFile:114)
at aku.b(SourceFile:96)
-- Block being ticked --
Details:
Block: minecraft:repeating_command_block[conditional=false,facing=south]
Block location: World: (-530,5,-4), Chunk: (at 14,0,12 in -34,-1; contains blocks -544,0,-16 to -529,255,-1), Region: (-2,-1; contains chunks -64,-32 to -33,-1, blocks -1024,0,-512 to -513,255,-1)
Stacktrace:
at lr.a(SourceFile:645)
at lr.d(SourceFile:216)
-- Affected level --
Details:
Level name: world
All players: 5 total; [lt['epolixa'/1189, l='world', x=-516.18, y=67.06, z=-75.56], lt['Dan_Ko'/1275, l='world', x=-309.70, y=63.00, z=969.09], lt['WolfMatthewC'/1457, l='world', x=-890.68, y=63.00, z=-4685.70], lt['Mister_Bigs'/1712, l='world', x=2789.71, y=55.00, z=-4233.04], lt['Avangion'/2230, l='world', x=-366.66, y=68.94, z=120.25]]
Chunk stats: ServerChunkCache: 2259 Drop: 0
Level seed: 6011900140201931423
Level generator: ID 00 - default, ver 1. Features enabled: true
Level generator options:
Level spawn location: World: (-521,71,-5), Chunk: (at 7,4,11 in -33,-1; contains blocks -528,0,-16 to -513,255,-1), Region: (-2,-1; contains chunks -64,-32 to -33,-1, blocks -1024,0,-512 to -513,255,-1)
Level time: 473532619 game time, 460974 day time
Level dimension: 0
Level storage version: 0x04ABD - Anvil
Level weather: Rain time: 1 (now: false), thunder time: 1 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Stacktrace:
at net.minecraft.server.MinecraftServer.D(SourceFile:618)
at lc.D(SourceFile:340)
at net.minecraft.server.MinecraftServer.C(SourceFile:554)
at net.minecraft.server.MinecraftServer.run(SourceFile:458)
at java.lang.Thread.run(Unknown Source)
-- System Details --
Details:
Minecraft Version: 16w20a
Operating System: Linux (amd64) version 2.6.32-504.8.1.el6.x86_64
Java Version: 1.8.0_45, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 659020760 bytes (628 MB) / 1556938752 bytes (1484 MB) up to 1556938752 bytes (1484 MB)
JVM Flags: 6 total; -Xmx1536M -Xms1536M -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled
IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
Profiler Position: N/A (disabled)
Player Count: 5 / 24; [lt['epolixa'/1189, l='world', x=-516.18, y=67.06, z=-75.56], lt['Dan_Ko'/1275, l='world', x=-309.70, y=63.00, z=969.09], lt['WolfMatthewC'/1457, l='world', x=-890.68, y=63.00, z=-4685.70], lt['Mister_Bigs'/1712, l='world', x=2789.71, y=55.00, z=-4233.04], lt['Avangion'/2230, l='world', x=-366.66, y=68.94, z=120.25]]
Is Modded: Unknown (can't tell)
Type: Dedicated Server (map_server.txt)
Changed title to MC-102526's, that one is more accurate.
This is not because the fishing rod is targeted, but rather that it's thrown in the same tick as a type= command.
Using an impulse command block, ore inserting the command in the chat does not cause it to crash.
Also
/say @e[type=bla]
doesn't crash, it's only if something gets done for every entity, not if a list of entities gets created. Maybe there's something wrong with the @e loop, but not the test if it fits the selector? This is my "code analysis" without actually having the code.
This wasn't the case in 1.9.4, I haven't checked yet, but this is just as a note to mojang.