mojira.dev
MC-311284

The game instantly crashes when entering a world with a negative keyboard key bound

Perhaps editing options.txt isn’t supported, but we still shouldn’t get a game crash in any case.

An easy fix for this would be to not store mouse buttons and keyboards as signed integers, but instead as an unsigned short, therefore instantly rejecting any negative values or extreme positive values as the game loads. This way we wouldn’t get into this situation in the first place, since SDL only defines 512 distinct keyboard buttons anyway.

Attachments

Comments 8

Thank you for helping us improve Minecraft! We saved your files:

[media][media]

Using an unsigned 16-bit value would mean these invalid inputs would be rejected on startup:

image-20260821-164305.png

We do not have enough information to reproduce this issue.

Please include the following information to help us understand your problem:

Steps to Reproduce:
1. (Explain what needs to be done for the issue to happen)
2.
3.

Observed Results:
(Briefly describe what happens)

Expected Results:
(Briefly describe what should happen)

Please also attach any needed commands, add-ons/behavior packs, data packs, resource packs, screenshots, videos, or worlds needed to help reproduce this issue.

Refer to the Bug Tracker Guidelines for more information about how to write helpful bug reports. Bug reports with insufficient information may be closed as Incomplete.

This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

I’d have thought the report title and attached information is enough, but if instructions are required:

  • download the attached options.txt and put it in your .minecraft folder (back up the old one if you want), or just edit your existing options.txt so there’s a key.keyboard.-1 in there

  • launch Minecraft 26.3 snapshot 9

  • optionally verify that key.keyboard.-1 is bound by checking in the key binds menu

  • attempt to enter a world and unpause the game

Expected result is that the game would not crash, because a crash indicates a serious issue. Actual outcome is that the game crashes, indicating the presence of something nasty behind the scenes.

Thank you for your report!
After consideration, the issue is being closed as Invalid.

This report does not describe a bug.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

…so a game crash isn’t a bug?

I have received word from Mojang that direct modification of game files (outside of data packs and resource packs) is unsupported.

I’d have thought that invalid options.txt states wouldn’t be considered as such since it’s still vanilla Minecraft that’s handling things.

muzikbike

(Unassigned)

Confirmed

Crash

26.3 Snapshot 9

Retrieved