Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-135510

Force JVM crash fails to crash the JVM when LWJGL is in debug mode, instead merely crashing the game

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • Minecraft 18w31a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w45a, 1.14.4, 1.15 Pre-release 6, 1.15.2
    • None
    • Confirmed
    • Debug

      The bug

      When LWJGL is in debug mode, it checks for null pointers. This breaks the forced JVM crash, which uses MemoryUtil.memSet(0L, 0, 1L) which performs such a check.

      How to reproduce

      1. Add -Dorg.lwjgl.util.Debug=true to the JVM arguments to enable LWJGL debug mode.
      2. Hold right control+F3+C
      3. The game will crash with the attached report with an java.lang.IllegalArgumentException. The JVM will not crash.

      (note: if you get a regular "Manually triggered debug crash", then the forced JVM crash did not trigger due to MC-135509; that is not this issue).

      Fix:

      Use a memory address other than 0. For instance, 1 would be fine, and in this case memPutByte could be used (which normally wouldn't work as memPutByte always checks for null pointers, which is why I assume memSet was used). Alternatively, 0xDEADBEEF would be recognizable as an intended debug value.

            Unassigned Unassigned
            pokechu22 [Mod] Pokechu22
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: