Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when pressing RCtrl+R while in non VR mode #299

Open
aaronjamt opened this issue Sep 30, 2024 · 3 comments
Open

Crash when pressing RCtrl+R while in non VR mode #299

aaronjamt opened this issue Sep 30, 2024 · 3 comments

Comments

@aaronjamt
Copy link

While on a 1.21 multiplayer server without VR enabled, I pressed Right Ctrl+R and the game crashed with the following stack trace.

[18:27:35] [Render thread/ERROR]: Unreported exception thrown!
java.lang.NullPointerException: Cannot invoke "org.vivecraft.client_vr.gameplay.VRPlayer.isTeleportOverridden()" because "dataholder.vrPlayer" is null
at org.vivecraft.client_vr.settings.VRHotkeys.handleKeyboardInputs(VRHotkeys.java:64) ~[vivecraft-1.21-1.1.12-b5-fabric.jar:?]
at net.minecraft.class_309.handler$fje000$vivecraft$screenHandler(class_309.java:5646) ~[client-intermediary.jar:?]
at net.minecraft.class_309.method_1466(class_309.java:346) ~[client-intermediary.jar:?]
at net.minecraft.class_309.method_22678(class_309.java:499) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.execute(class_1255.java:108) ~[client-intermediary.jar:?]
at net.minecraft.class_309.method_22676(class_309.java:499) ~[client-intermediary.jar:?]
at org.lwjgl.glfw.GLFWKeyCallback$Container.invoke(GLFWKeyCallback.java:82) ~[lwjgl-glfw-3.3.3.jar:?]
at com.moulberry.flashback.editor.ui.CustomImGuiImplGlfw.keyCallback(CustomImGuiImplGlfw.java:323) ~[flashback-0.10.0.jar:?]
at org.lwjgl.glfw.GLFWKeyCallbackI.callback(GLFWKeyCallbackI.java:44) ~[lwjgl-glfw-3.3.3.jar:?]
at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.3.3.jar:?]
at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3438) ~[lwjgl-glfw-3.3.3.jar:?]
at com.mojang.blaze3d.systems.RenderSystem.pollEvents(RenderSystem.java:150) ~[client-intermediary.jar:?]
at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:168) ~[client-intermediary.jar:?]
at net.minecraft.class_1041.method_15998(class_1041.java:303) ~[client-intermediary.jar:?]
at net.minecraft.class_310.method_1523(class_310.java:1307) ~[client-intermediary.jar:?]
at net.minecraft.class_310.method_1514(class_310.java:882) [client-intermediary.jar:?]
at net.minecraft.client.main.Main.main(Main.java:256) [client-intermediary.jar:?]
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) [fabric-loader-0.15.11.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.15.11.jar:?]
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.15.11.jar:?]
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100) [NewLaunch.jar:?]
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) [NewLaunch.jar:?]
at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) [NewLaunch.jar:?]

@aaronjamt
Copy link
Author

aaronjamt commented Sep 30, 2024

I'm not able to test this at the moment, but I think adding if (dataholder.vrPlayer != null) { at line 64 of VRHotkeys.java should fix this. I'll open a draft PR in case anyone's able to test it.

Edit: See #300

aaronjamt added a commit to aaronjamt/VivecraftMod that referenced this issue Sep 30, 2024
@fayer3
Copy link
Member

fayer3 commented Sep 30, 2024

it should check if vr is initialized, I'll add it to the cleanup pr

@fayer3
Copy link
Member

fayer3 commented Sep 30, 2024

most of these things should generally only trigger with vr on imo.

fayer3 added a commit to fayer3/VivecraftMod that referenced this issue Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants