Mojira Archive
MC-273559

Text components with a large amount of placeholders cause the game to freeze, run out of memory or stack overflow

This example causes the game to freeze:

{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"tran
slate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate
":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1
$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1
$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","
with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with"
:[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"t
ranslate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"transl
ate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":
"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":[{"translate":"%1$s,%1$s","with":["uwu"]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}

 

This example causes the game to run out of memory with 4096MiB of maximum memory allocation:

{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":[{"translate":"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s","with":["uwu"]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}]}

With the associated stacktrace:

[16:48:40] [Render thread/ERROR]: Out of memory
java.lang.OutOfMemoryError: Java heap space
	at java.base/java.util.Arrays.copyOf(Arrays.java:3541) ~[?:?]
	at java.base/java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:242) ~[?:?]
	at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:806) ~[?:?]
	at java.base/java.lang.StringBuilder.append(StringBuilder.java:246) ~[?:?]
	at java.base/java.lang.StringBuilder.append(StringBuilder.java:91) ~[?:?]
	at java.base/java.lang.AbstractStringBuilder.appendCodePoint(AbstractStringBuilder.java:961) ~[?:?]
	at java.base/java.lang.StringBuilder.appendCodePoint(StringBuilder.java:280) ~[?:?]
	at azj.a(SourceFile:143) ~[minecraft-1.21-client.jar:?]
	at azj$$Lambda/0x00007f409cfb6ae8.accept(Unknown Source) ~[?:?]
	at azj.a(SourceFile:17) ~[minecraft-1.21-client.jar:?]
	at azj.a(SourceFile:120) ~[minecraft-1.21-client.jar:?]
	at azj.a(SourceFile:84) ~[minecraft-1.21-client.jar:?]
	at azj.a(SourceFile:128) ~[minecraft-1.21-client.jar:?]
	at azj$$Lambda/0x00007f409cbea6c8.accept(Unknown Source) ~[?:?]
	at xe$2.a(SourceFile:37) ~[minecraft-1.21-client.jar:?]
	at yk.a(SourceFile:185) ~[minecraft-1.21-client.jar:?]
	at wz.a(SourceFile:97) ~[minecraft-1.21-client.jar:?]
	at yk.a(SourceFile:185) ~[minecraft-1.21-client.jar:?]
	at wz.a(SourceFile:97) ~[minecraft-1.21-client.jar:?]
	at yk.a(SourceFile:185) ~[minecraft-1.21-client.jar:?]
	at wz.a(SourceFile:97) ~[minecraft-1.21-client.jar:?]
	at yk.a(SourceFile:185) ~[minecraft-1.21-client.jar:?]
	at wz.a(SourceFile:97) ~[minecraft-1.21-client.jar:?]
	at yk.a(SourceFile:185) ~[minecraft-1.21-client.jar:?]
	at wz.a(SourceFile:97) ~[minecraft-1.21-client.jar:?]
	at yk.a(SourceFile:185) ~[minecraft-1.21-client.jar:?]
	at wz.a(SourceFile:97) ~[minecraft-1.21-client.jar:?]
	at yk.a(SourceFile:185) ~[minecraft-1.21-client.jar:?]
	at wz.a(SourceFile:97) ~[minecraft-1.21-client.jar:?]
	at yk.a(SourceFile:185) ~[minecraft-1.21-client.jar:?]
	at wz.a(SourceFile:97) ~[minecraft-1.21-client.jar:?]
	at yk.a(SourceFile:185) ~[minecraft-1.21-client.jar:?]

Steps to reproduce the issue:

  1. Pick an example
  2. Place down a command block
  3. Add the component to the end of "tellraw USERNAME", where you replace USERNAME with your username.

Expected results:

  1. The game resolving the component correctly without crashing the game, or refusing to parse the component outright.

Observed results:

  1. The game freezes or runs out of memory.

Duplicate

Allink

2024-06-18, 03:58 PM

2024-06-25, 07:10 AM

2024-06-25, 07:04 AM

0

1

Confirmed

(Unassigned)

1.21

-