mojira.dev
MC-46345

Maps stop updating after going through nether portal / Map update packets ignored by client

On servers, maps will stop updating after they have been in hell. You don't have to have opened them, they could have just been in your inventory. When you resurface to the over-world, the map will have froze and so will your marker. The only way to have the map update again, is to re-log.
As you can see, I am standing on a platform where I can AFK for better drop rates on my mob farm(photo1). The map is working but as I enter and leave the nether, (photos1&2) the map still currently says I'm at that position (photo3). Until I have just re-logged, it only works (photo4) This was done in a private 14w04b server. This bug is affecting me in a severe way, due to the fact that my computer is old, and takes forever for me to actually log in.


Mod edit: Added description of MC-79225 :
There are some unresolved and/or abandoned bugs for this issue. I was doing a bit of programming using map packets, and eventually found out that the client ignores map update packets once the dimension has been changed.

The easiest way to reproduce (singleplayer or multiplayer):

  • Create a map for your current area

  • Create a nether portal

  • Go in the nether portal and then return back

  • Notice your map no longer updates

Any update packets sent that corresponds with the damage value that corresponds with the map created at the start of the above process is ignored after dimensions are changed.

Logging out and logging back in (or quitting to title on singleplayer) fixes the issue, but is a poor temporary fix.

Also, it's worth noting that every single map ID that the player has handled packets for will no longer update, not just the single packet in the current area.

Notes:

  • You do not need to bring any maps with you into the nether to trigger this bug.

  • When the dimension is changed, the map's canvas is cleared on the client's side to all zero pixel values (impossible without modding the server).

  • Once the map is updated with any packet that corresponds to its ID, the client displays the last data from when it originally worked (before dimension change), and will not change, and will not show any data from any new incoming packets.


Code analysis: https://bugs.mojang.com/browse/MC-46345?focusedCommentId=295843&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-295843

Related issues

Attachments

Comments

migrated
[media][media][media][media]
migrated

I can confirm. It doesn't update block changes, nor show player movement.

migrated

I confirm. It happened to me many times. Very annoying. PLEASE FIX!!

migrated

It doesn't update even after they've been to the End. But it fixes also itself after reloging.

migrated

It happened to me with 14w30c. It can be easily reproduced in creative mode.

migrated

Still happening in 14w30c. I forgot about this bug, went through the nether and map not working. /stop and then restarting the server fixed it. But that is not a good solution if other people are online

migrated

Also happens in SP.

migrated

Confirmed on 1.8

migrated

Still broken in 1.8 on vanilla server. Confirmed

migrated

It might be related to chunk loading and not nether portals
http://youtu.be/bDycdAMcC1o?t=18m47s

migrated

Very annoying bug

Maps of the Nether will also freeze upon entering the Nether.

Using maps to build Nether shortcut networks involves a whole lot of disconnect/reconnect.

migrated

This is still happening in 1.8.1 in singleplayer.

migrated

This is happening in 1.8.1 on my Minecraft realm. I find it very troublesome, as I like to use the Nether for transit and exploring.

migrated

Made an account just to vote for this one to be fixed.

Since I run a vanilla server, this is the one that breaks the game's playability for us the most. We use the nether for a lot of things, including transportation since we are spread out (and have explored a fairly large area already).

I have to shut down the whole server and kick everyone off if anyone who has been in the nether since it last started up wants to use maps for navigating the area we already have, or exploring further. It doesn't matter if you log out and in again.

PLEASE FIX THIS. This is much, MUCH, more crucial than issues like the anvil showing "too many levels" before you put a second item on. It seems to have more votes as well that the other stuff being worked on.

Thanks!

kumasasa

IMO this is a client issue. Don't have to restart the server to get the maps working again, restarting the client is sufficient.

migrated

I have made the experience that restarting the client does not help at all, we always have to restart the realm to use the maps again.

migrated

Requires a restart of my server. Very disruptive for large-scale exploring. Please Fix!

migrated

Restarting the client on 1.8.3 worked for me while while playing on a private Vanilla server.

migrated

Still exists in Minecraft 1.8.3 in singleplayer and multiplayer - this is a client sided bug where the client stops updating (and locks up) all the map IDs it has viewed when the player switches dimensions, requiring a client restart.

migrated

I did some further testing. If a Client does not receive the "PacketPlayOutRespawn" packet this bug will not occur. The player will as a result experience various other bugs but i could confirm that this bug is specifically triggered by the PacketPlayOutRespawn Packet.

migrated

PlacketPlayerOutRespawn is the packet that is responsible for dimension changes, it is used to change the world the player is currently in.

I have since created a workaround by tracking client-side map IDs that are bugged out and translating packet data (item frame metadata packet) to write map pixels to a map ID that is not bugged out for the client. It's a dirty workaround, but there is no other solution at the moment.

Here is the source code that contains the majority of the process for packet translation (internals of my Consoles API):

https://github.com/wacossusca34/Consoles/blob/master/src/main/java/jarcode/consoles/ConsoleHandler.java

EDIT: And the issue is still present in version 1.8.4

migrated

@Jarcode im talking about witholding the packet. The server will change the player but not inform the player about that change.
This results in various client-side bugs/glitches but the maps are still working as intended on the client side. Meaning the packet has this bug as a direct result - no other packets should need to be checked to fix this bug.

OT: A tip for your plugin: if you intend to support bungeecord you will need to split the MapId-Cache into parts and give all servers a section - else the players will get bugged maps once changing the servers - had the same problem.

migrated

> if you intend to support bungeecord you will need to split the MapId-Cache into parts and give all servers a section

Yes, I'm currently trying to find the best approach for this. Unfortunately, the problem with supporting bungeecord becomes much more complex when you have to account for servers that could be using modded maps, but do not have the plugin installed.

And I highly suggest against withholding the respawn packet as a fix.

migrated

Still occurring in 1.8.5.

migrated

Playing singleplayer, I went through the nether and out for the first time. I noticed that the map I had wasn't telling me where I was, so I assumed that my character just didn't know where he was in relation to the old map, and so I wasted resources making new maps before starting to explore and realising that I knew exactly where I was. A bit annoying if I have to quit to the title every time I want to go exploring using nether transit.

migrated

This bug is still occurring in 1.8.7 and it's causing a lot of trouble on our network as you see the wrong maps everywhere when you travel to a different server unless you reconnect manually. I'd give anything to see this fixed in the next release.

migrated

Happens for me in 1.8.7 survival with a LAN connection to one other player. Both players affected.

migrated

I just noticed this issue in PC Minecraft 1.8.8 in single-player survival mode.

migrated

This bug still occurs for me in the latest snapshot - 15w47b. After the bug occurs, a newly created map will work, but stop working as soon as you go through the nether again.
Tested in 15w47b, Windows, 64-bit Java, single player.

migrated

Might be related to MC-679.

migrated

Occuring here. Single player survival 1.8.8.

shufboyardee

Affects 16w07a.

shufboyardee

Affects 16w07b.

shufboyardee

Affects 1.9 Pre-release 1.

migrated

Mojang, please stop ignoring this issue. This is an easy fix in the client code.

migrated

Confirmed in 1.8.9 singleplayer and multiplayer.

migrated

I'm in 1.9 and just tossed another 1:16 map in the lava, cuz I forgot to put it away before going through the nether.

marcono1234

Confirmed for

  • 1.9.1-pre3

marcono1234

Please link to this comment in the description

The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

The problem is that joining and respawning (method net.minecraft.client.network.NetHandlerPlayClient.handleRespawn(SPacketRespawn)) creates both a new net.minecraft.client.multiplayer.WorldClient object. When the method net.minecraft.client.network.NetHandlerPlayClient.handleMaps(SPacketMaps) is called which handles map item updates from the server it first loads the map from the current net.minecraft.client.multiplayer.WorldClient. If no map exists, it creates a new one. After that it updates this map with the data provided by the packet. Then it calls the method net.minecraft.client.gui.MapItemRenderer.updateMapTexture(MapData) to update the map data which is used for rendering. This method loads a net.minecraft.client.gui.MapItemRenderer.Instance (which is later used for rendering) based on the map id (the damage / meta data value of the map). If no entry exists, it creates a new one.

The following shows what this causes (with examples):

  1. Player opens a world

    1. WorldClient1 is created (Overworld) and set as current world

  2. Player activates map

    1. MapData gets created for WorldClient1

    2. MapItemRenderer.Instance gets created

  3. Player enters the Nether

    1. WorldClient2 is created (Nether) and set as current world

  4. Map is updated

    1. MapData gets created for WorldClient2

    2. No MapItemRenderer.Instance gets created as one for this map ID already exists

  5. Player leaves the Nether

    1. WorldClient3 is created (Overworld) and set as current world

  6. Map is updated

    1. MapData gets created for WorldClient3

    2. No MapItemRenderer.Instance gets created as one for this map ID already exists

This means that a MapData object gets modified that is not used for rendering.

How this can be fixed

These are only suggestions.

Overwriting existing MapItemRenderer.Instance

When the method net.minecraft.item.ItemMap.loadMapData(int, World) is called to return the stored MapData of the world and no MapData exists, the method could test if a MapItemRenderer.Instance object exists for the map ID and if so override its MapData with the new MapData and store. Creating a new entry is not needed because the method net.minecraft.client.gui.MapItemRenderer.getMapRendererInstance(MapData) will do that.
Note: The old map stored by the MapItemRenderer.Instance might needs to be merged with the new one. I noticed that otherwise already loaded areas will be blank.

Clearing loaded maps when creating new WorldClient

When a new WorldClient gets created because the player respawns or travels to another dimension, all loaded maps could be cleared using the method net.minecraft.client.gui.MapItemRenderer.clearLoadedMaps().
Note: This is probably the worse choice because maps from another dimension will lose their content in a different dimension (for example a map from the Nether in the Overworld).

There might be other ways to solve this.

thilo77

This is still an issue in 1.9.2.

migrated

For me, this also causes cloned maps in item frames to no longer show as a green arrow once you go into the nether.

shufboyardee

Affects 1.9.4.

migrated

I confirm, it's still affects 1.9.4. Very annoying. Please fix it.

shufboyardee

Affects 16w20a.

migrated

Confirmed for 1.10 😞

migrated

confirmed in 1.10.2.
Im even having the issue that any maps in the WORLD freeze, even ones in chests,item frames, or ender chests. Not just held in my inventory. And these maps are not updatable even after relogging\restarting in singleplayer.

migrated

@unknown

Affects Version/s: ......Minecraft 1.10.2

Already marked as affected, please look if it's listed already before confirming it.

migrated

Confirmed, still broken in 16w40a. This does not only affect multiplayer but single player as well. Leaving server/world and going back in will reset the maps so they will show your position once again.

migrated

MC-46345 was marked as fixed, if this is actually the case (no version released yet) this should fix MC-80782 and MC-98707 too.
If MC-46345 somehow does not fix the other two the severity of the memoryleak may increase greatly.

migrated

Agnes Larsson

Confirmed

Minecraft 14w04b, Minecraft 1.7.10, Minecraft 14w30c, Minecraft 1.8-pre2, Minecraft 1.8-pre3, ..., Minecraft 16w33a, Minecraft 16w36a, Minecraft 16w38a, Minecraft 16w39c, Minecraft 16w40a

Minecraft 16w42a

Retrieved