Resolution note
In general upgrading from a snapshot is not supported and might not work as expected. So far this issue has only appeared when a world has been opened in a snapshot before.
Please comment and if possible provide your world (not upgraded) if you are experiencing this issue for a world which has not been opened in a snapshot before.
The bug
When using a map, it gets filled with gray areas instead of showing terrain. Previously revealed areas are being filled in gray too.
Related issues
is duplicated by
relates to
Attachments
Comments


Was the world converted to 18w20c from an earlier snapshot? If it was, that could be related, as old world generation seems to have other effects as well.
The cause for this is that while drawing the map, some of the top layers are skipped for some reason. When destroying and placing a block on the surface, it appears on the map correctly. There probably is some limit in the code that draws the map.
(See also MC-129500 for examples where the background is not completely gray.)

AH and I think I have found the cause of this bug
The recent world format change modified something relating to height maps for lighting calculations. The maps appear to use the value taken from here, but the world generated before 18w20 does not have those tables properly generated by the updating code (and, presumably, they default to 65).
I don't think this is related to MC-129500, at least not directly. That one could be just an off-by-one error.
Here is an experiment confirming my theory: everything gets back to normal after placing a torch in the chunk, forcing an update of the light/height map.
[media]

This seems to happen in 18w20c with worlds that had been created in older snapshots, but NOT in worlds created in 18w20c. I could not get the above mentioned torch trick to work.

Is this actually happening in situation where no previous snapshots are involved? I can't reproduce it and if it only happens in worlds that got "corrupted" in a snapshot, we won't fix that. If on the other hand there are situations where it happens with older worlds from published (non-snapshot) versions of Minecraft, please re-open this issue.

Relates to MC-129725 as the old blocks are simply being threated as “not there” for both light and maps.

This bug has been fixed in 1.13-pre3.