Bounding Box Outline Reloaded

Bounding Box Outline Reloaded

355k Downloads

Abnormal keys cause crashes

ZeekDaGeek opened this issue ยท 1 comments

commented

Version: 1.12.2 Forge.

When pressing keys that are not even bound but are abnormal with the mod installed the game will crash. Specifically I use F13~F25 for AutoHotKey scripts to do things like pause Netflix directly, etc.

The way you capture and process keys in https://github.com/irtimaled/BoundingBoxOutlineReloaded/blob/1.12.2-forge/src/main/java/com/irtimaled/bbor/forge/ForgeClientProxy.java uses org.lwjgl.input.Keyboard which doesn't seem to handle abnormal keys very well?

java.lang.IndexOutOfBoundsException
	at java.nio.Buffer.checkIndex(Buffer.java:540)
	at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:253)
	at org.lwjgl.input.Keyboard.isKeyDown(Keyboard.java:407)
	at com.irtimaled.bbor.forge.ForgeClientProxy.onKeyInputEvent(ForgeClientProxy.java:39)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_3061_ForgeClientProxy_onKeyInputEvent_KeyInputEvent.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.minecraftforge.fml.common.FMLCommonHandler.fireKeyInput(FMLCommonHandler.java:565)
	at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:2017)
	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1808)
	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)

Might be able to fix it with a try catch or something?

commented

This should be resolved in the latest release. Please re-open this issue if it's not fixed with 1.0.13