ChatPatches icon indicating copy to clipboard operation
ChatPatches copied to clipboard

Chat log crashes bc of unregistered enchantments - 210.6.5.1 - 1.21

Open KozukiYOMA opened this issue 1 year ago • 33 comments

Description

Sudden crash. I saw the word "chatpatches" in the crash log, so I submitted it here.

How to reproduce

When I color-coded the timestamps finely, it suddenly started crashing. The timestamp was set to "&'d'a &'a'KK&'f':&'b'mm&'f':&'c'ss".

Expected result

No crash

Log file link

crash-report

Specs and Details

Required information:

  • Computer OS: Windows11pro 23h2
  • Mod version: 210.6.5.1
  • Fabric 0.15.11-1.21.0 and FabricAPI: 0.100.3
  • YetAnotherConfigLib 3.5.0+1.21-fabric and Mod Menu 11.0.1
  • MODList: It should be in the crash log. It's a pain to write, so please look at the crash log.

Additional context

It also says it was enchantment related, so maybe it wasn't related.

KozukiYOMA avatar Jun 25 '24 10:06 KozukiYOMA

i think this is a chat patches issue, thanks for the report. what were you doing when the game crashed?

mrbuilder1961 avatar Jun 25 '24 18:06 mrbuilder1961

At that time, I was at the end and near the beacon.

KozukiYOMA avatar Jun 25 '24 19:06 KozukiYOMA

so you were just walking/standing still and it just abruptly crashed?

mrbuilder1961 avatar Jun 25 '24 22:06 mrbuilder1961

Yeah

KozukiYOMA avatar Jun 26 '24 06:06 KozukiYOMA

Crashing just walking around. Crashing just digging. I think that Crashes even when left unattended.

KozukiYOMA avatar Jun 26 '24 09:06 KozukiYOMA

Second crash report. I found several similar ones. crash-2024-06-26_18.45.33-client.txt

KozukiYOMA avatar Jun 26 '24 09:06 KozukiYOMA

okay, so so far they've all happened while you're in game and not when youre loading a world or in the menu/config screen?

mrbuilder1961 avatar Jun 26 '24 16:06 mrbuilder1961

Yes, it is. At the moment it happens during the game, but not in the main menu.

KozukiYOMA avatar Jun 26 '24 18:06 KozukiYOMA

ill try this fix tm night or sunday when i can! thanks for ur patience

mrbuilder1961 avatar Jun 29 '24 04:06 mrbuilder1961

please verify that ~~this build~~ fixes the issue! see the readme here for instructions on how to test it.

mrbuilder1961 avatar Jul 02 '24 02:07 mrbuilder1961

#184 I'm not sure when the crash was resolved, but I have a feeling it has something to do with this.

KozukiYOMA avatar Jul 14 '24 08:07 KozukiYOMA

to reiterate, my current suspicion about this bug is some incompatibility with styledchat, so i'll get on that when i can.

mrbuilder1961 avatar Jul 14 '24 15:07 mrbuilder1961

Actually, I'm not sure how much concrete proof I have of this being caused by StyledChat incompatibility. can everyone who is experiencing this bug verify that your world/server has it installed at the same time as chat patches? i really appreciate it 😁

one source:

https://discord.com/channels/1077285607375638529/1077297192659861686/1260328256964395058

mrbuilder1961 avatar Jul 24 '24 04:07 mrbuilder1961

I'm also facing the issue in 1.21 with version 210.6.6 For me it mostly happens when I open game menu.

Crash Report
---- Minecraft Crash Report ----
// I let you down. Sorry :(

Time: 2024-07-28 00:39:17
Description: Unexpected error

com.google.gson.JsonSyntaxException: Element Reference{ResourceKey[minecraft:enchantment / minecraft:sweeping_edge]=Enchantment Sweeping Edge} is not valid in current registry set; Element Reference{ResourceKey[minecraft:enchantment / minecraft:sharpness]=Enchantment Sharpness} is not valid in current registry set; Element Reference{ResourceKey[minecraft:enchantment / minecraft:mending]=Enchantment Mending} is not valid in current registry set; Element Reference{ResourceKey[minecraft:enchantment / minecraft:looting]=Enchantment Looting} is not valid in current registry set; Element Reference{ResourceKey[minecraft:enchantment / minecraft:unbreaking]=Enchantment Unbreaking} is not valid in current registry set; Element Reference{ResourceKey[minecraft:enchantment / minecraft:sweeping_edge]=Enchantment Sweeping Edge} is not valid in current registry set; Element Reference{ResourceKey[minecraft:enchantment / minecraft:fire_aspect]=Enchantment Fire Aspect} is not valid in current registry set; Element Reference{ResourceKey[minecraft:enchantment / minecraft:sharpness]=Enchantment Sharpness} is not valid in current registry set; Element Reference{ResourceKey[minecraft:enchantment / minecraft:mending]=Enchantment Mending} is not valid in current registry set; Element Reference{ResourceKey[minecraft:enchantment / minecraft:looting]=Enchantment Looting} is not valid in current registry set; Element Reference{ResourceKey[minecraft:enchantment / minecraft:unbreaking]=Enchantment Unbreaking} is not valid in current registry set
	at obro1961.chatpatches.chatlog.ChatLog.lambda$serialize$1(ChatLog.java:197)
	at com.mojang.serialization.DataResult$Error.resultOrPartial(DataResult.java:276)
	at obro1961.chatpatches.chatlog.ChatLog.serialize(ChatLog.java:196)
	at obro1961.chatpatches.ChatPatches.lambda$onInitializeClient$2(ChatPatches.java:48)
	at net.fabricmc.fabric.api.client.screen.v1.ScreenEvents.lambda$static$2(ScreenEvents.java:101)
	at net.minecraft.class_437.afterInit(class_437.java:1831)
	at net.minecraft.class_437.handler$bjg000$fabric-screen-api-v1$afterInitScreen(class_437.java:1784)
	at net.minecraft.class_437.method_25423(class_437.java:318)
	at net.minecraft.class_310.method_1507(class_310.java:1143)
	at net.minecraft.class_310.method_20539(class_310.java:1721)
	at net.minecraft.class_309.method_1466(class_309.java:451)
	at net.minecraft.class_309.method_22678(class_309.java:499)
	at net.minecraft.class_1255.execute(class_1255.java:108)
	at net.minecraft.class_309.method_22676(class_309.java:499)
	at org.lwjgl.glfw.GLFWKeyCallback$Container.invoke(GLFWKeyCallback.java:82)
	at dynamic_fps.impl.feature.state.IdleHandler.onKey(IdleHandler.java:120)
	at org.lwjgl.glfw.GLFWKeyCallbackI.callback(GLFWKeyCallbackI.java:44)
	at org.lwjgl.system.JNI.invokeV(Native Method)
	at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3509)
	at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(RenderSystem.java:184)
	at net.minecraft.class_310.method_1523(class_310.java:1310)
	at net.minecraft.class_310.method_1514(class_310.java:882)
	at net.minecraft.client.main.Main.main(Main.java:256)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100)
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
	at obro1961.chatpatches.chatlog.ChatLog.lambda$serialize$1(ChatLog.java:197)
	at com.mojang.serialization.DataResult$Error.resultOrPartial(DataResult.java:276)
	at obro1961.chatpatches.chatlog.ChatLog.serialize(ChatLog.java:196)
	at obro1961.chatpatches.ChatPatches.lambda$onInitializeClient$2(ChatPatches.java:48)
	at net.fabricmc.fabric.api.client.screen.v1.ScreenEvents.lambda$static$2(ScreenEvents.java:101)
	at net.minecraft.class_437.afterInit(class_437.java:1831)
	at net.minecraft.class_437.handler$bjg000$fabric-screen-api-v1$afterInitScreen(class_437.java:1784)
	at net.minecraft.class_437.method_25423(class_437.java:318)
	at net.minecraft.class_310.method_1507(class_310.java:1143)
	at net.minecraft.class_310.method_20539(class_310.java:1721)
	at net.minecraft.class_309.method_1466(class_309.java:451)
	at net.minecraft.class_309.method_22678(class_309.java:499)
	at net.minecraft.class_1255.execute(class_1255.java:108)
	at net.minecraft.class_309.method_22676(class_309.java:499)
	at org.lwjgl.glfw.GLFWKeyCallback$Container.invoke(GLFWKeyCallback.java:82)
	at dynamic_fps.impl.feature.state.IdleHandler.onKey(IdleHandler.java:120)
	at org.lwjgl.glfw.GLFWKeyCallbackI.callback(GLFWKeyCallbackI.java:44)
	at org.lwjgl.system.JNI.invokeV(Native Method)
	at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3509)```

</details> 

Dark-Phoenix-01 avatar Jul 27 '24 19:07 Dark-Phoenix-01

When I set up my own mackerel, When I added LunaChat, I found that it changes the chat text. StyledChat is not on the server or client side.

In addition, I would like you to check the issue of the duplicate counter not working. (lol.)

KozukiYOMA avatar Jul 28 '24 09:07 KozukiYOMA

I'm also facing the issue in 1.21 with version 210.6.6 For me it mostly happens when I open game menu. Crash Report

Can confirm that this happens on 1.21 / 210.6.6, and the above devbuild fixes the issue

obj-obj avatar Jul 29 '24 04:07 obj-obj

Nevermind it still crashes in singleplayer just not in multiplayer

obj-obj avatar Jul 29 '24 08:07 obj-obj

https://mclo.gs?

mrbuilder1961 avatar Jul 29 '24 13:07 mrbuilder1961

please verify that ~~this build~~ fixes the issue! see the readme here for instructions on how to test it.

please test this one instead: ~~https://github.com/mrbuilder1961/ChatPatches/actions/runs/10312134468/artifacts/1793179405~~ (scroll down for newer build)

mrbuilder1961 avatar Jul 29 '24 13:07 mrbuilder1961

Nevermind it still crashes in singleplayer just not in multiplayer

Tested the latest commit (https://github.com/mrbuilder1961/ChatPatches/commit/52a1f5a3475ec482c6a77137914791c71d89a212) and it still crashes in singleplayer

obj-obj avatar Jul 31 '24 07:07 obj-obj

The crash is related to serializing the chat log to JSON before it is saved to disk, and disabling the chat log will fix the issue.

obj-obj avatar Aug 03 '24 00:08 obj-obj

please test this one instead: https://github.com/mrbuilder1961/ChatPatches/actions/runs/10312134468/artifacts/1793179405

i had one person say this build fixed the issue, see if it does for you all as well

mrbuilder1961 avatar Aug 08 '24 23:08 mrbuilder1961

please test this one instead: https://github.com/mrbuilder1961/ChatPatches/actions/runs/10312134468/artifacts/1793179405

i had one person say this build fixed the issue, see if it does for you all as well

No it still crashed!

Dark-Phoenix-01 avatar Aug 09 '24 18:08 Dark-Phoenix-01

log? this goes for everyone experiencing this or any other issue, i need mclo.gs links otherwise i don't have concrete evidence

mrbuilder1961 avatar Aug 09 '24 18:08 mrbuilder1961

log? this goes for everyone experiencing this or any other issue, i need mclo.gs links otherwise i don't have concrete evidence

I've been experiencing this crash as well (I just found this issue report when searching for this error.) I've experienced a crash with this error six times so far. I have attached each of the six crash reports, as well as the corresponding Minecraft client logs. I have not yet had a chance to do any sort of troubleshooting (such as disabling other mods or testing in single player mode), and I've not had a chance to test the above commits you posted yet, but hopefully these logs still help. I do not see any reference in the logs to the "mclo.gs links" that you mentioned and I'm not sure what those are or where I should be looking for them? If there are other logs or info that would help you let me know and I'll be happy to provide it. I do see a large (22MB) chatlog.json file in my log directory, would you like that as well?

Thanks! (Both for looking into this and for developing this mod in the first place!)

2024-08-03-4.log 2024-08-07-1.log 2024-08-07-2.log 2024-08-07-3.log 2024-08-08-1.log 2024-08-08-2.log crash-2024-08-03_21.27.35-client.txt crash-2024-08-07_03.29.17-client.txt crash-2024-08-07_05.15.53-client.txt crash-2024-08-07_05.17.04-client.txt crash-2024-08-08_10.58.51-client.txt crash-2024-08-08_13.10.44-client.txt chatpatches.json

xenium1024 avatar Aug 10 '24 05:08 xenium1024

I do not see any reference in the logs to the "mclo.gs links" that you mentioned and I'm not sure what those are or where I should be looking for them?

Apparently I am an idiot, lol. I just re-read the thread and saw your reference to https://mclo.gs above. I thought it was something in the log you were looking for. If you'd rather I post them there let me know!

xenium1024 avatar Aug 10 '24 05:08 xenium1024

I do not see any reference in the logs to the "mclo.gs links" that you mentioned and I'm not sure what those are or where I should be looking for them?

Apparently I am an idiot, lol. I just re-read the thread and saw your reference to https://mclo.gs above. I thought it was something in the log you were looking for. If you'd rather I post them there let me know!

please do! i appreciate all the links 🙃

mrbuilder1961 avatar Aug 10 '24 12:08 mrbuilder1961

Apparently I am an idiot, lol. I just re-read the thread and saw your reference to https://mclo.gs above. I thought it was something in the log you were looking for. If you'd rather I post them there let me know!

please do! i appreciate all the links 🙃

You got it! Hope this helps:

https://mclo.gs/iLujsJb - 8/3 crash https://mclo.gs/rkhIl6k - 8/3 log https://mclo.gs/76c2Tna - 8/7 crash https://mclo.gs/90HOJn1 - 8/7 log https://mclo.gs/SmUDKfC - 8/7 crash 2 https://mclo.gs/V9yT9Bf - 8/7 log 2 https://mclo.gs/UOR5DlP - 8/7 crash 3 https://mclo.gs/9auWwcs - 8/7 log 3 https://mclo.gs/hgTI04Q - 8/8 crash 1 https://mclo.gs/Ffa1xwP - 8/8 log 1 https://mclo.gs/PGN7e1E - 8/8 crash 2 https://mclo.gs/oqISMPp - 8/8 log 2

Let me know if there's anything else I can provide.

xenium1024 avatar Aug 10 '24 19:08 xenium1024

Latest commit seems to solve the issue for me

obj-obj avatar Aug 11 '24 21:08 obj-obj

An update from my end. I've recently updated fabric loader from 15.11 to 16.0. So far didn't face any crashes after that. I'll report if it happens.

Dark-Phoenix-01 avatar Aug 12 '24 17:08 Dark-Phoenix-01