mojira.dev
MC-30940

Game crashes and deletes chunks when encountering invalid items, such as lit Redstone Lamps broken with Silk Touch

When the game encounters an unrecognized or "invalid" item ID, it reacts by crashing and often deleting the chunk which contained the item. Invalid item IDs can be created in a number of ways, including breaking lit redstone lamps with a Silk Touch enchantment, or loading a world from a version where these IDs are considered valid.

Steps to Reproduce:
1. Place a redstone lamp, and power it.
2. In survival, break the lamp with a Silk Touch tool.
3. Observe that the game crashes, and when you reload the world, the chunk will be regenerated (all player-made structures removed, and all mined ores respawned).

Alternate Steps to Reproduce:
1. Load up a world in Minecraft 1.6.2.
2. Type "/give @p 75" (you must have Cheats enabled)
3. Observe that you are given an unlit redstone torch. It seems to work perfectly fine as an item when held, placed in a chest, mounted in an item frame, or placed as a block. No crashes occur.
4. Place the torch in a chest, and save/exit the world.
5. Load the world in 13w37a.
6. Observe that the entire chunk containing the chest has been refreshed.

Linked issues

Attachments

Comments 20

It says my "Game may be modded, and as such [they] can't accept [the] crash report."

Hogwash! Hogwash, I say!

Edit: Can't get chunk deleted in SSP, even after 3 attempts. The game crashed all three times, and it lied about mods all three times, too.

I can confirm. Just to specify, must be done in survival mode - not creative mode.

However my crash dump detects the client as vanilla just fine, unlike the above comment.

Edit: Attached crash dump to confirm,

Zuriki - Crash dump confirmation

This is NOT a duplicate. The item is not retrieved, it causes a CRASH and CHUNK ERROR. Duplicate link says item enters inventory with NO CRASH.

One is harmless, this is a severe crash. Please reverse the duplication link.

10 more comments

Still affects 13w41b. Tried to /give myself block 36 for no reason, on the second attempt minecraft crashed. When I reloaded the world the chunk I was in was completely reset, all changes to it were lost.

My world's fine now, with some tricky NBT editing I managed to restore the chunk in question from a world backup.

I commented on MC-32880 with this story also, found that one first.

Confirmed for 1.7 prerelease.

This is really bad. I just made a world in 1.6.4 and mined lit RSlamps with silk touch in survival. I placed them inside item frames, and dropped some on the ground too.

Upon loading the world in 1.7, the entire chunks were deleted and regenerated with new terrain.

This bug is completely abusable by survival players, and poses a threat to survival servers planning to update from 1.6.4 (or earlier) to 1.7 without a world reset. If it isn't going to be fixed before 1.7 is publicly released, this ticket ought to be marked as a security issue.

You cannot expect server owners to manually check every item frame in their world to ensure that it doesn't contain a lit redstone lamp before they upgrade, and it's not trivial to tell whether a griefer has abused this bug to create new chunks in some remote part of a large server. Even if you make a backup before updating your server, this bug is just too abusable.

Thanks for fixing, Dinnerbone!

New behavior is to delete any invalid items encountered in item frames. However, it will also delete item data associated with a dropped item entity. This results in a dropped item which visually looks like stone, and until the item is picked up (becoming an actual stone block), the game is incredibly slow and the console spams the following rapidly and continuously:

Client> [10:31:27] [Client thread/ERROR]: Item entity 373 has no item?!
Client> [10:31:27] [Server thread/ERROR]: Item entity 373 has no item?!

Ah well, the chunks aren't getting deleted, so this is no longer nearly so abusable. I suppose even if a griefer plants these items to lag a server, they should still despawn after five minutes (I've yet to test if they can despawn) and won't have any effect until their chunks are loaded anyhow.

Thanks for fixing, Dinnerbone!

New behavior is to delete any invalid items encountered in item frames. However, it will also delete item data associated with a dropped item entity. This results in a dropped item which visually looks like stone, and until the item is picked up (becoming an actual stone block), the game is incredibly slow and the console spams the following rapidly and continuously:

Client> [10:31:27] [Client thread/ERROR]: Item entity 373 has no item?!
Client> [10:31:27] [Server thread/ERROR]: Item entity 373 has no item?!

Ah well, the chunks aren't getting deleted, so this is no longer nearly so abusable. I suppose even if a griefer plants these items to lag a server, they should still despawn after five minutes (I've yet to test if they can despawn) and won't have any effect until their chunks are loaded anyhow.

Looks like he opted to change the block id to 0 (air). This creates the same issue, as air is a invalid id, but it proves it isn't deleting chunks.

I would advise changing it to something thoroughly worthless, such as stone (1).
Oh, and this is just my opinion, but I like using numeric ids. For instance, if you want to set a block to "Block 36" (Which is the common name for minecraft:piston_extention), I find it easier to type /setblock ~ ~ ~ 36 than /setblock ~ ~ ~ minecraft:piston_extention. What makes that annoying is you need to type all of minecraft: to use tab complete, so it is a pain to save time with that. (IE, if you type pi and then tab, you get nothing, but if you type minecraft:pi, you get piston and several other things). Most of that stuff is just me rambling, but I feel it is worth saying.

I just got Couldn't Load Chunks in 14w32d:

[13:38:18] [Server thread/ERROR]: Couldn't load chunk
u: Loading entity NBT
  at wt.f(SourceFile:1244) ~[minecraft_server.jar:?]
  at wz.a(SourceFile:173) ~[minecraft_server.jar:?]
  at bfr.a(SourceFile:330) ~[minecraft_server.jar:?]
  at bfr.a(SourceFile:95) ~[minecraft_server.jar:?]
  at bfr.a(SourceFile:83) ~[minecraft_server.jar:?]
  at qq.e(SourceFile:129) ~[minecraft_server.jar:?]
  at qq.c(SourceFile:81) ~[minecraft_server.jar:?]
  at qq.d(SourceFile:116) ~[minecraft_server.jar:?]
  at aqn.a(SourceFile:276) ~[minecraft_server.jar:?]
  at aqn.f(SourceFile:272) ~[minecraft_server.jar:?]
  at aqn.p(SourceFile:659) ~[minecraft_server.jar:?]
  at aqn.a(SourceFile:2358) ~[minecraft_server.jar:?]
  at aqn.y(SourceFile:2389) ~[minecraft_server.jar:?]
  at aqn.c(SourceFile:2405) ~[minecraft_server.jar:?]
  at aus.f(SourceFile:146) ~[minecraft_server.jar:?]
  at aui.f(SourceFile:116) ~[minecraft_server.jar:?]
  at aui.j(SourceFile:90) ~[minecraft_server.jar:?]
  at aui.g(SourceFile:177) ~[minecraft_server.jar:?]
  at aus.a(SourceFile:103) ~[minecraft_server.jar:?]
  at aqn.e(SourceFile:2837) ~[minecraft_server.jar:?]
  at add.a(SourceFile:137) ~[minecraft_server.jar:?]
  at add.a(SourceFile:167) ~[minecraft_server.jar:?]
  at wt.f(SourceFile:1235) ~[minecraft_server.jar:?]
  at wz.a(SourceFile:173) ~[minecraft_server.jar:?]
  at bfr.a(SourceFile:330) ~[minecraft_server.jar:?]
  at bfr.a(SourceFile:95) ~[minecraft_server.jar:?]
  at bfr.a(SourceFile:83) ~[minecraft_server.jar:?]
  at qq.e(SourceFile:129) ~[minecraft_server.jar:?]
  at qq.c(SourceFile:81) ~[minecraft_server.jar:?]
  at qq.d(SourceFile:116) ~[minecraft_server.jar:?]
  at aqn.a(SourceFile:276) ~[minecraft_server.jar:?]
  at aqn.f(SourceFile:272) ~[minecraft_server.jar:?]
  at aqn.p(SourceFile:659) ~[minecraft_server.jar:?]
  at aqn.a(SourceFile:2358) ~[minecraft_server.jar:?]
  at aqn.y(SourceFile:2389) ~[minecraft_server.jar:?]
  at aqn.c(SourceFile:2405) ~[minecraft_server.jar:?]
  at aus.f(SourceFile:146) ~[minecraft_server.jar:?]

Dakota Lal

Nathan Adams

Unconfirmed

Minecraft 13w37a, Minecraft 13w37b, Minecraft 13w38b, Minecraft 13w38c, Minecraft 13w39a, Minecraft 13w41b, Minecraft 13w42a, Minecraft 13w42b, Minecraft 13w43a, Minecraft 1.7

Minecraft 1.7.1

Retrieved