-
Bug
-
Resolution: Unresolved
-
None
-
1.21, 24w33a, 1.21.1 Release Candidate 1, 1.21.1, 24w34a, 24w35a, 24w36a, 24w37a, 24w38a, 24w39a, 24w40a, 1.21.2 Pre-Release 1, 1.21.2 Pre-Release 2, 1.21.2 Pre-Release 3, 1.21.2 Pre-Release 4, 1.21.2 Pre-Release 5, 1.21.2 Release Candidate 1, 1.21.2 Release Candidate 2, 1.21.2, 24w44a, 1.21.3, 24w45a, 1.21.4 Pre-Release 1
-
None
-
Confirmed
-
Commands, Performance
-
Low
-
Platform
The Bug
When setting certain NBT fields to invalid characters (such as ? and =), an exception is outputted in the log. A large amount of exceptions can cause lag to most systems.
Examples of some fields that cause errors when invalid characters are entered include RecipesUsed, LootTable, Name, and possibly more.
Steps to Reproduce (Direct)
Run the command specified for all situations below, then look in the game logs. Note if there is a stack trace exception or not.
Placing Suspicious Sand with invalid LootTable:
Place down the block this command gives you, and check the log.
/give @s minecraft:suspicious_sand[minecraft:block_entity_data={id:brushable_block,LootTable:"?"}]
FallingBlock entity with invalid Name:
This displays an error message in chat as well.
Running the command below in a repeating command block causes high MSPT lag.
/summon minecraft:falling_block ~ ~ ~ {BlockState:{"Name":"?"}}
FallingBlock entity with invalid LootTable:
/summon minecraft:falling_block ~ ~ ~ {BlockState:{"Name":"suspicious_sand"},TileEntityData:{LootTable:"?"}}
Steps to Reproduce (Spawner)
This may cause severe FPS lag.
Run the command below (attempting to right-click this spawn egg on the ground will also output an exception and not spawn anything):
/give @s minecraft:breeze_spawn_egg[minecraft:entity_data={id:arrow,inBlockState:{Name:"?"}}]
Place a monster spawner below you, and right-click the spawner with the spawn egg.
Run the command below while on top of the spawner:
/data modify block ~ ~-1 ~ SpawnData.entity.inBlockState set value {Name:"?"}
View the game logs and note if stack trace exceptions are spammed or not.
Observed Results
Exceptions are sometimes spammed to the game's log. In some cases, an FPS and TPS drop is noticeable. In the case of the spawner bug, errors continue to be spammed even when on the Esc menu in singleplayer.
The log file can also be huge due to these exceptions being spammed.
See the following text files for the exceptions experienced. They are all named respective to the thing which caused it.
Expected Result
There would be no spammed exceptions. Instead, an error message could be logged informing the player of the issue.