When I upgrade a cartographer it freezes the game but it still lets me move. I can also break blocks but they won't drop. It won't let me save the game either.
Recreation: I was selling them glass panes (doesn't crash the first upgrade). I was selling them out. Not sure if it's the upgrade or selling out.
the version is 1.17.1
Linked issues
Comments

Thank you for your report!
We're tracking this issue in MC-228721, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
This is a duplicate of MC-228721, since this issue can only occur with the use of Optifine.