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

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 18w31a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w45a
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pokechu22 [Mod] Pokechu22
              • Votes:
                3 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: