Skip to content

Bookmark Keybinding to Mouse-keys crashes when shift is pressed #173

@skaviouz

Description

@skaviouz

I spent time trying to figure out why my game kept crashing when I pressed shift
I then verified it

what is the bug

When you set key_key.jei.bookmark to any mouse-key, e.g. key_key.jei.bookmark:-96 (options.txt)

Note: left click -100, right click -99, middle click -98, button 4 is -97, and mouse button 5 is -96

And then when you press shift, the game crashes, even in the title screen

how I verified it

New instance install, 1.12.2, forge 14.23.5.2864
download the mod HadEnoughItems_1.12.2-4.28.1.jar

I checked mouse button 5 and right clicking (button 2), so I am confident this bug includes all mouse keys

BTW side thought

In my modpack with many mods, loliasm said both renderLib and HEI caused the crash, but I can cause the crash with just HEI, no renderLib needed.

edit: I've double checked, none of the other keybindings causes crashes when pressing shift when set to mouse-keys, e.g. key_key.jei.recipeBack:-97. only key_key.jei.bookmark causes crashes.

error log


---- Minecraft Crash Report ----
// Hey, that tickles! Hehehe!

Time: 2/28/26 7:13 AM
Description: Updating screen events

java.lang.IndexOutOfBoundsException
	at java.nio.Buffer.checkIndex(Buffer.java:545)
	at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:252)
	at org.lwjgl.input.Keyboard.isKeyDown(Keyboard.java:407)
	at mezz.jei.input.InputHandler.handleBookmarkExtra(InputHandler.java:72)
	at mezz.jei.input.InputHandler.onGuiKeyboardEvent(InputHandler.java:99)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_33_InputHandler_onGuiKeyboardEvent_Post.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
	at net.minecraft.client.gui.GuiScreen.func_146269_k(GuiScreen.java:513)
	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1759)
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1098)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)
	at net.minecraft.client.main.Main.main(SourceFile:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100)
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
	at java.nio.Buffer.checkIndex(Buffer.java:545)
	at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:252)
	at org.lwjgl.input.Keyboard.isKeyDown(Keyboard.java:407)
	at mezz.jei.input.InputHandler.handleBookmarkExtra(InputHandler.java:72)
	at mezz.jei.input.InputHandler.onGuiKeyboardEvent(InputHandler.java:99)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_33_InputHandler_onGuiKeyboardEvent_Post.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
	at net.minecraft.client.gui.GuiScreen.func_146269_k(GuiScreen.java:513)

-- Affected screen --
Details:
	Screen name: net.minecraft.client.gui.GuiMainMenu
Stacktrace:
	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1759)
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1098)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)
	at net.minecraft.client.main.Main.main(SourceFile:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100)
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_422, Temurin
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin
	Memory: 3617386960 bytes (3449 MB) / 5046272000 bytes (4812 MB) up to 5726797824 bytes (5461 MB)
	JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms4096m -Xmx6144m
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.42 Powered by Forge 14.23.5.2864 5 mods loaded, 5 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State  | ID        | Version      | Source                                  | Signature |
	|:------ |:--------- |:------------ |:--------------------------------------- |:--------- |
	| LCHIJA | minecraft | 1.12.2       | minecraft.jar                           | None      |
	| LCHIJA | mcp       | 9.42         | minecraft.jar                           | None      |
	| LCHIJA | FML       | 8.0.99.99    | forge-1.12.2-14.23.5.2864-universal.jar | None      |
	| LCHIJA | forge     | 14.23.5.2864 | forge-1.12.2-14.23.5.2864-universal.jar | None      |
	| LCHIJA | jei       | 4.29.15      | HadEnoughItems_1.12.2-4.29.15.jar       | None      |

	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 573.71' Renderer: 'Quadro M5000M/PCIe/SSE2'
	Launched Version: 1.12.2
	LWJGL: 2.9.4
	OpenGL: Quadro M5000M/PCIe/SSE2 GL version 4.6.0 NVIDIA 573.71, NVIDIA Corporation
	GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fml,forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: English (US)
	Profiler Position: N/A (disabled)
	CPU: 8x Intel(R) Xeon(R) CPU E3-1575M v5 @ 3.00GHz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions