Mojira Archive
MC-260579

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

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)
...

Fixed

intsuc

[Mojang] Panda

2023-02-26, 03:32 PM

2023-03-02, 08:20 AM

2023-03-01, 09:39 AM

6

6

Confirmed

Very Important

Platform

Commands, Crash

crash

1.19.4 Pre-release 1, 1.19.4 Pre-release 2

1.19.4 Pre-release 3