mojira.dev
MC-85027

Villager selling null crashes clients.

The command

/summon Villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:1},sell:{}}]}}

will crash any client that attempts to interact with the villager and place an item into the "buy" slot. This allows servers to crash clients by sending bad villager data.

I assume this is due to either a mishandled null or a an issue with a draw call.

The relevant client crash report: https://gist.github.com/drXor/14433dbbf43705c46e36

Comments

[Mod] redstonehelper

I think this is fixed (somewhere between 15w44b and 1.8.8), it didn't crash me anymore. However, when I ran

/entitydata @e[type=Villager,r=5] {}

on the villager, I got

An unknown error occurred while attempting to perform this command

And this appeared in the console:

[23:49:16] [Server thread/INFO]: Saving chunks for level 'Copy of Copy of New World'/Overworld
[23:49:16] [Server thread/ERROR]: Failed to save chunk
e: Saving entity NBT
	at ro.e(SourceFile:1302) ~[15w44b.jar:?]
	at ro.d(SourceFile:1243) ~[15w44b.jar:?]
	at asl.a(SourceFile:216) ~[15w44b.jar:?]
	at asl.a(SourceFile:102) [15w44b.jar:?]
	at lp.b(SourceFile:147) [15w44b.jar:?]
	at lp.a(SourceFile:166) [15w44b.jar:?]
	at lq.a(SourceFile:885) [15w44b.jar:?]
	at net.minecraft.server.MinecraftServer.a(SourceFile:370) [15w44b.jar:?]
	at bya.a(SourceFile:213) [15w44b.jar:?]
	at bya.C(SourceFile:144) [15w44b.jar:?]
	at net.minecraft.server.MinecraftServer.run(SourceFile:450) [15w44b.jar:?]
	at java.lang.Thread.run(Thread.java:695) [?:1.6.0_65]
Caused by: java.lang.NullPointerException
	at ahb.k(SourceFile:130) ~[15w44b.jar:?]
	at ahc.a(SourceFile:132) ~[15w44b.jar:?]
	at zj.b(SourceFile:258) ~[15w44b.jar:?]
	at ro.e(SourceFile:1284) ~[15w44b.jar:?]
	... 11 more
pascalos99

I got this error on a server client:

[17:13:36 ERROR]: Failed to save chunk
e: Saving entity NBT
at rr.e(SourceFile:1322) ~[minecraft_server.jar:?]
at rr.d(SourceFile:1263) ~[minecraft_server.jar:?]
at ass.a(SourceFile:216) ~[minecraft_server.jar:?]
at ass.a(SourceFile:102) [minecraft_server.jar:?]
at lo.b(SourceFile:147) [minecraft_server.jar:?]
at lo.a(SourceFile:166) [minecraft_server.jar:?]
at lp.a(SourceFile:883) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.a(SourceFile:371) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.C(SourceFile:571) [minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:457) [minecraft_server.jar:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_71]
Caused by: java.lang.NullPointerException
at ahg.k(SourceFile:130) ~[minecraft_server.jar:?]
at ahh.a(SourceFile:132) ~[minecraft_server.jar:?]
at ze.b(SourceFile:258) ~[minecraft_server.jar:?]
at rr.e(SourceFile:1304) ~[minecraft_server.jar:?]
at rr.c(SourceFile:1253) ~[minecraft_server.jar:?]
at rr.e(SourceFile:1310) ~[minecraft_server.jar:?]
... 10 more

And now I see this, I think it has to do with it, altough I diidn't give tthe villager no items to sell but misspelled the id of the item (id:"minecraft:salmon").

Xor Boole

(Unassigned)

Unconfirmed

Minecraft 1.8.8

Minecraft 15w44b

Retrieved