Cooking for Blockheads

Cooking for Blockheads

145M Downloads

Race Condition between ColorEvent and Objectholders can cause client crashes

Tfarcenim opened this issue ยท 6 comments

commented

crash report: https://hatebin.com/qmbpqeedcz

Due to the nature of how modloading works, it's impossible to guarantee that all objectholders are filled in before the coloring events are called which leads to the above crash.

A workaround could be done by moving the color setup to clientsetupevent and just using mc.getColors since it's identical to the object used in the event and is guaranteed to be after all objectholders are filled in.

commented

I'm not using ObjectHolders, and if there's a race condition between block registration and color event that's a Forge bug, since the event is supposed to specifically be fired "at the right time". Is there an open issue for that somewhere?

commented

There's a closed issue for it: MinecraftForge/MinecraftForge#5862

commented

forge-28.1.106 (latest atm)
CookingForBlockheads_1.14.4-7.4.1.jar

Having the same issue. Crashlog: https://hatebin.com/khyrjgajsu

commented

Someone on the Forge issue suggests this may be happening due to another silent crash earlier on in mod loading. Do you have a full latest.log file?

commented

Yeah, it was wrong value (mistype) in pickletweaks' config. Didn't know silent crashes is a thing, thanks!

commented

Yeah. To be honest, when launching Minecraft on my server, almost every 3rd or 4th launch results in a crash due to some registry error that can't be replicated. It doesn't seem to happen as much on the client though.