Lithium (Fabric)

Lithium (Fabric)

22M Downloads

Lithium crashes trying to declared methods of an Entity class

sm9cc opened this issue ยท 15 comments

commented

Reproduction Steps

Unsure, but seems to be happening when exploring new chunks, sorry for lack of information.

Crash Report File

https://gist.github.com/SM9CC/da23ddf8c3a0edf57986ad96341c2d3d

Additional Information

https://github.com/jellysquid3/lithium-fabric/blob/1.16.x/dev/src/main/java/me/jellysquid/mods/lithium/common/entity/EntityClassGroup.java#L67

commented

class_4587 is MatrixStack.
You seem to have more than 250 mods listed, so it might be an incompatibility between sodium and any one of them. Very strange for the matrix stack to have disappeared though.

commented

Also this MatrixStack.class is given to code that expects a subclass of Entity. Something major is broken here.

commented

@Kroppeb I don't understand what connections you're drawing here. The resulting crash is because MatrixStack (a client-side class) is being loaded on a dedicated server.

As to why this is happening, it's not clear to me...

commented

Oh, I'm an idiot

commented

So this is triggered when checking for method_30948 aka is_collidable aka BOAT_SHULKER_LIKE_COLLISION. How this triggers the loading of MatrixStack is beyond me.

commented

As you were using a snapshot build, please upgrade to the latest version

commented

I have updated to the latest Lithium build on my server now, still same issue, thanks

commented

Can you test this issue with only half of the mods installed at a time to find out which combination of mods is causing this issue? Also can you try what happens without Lithium?

commented

My guess is that there is another mod that adds an subclass of Entity that contains a method that returns a MatrixStack or requires a MatrixStack as an argument. This method should be annotated to be only client side, but for some reason it is not. The getDeclaredMethod implementation of your JVM creates an object for each method, which also tries to fill in the Method field returnType or parameterTypes for each existing method. For that the non existing MatrixStack class needs to be loaded

commented

You can work around the crash by adding mixin.chunk.entity_class_groups=false to the lithium config. I can add a try{ block in Lithium to print out which class is causing the crash.

commented

Can you update Lithium to this snapshot version:
https://github.com/jellysquid3/lithium-fabric/suites/1895977912/artifacts/37127591
(might need to open link in new tab, might need to login to github)
(use the lithium-fabric-mc1.16.5-0.6.1-SNAPSHOT.jar from inside the zip file)

This version adds a more verbose error message that should tell us which class is leading to the problem.

commented

No crashes without Lithium strangely, I will see if I can figure it out and let you know, cheers.

commented

No crashes without Lithium strangely, I will see if I can figure it out and let you know, cheers.

The error is caused in lithium code, so it's not too surprising that removing it fixes it. The crash seems to be caused by a compatibility issue with another mod so if you manage to figure out which other mod(s) it might be that would help a lot.

commented

Solved on discord, thanks for your help, much appreciated.

Offending mod - https://www.curseforge.com/minecraft/mc-mods/small-endermen (I have pinged haykam)

commented

This issue was fixed in Small Endermen v1.1.1.