wired-tomato / WayGL

Force MC to use wayland on supported systems
MIT License
17 stars 5 forks source link

Crash upon opening inventory w/ virtual cursor enabled #15

Closed RoblKyogre closed 4 months ago

RoblKyogre commented 4 months ago

Upon opening the inventory, the game immediately crashes. This occurred on a system on Arch Linux 6.9.3-zen1-1-zen with KDE Plasma 6.0.5 and Mesa 24.1.1 on an Intel iGPU, though this crash also occurred on another system with an NVIDIA GTX 1070 with the beta 555 proprietary drivers and a beta version of KDE Plasma 6.1. Furthermore, I was able to reproduce this with only Fabric API, Fabric Language Kotlin, and WayGL installed in a completely new instance in Prism Launcher with both OpenJDK 22 and 17, the logs of which can be found here: First time, Java 22 | Second time, Java 17. Here seems to be the relevant error causing the crash:

[17:56:32] [Render thread/ERROR]: Unreported exception thrown!
java.lang.IllegalStateException: Property animationTime should be initialized before get.
    at kotlin.properties.NotNullVar.getValue(Delegates.kt:62) ~[org_jetbrains_kotlin_kotlin-stdlib-2.0.0-e823d47a24b16be4.jar:?]
    at net.wiredtomato.waygl.VirtualCursor.getAnimationTime(VirtualCursor.kt:38) ~[waygl-1.1.1 1.20.3.jar:?]
    at net.wiredtomato.waygl.VirtualCursor.advanceAnimation(VirtualCursor.kt:125) ~[waygl-1.1.1 1.20.3.jar:?]
    at net.wiredtomato.waygl.VirtualCursor.draw(VirtualCursor.kt:119) ~[waygl-1.1.1 1.20.3.jar:?]
    at net.wiredtomato.waygl.VirtualCursor.render(VirtualCursor.kt:89) ~[waygl-1.1.1 1.20.3.jar:?]
    at net.minecraft.client.render.GameRenderer.wrapOperation$znb000$waygl$drawVirtualCursor(GameRenderer.java:2592) ~[client-intermediary.jar:?]
    at net.minecraft.client.render.GameRenderer.render(GameRenderer.java:963) ~[client-intermediary.jar:?]
    at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1327) ~[client-intermediary.jar:?]
    at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:888) ~[client-intermediary.jar:?]
    at net.minecraft.client.main.Main.main(Main.java:265) ~[minecraft-1.20.4-client.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:?]

Edit: was able to work around this issue by disabling the virtual cursor

wired-tomato commented 4 months ago

fixed in version 1.1.3 (1.20-1.21)