Describe the bug
AdvancedChatBox crashes when you try to close a string with "
or '
, also closing an object with }
crashes the game. This problem only occurs when typing a chat component; like /tellraw and /title commands are affected, but not /summon or /data command.
Looks like it's struggling trying to colorize a completed string or an object.
Also the problem does not occur when typing in a command block. You can only reproduce this bug in chat.
Minecraft Info
Minecraft information:
- Minecraft 1.18.2
- fabric loader 0.13.3
- fabric API 0.48.0
- AdvancedChatBox 1.1.3
- AdvancedChatCore 1.4.4
- Mallilib 0.12.1
- ModMenu 3.1.0
Config
- In AdvancedChat Config -> Box -> Configure Formatters -> Custom Command Highlighting is turned ON.
- No other settings affected this problem.
The problem also occurs on Minecraft 1.18**.1**
To Reproduce
Steps to reproduce the behavior:
- Join any (local/server) game.
- Make sure the formatter is ON.
- Open chat.
- Type any chat-related command and close a string with
"
or an object with }
- The game crashes!
For step 4, easy examples are
/tellraw @s ""
/title @s title {"text":"title"}
You can either type manually or copy-paste the text to reproduce the bug.
( I don't think it's because of blackout occurred in some parts of Japan yesterday - I'm pretty sure no data is corrupted. )
Expected behavior
"Hello!" should be colored and the game continues running.
Screenshots
This is a screenshot of the moment before crashing:
![Crash-ACB-1182 (1)](https://user-images.githubusercontent.com/22657582/158740800-5c391f74-07ca-4134-8005-98767fa50c62.png)
Additional context
This is a crash report when typing ```/tellraw @s ""`` (length is 14, " is at 13th and 14th char)
crash-2022-03-17_13.40.04-client.txt
This is another crash report when typing /summon zombie ~ ~ ~ {}
crash-2022-03-17_13.42.39-client.txt