Mojira Archive
MC-108079

Crash when trading or picking up filled map with invalid data value from furnace

The bug

When you receive a filled map with an invalid data value and either the map_scale_direction (int) or the map_tracking_position (byte) tag from a villager or pick it up from the output slot of a furnace Minecraft crashes.

How to reproduce

  1. Use the following command
    /setblock ~ ~ ~ furnace default replace {Items:[{Slot:2b,id:"filled_map",Count:1b,Damage:32767s,tag:{map_tracking_position:1b}}]}
    
  2. Pick up the map

The reason

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

The methods net.minecraft.item.ItemMap.scaleMap(ItemStack, World, int) and net.minecraft.item.ItemMap.enableMapTracking(ItemStack, World) try to get the map data with the used data value, as it does not exist and the client will not create it, it is null and a NullPointerException occurs when the methods try to get the values of its fields.

Fixed

Marcono1234

[Mojang] Agnes Larsson

2016-10-01, 10:00 PM

2017-06-03, 03:56 PM

2016-10-03, 04:06 PM

1

0

Confirmed

crash, filled_map, furnace, map, villager

Minecraft 16w39c

Minecraft 16w40a