Mojira Archive
MC-260367

Crash when damaging a Guardian using a command block: java.lang.StackOverflowError: Executing command block

The bug

The server crashes when executing /damage on a Guardian a couple of times using a command block, with the same mob also being as its source of the damage.
The crash does not happen when executing through chat, instead the command itself will just not work at all, as if you have never typed it in the first place.

Also happens with Elder Guardians, including Elder Guardians doing /damage to Guardians and vice versa.

Steps to reproduce

  1. Create a new world without experiments enabled
  2. Locate an ocean monument and teleport there
  3. Place a command block with this command:
    damage @e[type=guardian,limit=1] 1 generic by @e[type=guardian,limit=1]
    
  4. Activate the block multiple times
    The server eventually encounters a stack overflow error and crashes, along with the game if done on singleplayer

Stack trace

Description: Executing command block

java.lang.StackOverflowError: Executing command block
	at acl.a(SourceFile:117)
	at bvv.fQ(SourceFile:133)
	at bvv.a(SourceFile:344)
	at bvv.a(SourceFile:349)
	at bvv.a(SourceFile:349)
	at bvv.a(SourceFile:349)
	at bvv.a(SourceFile:349)
	at bvv.a(SourceFile:349)
	at bvv.a(SourceFile:349)
	at bvv.a(SourceFile:349)
	at bvv.a(SourceFile:349)
	at bvv.a(SourceFile:349)
	...

Fixed

tqz78

[Mojang] Panda

2023-02-20, 01:23 AM

2023-02-26, 04:05 PM

2023-02-21, 03:33 PM

3

5

Confirmed

Very Important

Platform

Commands, Crash

23w07a

1.19.4 Pre-release 1