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

Crash when a guardian deals damage to itself after removing thorns from avoids_guardian_thorns

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.19.4 Pre-release 3
    • 1.19.4 Pre-release 1, 1.19.4 Pre-release 2
    • Confirmed
    • Commands, Crash
    • Very Important
    • Platform

      The bug

      When a guardian deals damage to itself after removing minecraft:thorns from the damage type minecraft:avoids_guardian_thorns, the game will crash due to java.lang.StackOverflowError. Note that this can also occur when two guardians mutually deal damage to each other.

      How to reproduce

      1. Install the datapack in the Attachment
      2. /summon minecraft:guardian
      3. Run the following command with a command block
        execute as @e[type=minecraft:guardian] run damage @s 1 minecraft:generic by @s

        → The game crashes.

      data/minecraft/tags/damage_type/avoids_guardian_thorns.json
      {
        "replace": true,
        "values": []
      }
      

      Stack trace

      Description: Executing command block
      
      java.lang.StackOverflowError: Executing command block
      	at java.base/java.util.Objects.equals(Objects.java:64)
      	at anu.equals(SourceFile:13)
      	at java.base/java.util.ImmutableCollections$Set12.contains(ImmutableCollections.java:810)
      	at hc$c.a(SourceFile:184)
      	at bek.a(SourceFile:131)
      	at bvu.a(SourceFile:349)
      	at bvu.a(SourceFile:350)
      	at bvu.a(SourceFile:350)
      	at bvu.a(SourceFile:350)
      	at bvu.a(SourceFile:350)
      	at bvu.a(SourceFile:350)
      	at bvu.a(SourceFile:350)
      	at bvu.a(SourceFile:350)
      	at bvu.a(SourceFile:350)
      ...
      

            panda4994 [Mojang] Panda
            intsuc intsuc
            Votes:
            6 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: