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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.19.4 Pre-release 1
    • 23w07a
    • None
    • Confirmed
    • Commands, Crash
    • Very Important
    • Platform

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

            panda4994 [Mojang] Panda
            tqz78 tqz78
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: