Incapacitated

Incapacitated

454k Downloads

Missing Class in Mod Causing Crashes

Retroactive-Android opened this issue ยท 7 comments

commented
Image This is an issue that keeps happening on and off, seemingly at random. It is in a modpack, so it may be a mod conflict issue, but the error report only mentions incapacitated. I have had a hell of a lot of difficulty reproducing it.

Currently we don't have any crash reports, but if I get any I will attach them in a reply immediately.

This is the modrinth modpack file for the modpack we are using if you want to look under the hood. I had to zip it up for Github to allow me to upload it, but it's an mrpack inside.
0.1.0 S1 TESTER VisionSteps 1.0.0.zip

commented

I have successfully found when the issue occurs, and it's when generating a world.
Other than that, it can sometimes corrupt the world in its entirety.

commented

Found the issue!

Put the mod and the errors through chatGPT, and found a missing class.
Services.load(IPlatformHelper.class) requires com.cartoonishvillain.incapacitated.platform.fabric.FabricPlatformHelper

It even includes the correct registration file:
META-INF/services/com.cartoonishvillain.incapacitated.platform.services.IPlatformHelper

But the actual implementation class is not bundled in the .jar.
So when Java tries to load the service, it throws:

NoClassDefFoundError: Could not initialize class Services
Caused by: NullPointerException: Failed to load service for IPlatformHelper

commented

Hey, sorry for the late reply, I've been heads down on another project.

Would you mind telling me what version of the mod/game you're loading?

I can take a look from my end as to why the service isn't present (where seemingly in every other version it's there fine) easier then.

I see you're running fabric and a spot check of the latest fabric 1.21.1 (the latest version of minecraft I've supported aside from craftmine) version doesn't seem to have the issue.

commented

Actually looking at the pack you sent I don't see config changes. And since it's already a Modrinth pack you probably pulled it from there.

Funnily enough, when I installed the mrpack myself it seemed to work fine. Is this a consistent crash on your end?

This may end up being some weird Java installation issue or something.

commented

Minecraft version 1.21.1
Fabric version 0.16.14
Fabric API version 0.116.4+1.21.1
Incapacitated version 1.9.4 for 1.21.1

Keep in mind, this IS in a modpack. Let's be fair, it is entirely possible that some other mod has broken the service yours tries to access. However, looking through the logs, this is the only mod I could ever find mentioned.

commented

Yea this is quite strange uh, I've installed the same fabric parameters and version from both Modrinth and curseforge and all seems well.

A couple of ideas I have for this:

  • Have you modified the config? I don't know for certain but it could be the case that if the config isn't set up correctly it could be breaking something? I wouldn't quite expect this but I'm not exactly using a traditional system for it

  • Did you get the mod from one of the two sources listed above?

commented

Yea this one's a bit of a head scratcher. Seems like I'm not quite able to reproduce it myself using either of the official site's latest version of the fabric 1.21.1 mod, nor the pack you provided.

May recommend just uninstalling the mod and reinstalling it to see if that helps. Maybe some freak incident happened during download and the file got mangled.

Alternatively, ensure you have a newish version of Java installed. (1.21.1 uses Java 21).

Microsoft/Modrinth typically do provide Java. But I've found some freak cases where the game will panic under those provided versions, and that installing Java directly on the machine fixed those cases.