mojira.dev
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

1.19.4 Pre-release 1\: [^crash-2023-02-27_00.38.48-server.txt]

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

Linked issues

Attachments

Comments 1

Confirmed.

[media]

intsuc

Panda4994

Confirmed

Platform

Very Important

Commands, Crash

crash

1.19.4 Pre-release 1, 1.19.4 Pre-release 2

1.19.4 Pre-release 3

Retrieved