The bug
Cartographer villager crashes the game when unlocking explorer maps.
How to reproduce
Generate a new world
Spawn a cartographer villager with spawn egg / interact with naturally spawned villager
Unlock its trades
When the cartographer unlocks the explorer maps, click on it
→ The villager GUI doesn't show, instead the game crashes
Crash report
18w21b\: [^crash-2018-05-28_18.00.28-server.txt]
Description: Exception in server tick loop
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
at net.minecraft.server.MinecraftServer.g_(SourceFile:392)
at dii.a(SourceFile:116)
at dii.d(SourceFile:132)
at net.minecraft.server.MinecraftServer.run(SourceFile:501)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2272)
at net.minecraft.server.MinecraftServer.g_(SourceFile:390)
... 4 more
Caused by: java.lang.UnsupportedOperationException
at bpw.e(SourceFile:100)
at sq.i(SourceFile:245)
at sq.a(SourceFile:238)
at bsi.a(SourceFile:29)
at bsi.a(SourceFile:13)
at bxf.a(SourceFile:26)
at bxf.a(SourceFile:13)
at bsl.a(SourceFile:27)
at bby.a(SourceFile:515)
at bpy.a(SourceFile:109)
at sz.a(SourceFile:12)
at sy.a(SourceFile:34)
at bqc.a(SourceFile:87)
at te.a(SourceFile:59)
at te.a(SourceFile:23)
at agg$a.a(SourceFile:131)
at agg$a$$Lambda$1255/104214654.apply(Unknown Source)
at java.util.concurrent.CompletableFuture$AsyncApply.exec(CompletableFuture.java:501)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:902)
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1689)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1644)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Linked issues
is duplicated by
relates to
Attachments
Comments
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response.
We do not have enough information to find the cause of this issue.
Please attach the crash report (.minecraft/crash-reports/crash-<DATE>-client.txt) here.
If no crash report was created, please attach the launcher log (.minecraft/launcher_log.txt) here.
Once attached, the report will be reopened automatically.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki

The launcher log was from a launcher start and stop, but there was no Minecraft start and thus no crash.
Please re-run the crash and attach the crash report then.
This is still a problem in pre release 2. Confirmed.

Is this related to MC-126244 ?
McModKnower, Yes it is related to the /locate command problem. I also cant seem to get an accurate reading on /locate stronghold but that is probably user error. not sure if anyone else has experienced this.
seed -900048224156541008 in 1.13 has a mansion at X: 400 Z:600 and I went to a nearby village to test the cartographer and it still doesnt work

I have been unable to reproduce a crash despite testing the seeds given here as well as many others. One thing to note is that a Cartographer will not trade you an explorer map if there are no structures nearby, or if you have already loaded the chunks of a nearby structure then it will not give you a map to that either.
If I am aware of a seed that has a mansion, I recreate the world, thus the mansion being not generated, the cartographer should therefore give me a map. Correct?
I understand how this game works. I have noted your advice. I tried this in pre release 3 today, It crashed my game. Why would you add a /locate command that allows you to click teleport to structures if it doesnt actually work?
Please give me and the many other players experiencing this, the benefit of the doubt.
Thank you.
In pre-3 this bug is there again, I think. We are trying to play on a private server with my friend and when we try to unlock the 3rd level of a cartographer or summon it with unlocked the 3rd level, the server crashes
Possibly fixed for MC 1.13-pre5. The game does not crash in my computer. Could someone try reproduce it too?

@unknown, keep in mind that there also was MC-130887, different crashes with different causes.
I am having this issue i my world on Pre6, however the game Client nor Server crash, it simply kicks everyone off the server with the message Timed Out after which everyone can re-join and for a short period of time, the villager in question that caused it is unable to trade//trade window dosent work, then after an unknown to me period of time he can trade again. As mentioned this affects not only new but also existing cartographers

I unlocked a cartographer while the admin was watching the server, and the CPU and memory use both climbed to 100% for a few seconds before dropping again. It didn't crash, but all the villagers stopped moving for a while. Definitely still seems to be an issue on pre-7.
Can confirm for 1.13-pre7. When a Cartographer unlocks Explorer Maps the server completely freezes usually for 1 to 3 seconds, while in the worst cases for 5+ seconds.

Freezes or crashes? You are not describing the behavior in the ticket.

In this case, freezing or crashing probably depends on how many people are on, what the hardware is, etc. MC-130767 notes that the game gets very slow before crashing – that was the behavior I experienced, but without the crash. I was on a multiplayer server and I was the only player on at the time, so I probably got lucky.
Matthew Hunter: "Cartographer villager crashes the game when unlocking explorer maps.".
Just did some additional testing, the crash may not occur always. In singleplayer the integrated server froze every time a new map is unlocked, while the client became completely unresponsive only a few times. (Probably because of insufficient memory, when the huge lag spike occured)
Although I didn't experience any "Exception in server tick loop" crash with generated crash report.

Lag comes from MC-126244. To my knowledge, the game has to generate chunks to search for woodland mansions, and the search happens when unlocking trade.
And it happen in 1.13x too
Maybe should test in our server

Please check if that's still an issue for you in the latest 1.14 (pre-)release.
Certainly a duplicate of https://bugs.mojang.com/browse/MC-126244
Same issue for me in version 1.15.1 -> seed : -386072120733945 -> Village : -470 / 165
Don't work on my server (vanilla & forge) : virtual machine with 4 cores
Work locally with a copy of the save, but with a big freeze time (processor I7-9700K)
So I updated the server.properties, set max-tick-time=120000
It's working but with a warning message: Can't keep up! Is the server overloaded? Running 93469ms or 1869 ticks behind
hope that can help you.
Same issue for my 1.15.1 Vanilla Server. When trading glass panes with the cartography Villager, the server freezes and then crashes after about 30 seconds of freeze.
I have 4 crash logs attached to this comment.
Hope that helps.
[media][media][media][media]
Same here on a 1.15.2 vanilla server.
setting max-tick-time does not help
Im having the same problem, the server just crashes right after the villager obtains level 3. Even tried exporting the world and playing it on singleplayer and /locate command just freezes the whole world
I'm also seeing this on my 1.15.2 server whenever my friend tries leveling up their cartographer to Journeyman
My apprentice Cartographer does not cause a crash
[media][media][media]Same as Michael Iddisah...on 1.15.1 and 1.15.2, java server on macOS, whenever an apprentice cartographer is traded to the point that they try to level up to journeyman, the server crashes. I watched the java CPU usage, and when the level-up trade occurs, java CPU drops way off, the game stops, and nothing happens until max-tick-time is reached, when the server auto-kills itself. So whatever is going on isn't something that causes java to hammer the CPU.
Oddly enough, after putzing with this through multiple crashes, I tried setting max-tick-time to 120000. Same thing happened as before...but when we restarted the server, the cartographer had successfully become a journeyman. We had been testing with the same cartographer, and he was always still an apprentice after the crash, but not this time.
In the java server, my understanding is that the ocean monument map is generated by the apprentice and the woodland mansion map is generated by the journeyman. There's a significant difference in the spawn rate (odds?) of ocean monuments vs. woodland mansions. Maybe this has something to do with the problem?
I have the exact same problem. Fresh 1.15.2 vanilla server. When trading glass panes with cartographer, the game crashes.
[media]
Please check if this is still an issue in 20w17a. It should be fixed in this snapshot.
@Michael Wobst
It's "kind of" fixed. The server does not crash anymore, but every time a cartographer levels up, the server freezes for 10 to 15 seconds. Playing 20w17a server and client.
Hi,
Playing on 20w17a and still having the issue.
The server is crashing when the villager unlock the Explorer map.
Sometimes my server only have Timed Out for players, sometimes crash and restart.
Hello,
Playing on 20w19a, untill now the server never crashes but lags when a cartographer levels up.
In our case, a 5/10 seconds freeze happens when a cartographer unlocks an ocean explorer map, and more than 30 seconds when it unlocks a woodland explorer maps, causing timeout.
EDIT : we play on client with "Open..." and not server.
Playing on a server with version 20w21a, I'm experiencing the same issue.
When unlocking the woodland explorer map, the server lags a lot (dozens of seconds) and sometimes gets killed by the watchdog.
Please tell us what to need to investigate and implement a fix for this.
Thanks
I'm playing in singleplayer in Release Candidate 1, and its better than in previous versions but still lags when trading with them for a few seconds.
still happens in 20w27a
May I ask why this was changed to "postponed" for two seconds?

because it's being fixed!!
That was likely a misclick when trying to resolve the issue.
Unfortunately this bug has resurfaced in 1.17, hoping for a fix soon as it is very annoying.
Still occurring in 1.17
Got it here as well. Playing in 1.17
I was told that I should exit the world when the villager's XP bar is filled up, so I did just that. However when I re-enter the world, the villager just stays at the same level with a full xp bar, and when I do interact with him again the game becomes unresponsive, like I'm in some form of purgatory. I can move, open doors and because i'm wearing an Elytra, I can jump around like I'm on the moon. It's also kinda cool because everything is frozen just as it was. Even hostile mobs are stuck mid motion.
It was cool for like 2 minutes, but I just want my emeralds. I had to put a warning on all my cartographer booths in my trading hall. All except for one who is a master (and the MVP).

@unknown, @unknown, and @unknown, if any of you are using OptiFine, see MC-228721.
This issue has not resurfaced in vanilla 1.17 and 1.17.1 at all.
I can confirm that this is happening on 1.17.1. Minecraft Java just hang in the UI (unable to open chest, etc.) but can still walk around. Trying to save and quit the game will just get the game stuck in the Saving screen. Had to terminate the Java process to get out. Happened every single time I unlock the next level for the cartographer (using the glass pane trade to level up the villager). Was in skyblock
@unknown, this issue was actually fixed in 20w45a. What you're experiencing here is a case of MC-228721. This is caused by the use of optifine, so simply disable this modification in order to resolve the problem.
Ah... you are right... It was Optifine. Using vanilla 1.17.1 I was able to level up the cartographer just fine... weird 🙂 Thanks.
spent about an hour trying to figure out the problem, thanks for the help
This is pretty similar to me, but instead it doesn't crash me, it doesn't show the explorer maps.