Pasting a multi-line string into the terminal console causes a crash
Open
Nobody has claimed this yet.
status: accepted
version: 1.21.8
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Stack trace
$ java -jar paper-1.21.8-42.jar
Starting org.bukkit.craftbukkit.Main
[21:42:17 INFO]: [bootstrap] Running Java 21 (OpenJDK 64-Bit Server VM 21.0.8+9-LTS; Eclipse Adoptium Temurin-21.0.8+9) on Linux 6.8.0-64-generic (amd64)
[21:42:17 INFO]: [bootstrap] Loading Paper 1.21.8-42-main@b0da38c (2025-08-22T10:35:13Z) for Minecraft 1.21.8
[21:42:17 INFO]: [PluginInitializerManager] Initializing plugins...
[21:42:17 INFO]: [PluginInitializerManager] Initialized 0 plugins
[21:42:21 INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[21:42:22 INFO]: Loaded 1407 recipes
[21:42:22 INFO]: Loaded 1520 advancements
[21:42:22 INFO]: [ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry] Initialising converters for DataConverter...
[21:42:23 INFO]: [ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry] Finished initialising converters for DataConverter in 355,5ms
[21:42:23 INFO]: Starting minecraft server version 1.21.8
[21:42:23 INFO]: Loading properties
[21:42:23 INFO]: This server is running Paper version 1.21.8-42-main@b0da38c (2025-08-22T10:35:13Z) (Implementing API version 1.21.8-R0.1-SNAPSHOT)
[21:42:23 INFO]: [spark] This server bundles the spark profiler. For more information please visit https://docs.papermc.io/paper/profiling
[21:42:23 INFO]: Server Ping Player Sample Count: 12
[21:42:23 INFO]: Using 4 threads for Netty based IO
[21:42:24 INFO]: [MoonriseCommon] Paper is using 1 worker threads, 1 I/O threads
[21:42:24 INFO]: [ChunkTaskScheduler] Chunk system is using population gen parallelism: true
[21:42:24 INFO]: Default game type: SURVIVAL
[21:42:24 INFO]: Generating keypair
[21:42:24 INFO]: Starting Minecraft server on *:25565
[21:42:24 INFO]: Using epoll channel type
[21:42:24 INFO]: Paper: Using libdeflate (Linux x86_64) compression from Velocity.
[21:42:24 INFO]: Paper: Using OpenSSL 3.x.x (Linux x86_64) cipher from Velocity.
[21:42:24 INFO]: Server permissions file permissions.yml is empty, ignoring it
[21:42:24 INFO]: Preparing level "world"
[21:42:25 INFO]: Preparing start region for dimension minecraft:overworld
[21:42:25 INFO]: Preparing spawn area: 0%
[21:42:25 INFO]: Preparing spawn area: 26%
[21:42:25 INFO]: Time elapsed: 770 ms
[21:42:25 INFO]: Preparing start region for dimension minecraft:the_nether
[21:42:25 INFO]: Preparing spawn area: 0%
[21:42:26 INFO]: Time elapsed: 168 ms
[21:42:26 INFO]: Preparing start region for dimension minecraft:the_end
[21:42:26 INFO]: Preparing spawn area: 0%
[21:42:26 INFO]: Time elapsed: 78 ms
[21:42:26 INFO]: [spark] Starting background profiler...
[21:42:26 INFO]: Done preparing level "world" (1.586s)
[21:42:26 INFO]: Running delayed init tasks
[21:42:26 INFO]: Done (9.824s)! For help, type "help"
> test command 1
> test command 2
> test command 3
> test command 4
> test command 5
[21:42:29 ERROR]: Encountered an unexpected exception
java.lang.RuntimeException: Failed to encode Minecraft Component: empty[style={color=gray,clickEvent=SuggestCommand[command=/test command 1
test command 2
test command 3
test command 4
test command 5]}, siblings=[literal{test }, literal{command 1
test command 2
test command 3
test command 4
test command 5}[style={color=red,underlined}], translation{key='command.context.here', args=[]}[style={color=red,italic}]]]; Disallowed chat character: '
'
at io.papermc.paper.adventure.WrapperAwareSerializer.lambda$deserialize$0(WrapperAwareSerializer.java:28) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at com.mojang.serialization.DataResult$Error.getOrThrow(DataResult.java:287) ~[datafixerupper-8.0.16.jar:?]
at io.papermc.paper.adventure.WrapperAwareSerializer.deserialize(WrapperAwareSerializer.java:28) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at io.papermc.paper.adventure.WrapperAwareSerializer.deserialize(WrapperAwareSerializer.java:13) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at io.papermc.paper.adventure.PaperAdventure.asAdventure(PaperAdventure.java:190) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at net.minecraft.commands.Commands.finishParsing(Commands.java:427) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at net.minecraft.commands.Commands.performCommand(Commands.java:353) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at net.minecraft.commands.Commands.performCommand(Commands.java:345) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at net.minecraft.commands.Commands.performPrefixedCommand(Commands.java:336) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at net.minecraft.server.dedicated.DedicatedServer.handleConsoleInputs(DedicatedServer.java:435) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at net.minecraft.server.dedicated.DedicatedServer.tickConnection(DedicatedServer.java:386) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1738) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1530) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1252) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:310) ~[paper-1.21.8.jar:1.21.8-42-b0da38c]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[21:42:29 ERROR]: This crash report has been saved to: /mnt/data/Загрузки/paper/crash-reports/crash-2025-08-22_21.42.29-server.txt
[21:42:29 INFO]: Stopping server
[21:42:29 INFO]: Saving players
[21:42:29 INFO]: Saving worlds
[21:42:29 INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld
[21:42:29 INFO]: [ChunkHolderManager] Waiting 60s for chunk system to halt for world 'world'
[21:42:29 INFO]: [ChunkHolderManager] Halted chunk system for world 'world'
[21:42:29 INFO]: [ChunkHolderManager] Saving all chunkholders for world 'world'
[21:42:29 INFO]: [ChunkHolderManager] Saved 49 block chunks, 49 entity chunks, 0 poi chunks in world 'world' in 0,19s
[21:42:29 INFO]: [ChunkHolderManager] Waiting 60s for chunk I/O to halt for world 'world'
[21:42:29 INFO]: [ChunkHolderManager] Halted I/O scheduler for world 'world'
[21:42:29 INFO]: Saving chunks for level 'ServerLevel[world_nether]'/minecraft:the_nether
[21:42:29 INFO]: [ChunkHolderManager] Waiting 60s for chunk system to halt for world 'world_nether'
[21:42:29 INFO]: [ChunkHolderManager] Halted chunk system for world 'world_nether'
[21:42:29 INFO]: [ChunkHolderManager] Saving all chunkholders for world 'world_nether'
[21:42:29 INFO]: [ChunkHolderManager] Saved 49 block chunks, 49 entity chunks, 0 poi chunks in world 'world_nether' in 0,08s
[21:42:29 INFO]: [ChunkHolderManager] Waiting 60s for chunk I/O to halt for world 'world_nether'
[21:42:29 INFO]: [ChunkHolderManager] Halted I/O scheduler for world 'world_nether'
[21:42:29 INFO]: Saving chunks for level 'ServerLevel[world_the_end]'/minecraft:the_end
[21:42:29 INFO]: [ChunkHolderManager] Waiting 60s for chunk system to halt for world 'world_the_end'
[21:42:29 INFO]: [ChunkHolderManager] Halted chunk system for world 'world_the_end'
[21:42:29 INFO]: [ChunkHolderManager] Saving all chunkholders for world 'world_the_end'
[21:42:29 INFO]: [ChunkHolderManager] Saved 49 block chunks, 49 entity chunks, 0 poi chunks in world 'world_the_end' in 0,04s
[21:42:29 INFO]: [ChunkHolderManager] Waiting 60s for chunk I/O to halt for world 'world_the_end'
[21:42:29 INFO]: [ChunkHolderManager] Halted I/O scheduler for world 'world_the_end'
[21:42:29 INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[21:42:29 INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[21:42:29 INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[21:42:29 INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[21:42:29 INFO]: Waiting for all RegionFile I/O tasks to complete...
[21:42:29 INFO]: All RegionFile I/O tasks to complete
[21:42:29 INFO]: [MoonriseCommon] Awaiting termination of worker pool for up to 60s...
[21:42:29 INFO]: [MoonriseCommon] Awaiting termination of I/O pool for up to 60s...
Plugin and Datapack List
> plugins
[21:43:46 INFO]: ℹ Server Plugins (0):
Actions to reproduce (if known)
- Copy any multi-line string into the clipboard, it isn't required to end with a line break, but must contain a line break somewhere inside of it. Example:
test command 1
test command 2
test command 3
test command 4
test command 5
- Paste it into the terminal console
- First, nothing happens, but when you press [Enter] the server crashes with the stack trace provided earlier
Paper version
> version
[21:43:59 INFO]: Checking version, please wait...
[21:44:00 INFO]: This server is running Paper version 1.21.8-42-main@b0da38c (2025-08-22T10:35:13Z) (Implementing API version 1.21.8-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.8-4-aa4ef06 (MC: 1.21.8)
Other
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at net.minecraft.server.dedicated.DedicatedServer.handleConsoleInputs, then follow Commands.performPrefixedCommand and PaperAdventure.WrapperAwareSerializer.deserialize from the stack trace. Reproduce by pasting several newline-separated commands into the server console and trace the failing input. Done means the same multiline paste no longer terminates the server.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100