oωo (owo-lib)

oωo (owo-lib)

17M Downloads

jvm crash upon inventory exit when cursors aren't installed on system

queenofthebees opened this issue · 1 comments

commented

two parts to this!

  1. when any requested cursor in CursorAdapter isn't available on your operating system, glfw returns a null pointer. passing the null pointer to glfwDestroyCursor trips LWJGL's Checks, throwing a nullpointerexception.
  2. the npe then causes the current screen to be destructed, re-calling destruct on CursorAdapter, calling glfwDestroyCursor on already-freed cursors, resulting in a JVM segfault

easy fix would be filtering for nulls (well, in this case, 0s) before calling glfwDestroyCursor (and also setting the destructed variable before destroying the cursors instead of after)

commented

Can we backport the fix to older versions? It would be really nice, since many modded players are still on 1.20.1.