r8420 / MoreOverlays-updated

MC Mod : Brings back some of the NEI Overlays ( Mob Spawns, Chunk Bounds, Item Search)
MIT License
5 stars 6 forks source link

java.lang.reflect.invocationtargetexception: null error #37

Closed Maho-Yoshino closed 2 years ago

Maho-Yoshino commented 2 years ago

i am having issues loading the mod image with these mods image

version is 1.19, trying to use the moreoverlays-1.21.1-mc1.19 version of the mod, forge version 41.1.0

edit: this is what the latest.txt says image this is what the crash log says image

Jayryn commented 2 years ago

Same error here with Forge Version 41.1.0 and Mod Version 1.21.1-mc1.19

Details:

    Caused by 0: java.lang.reflect.InvocationTargetException
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {}
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {}
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {}
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {}
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {}
        at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:68) ~[javafmllanguage-1.19-41.1.0.jar%23151!/:?] {}
        at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$10(ModContainer.java:121) ~[fmlcore-1.19-41.1.0.jar%23150!/:?] {}
        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {}
        at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {}
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {re:computing_frames}
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {re:computing_frames}
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {}
    Caused by 1: java.lang.NoClassDefFoundError: net/minecraftforge/client/ConfigGuiHandler$ConfigGuiFactory
        at at.ridgo8.moreoverlays.MoreOverlays.<init>(MoreOverlays.java:43) ~[moreoverlays-1.21.1-mc1.19.jar%23148!/:1.21.1-mc1.19] {re:classloading}
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {}
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {}
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {}
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {}
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {}
        at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:68) ~[javafmllanguage-1.19-41.1.0.jar%23151!/:?] {}
        at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$10(ModContainer.java:121) ~[fmlcore-1.19-41.1.0.jar%23150!/:?] {}
        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {}
        at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {}
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {re:computing_frames}
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {re:computing_frames}
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {}

    Mod File: /D:/.Games/Minecraft/.minecraft_forge/mods/moreoverlays-1.21.1-mc1.19.jar
    Failure message: More Overlays Updated (moreoverlays) has failed to load correctly
        java.lang.reflect.InvocationTargetException: null
    Mod Version: 1.21.1-mc1.19
    Mod Issue URL: https://github.com/r8420/MoreOverlays-1.15/issues
    Exception message: java.lang.ClassNotFoundException: net.minecraftforge.client.ConfigGuiHandler$ConfigGuiFactory
Stacktrace:
    at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:141) ~[securejarhandler-2.1.4.jar:?] {}
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] {}
    at at.ridgo8.moreoverlays.MoreOverlays.<init>(MoreOverlays.java:43) ~[moreoverlays-1.21.1-mc1.19.jar%23148!/:1.21.1-mc1.19] {re:classloading}
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {}
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {}
    at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {}
    at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {}
    at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:68) ~[javafmllanguage-1.19-41.1.0.jar%23151!/:?] {}
    at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$10(ModContainer.java:121) ~[fmlcore-1.19-41.1.0.jar%23150!/:?] {}
    at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {}
    at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {}
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}
    at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}
    at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {re:computing_frames}
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {re:computing_frames}
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {}
Jayryn commented 2 years ago

The issue is likely caused by this. 1.19 is unplayable with Forge 41.1.0 as of this moment.

Caused by 1: java.lang.NoClassDefFoundError: net/minecraftforge/client/ConfigGuiHandler$ConfigGuiFactory

Jayryn commented 2 years ago

Also likely much more detailed issue duplicate of #31

Maho-Yoshino commented 2 years ago

The issue is likely caused by this. 1.19 is unplayable with Forge 41.1.0 as of this moment.

Caused by 1: java.lang.NoClassDefFoundError: net/minecraftforge/client/ConfigGuiHandler$ConfigGuiFactory

yea, but i tried downgrading forge versions but none of them worked for me, so i don't know how i could fix this

Jayryn commented 2 years ago

The issue is likely caused by this. 1.19 is unplayable with Forge 41.1.0 as of this moment. Caused by 1: java.lang.NoClassDefFoundError: net/minecraftforge/client/ConfigGuiHandler$ConfigGuiFactory

yea, but i tried downgrading forge versions but none of them worked for me, so i don't know how i could fix this

The issue is that forge had major changes for its mod loading since 41.0.94+ and therefor most mods stopped working for newer forge versions unless being updated -> most common mods like JEI already depend on 41.0.94 which forces you to either use an older version of JEI or wait for mod developers to upgrade to the newer implementations of forge.

All in all, mod creators will have to adapt their style of development either way as forge isn't reverting their changes backwards.

Maho-Yoshino commented 2 years ago

The issue is likely caused by this. 1.19 is unplayable with Forge 41.1.0 as of this moment. Caused by 1: java.lang.NoClassDefFoundError: net/minecraftforge/client/ConfigGuiHandler$ConfigGuiFactory

yea, but i tried downgrading forge versions but none of them worked for me, so i don't know how i could fix this

The issue is that forge had major changes for its mod loading since 41.0.94+ and therefor most mods stopped working for newer forge versions unless being updated -> most common mods like JEI already depend on 41.0.94 which forces you to either use an older version of JEI or wait for mod developers to upgrade to the newer implementations of forge.

All in all, mod creators will have to adapt their style of development either way as forge isn't reverting their changes backwards.

i just tried using 41.0.94 and i still had the same error pop up so i don't know what is up anymore with forge

Jayryn commented 2 years ago

Please read correctly what I said.

These crashes are not bugs or issues with forge but mod owners must upgrade their mods in order to work again.

I said that forge changed major stuff in 41.0.94 which causes a lot of mods to crash on startup as these mods have not updated. (The changes that forge made were necessary and likely to be implemented sometime) -> Forge for instance changed package or class names for its API which we see above in the error with NoClassDefFoundError (aka there is no class because it changed its position for api usage)

Jayryn commented 2 years ago

I am currently trying to setup a dev environment to fix this issue with a pull request, but my IDE / Gradle Environment doesn't want to work the way I want it too.

As of now we are dependent on @r8420 to fix the issue, which I sincerely hope, that he does it shortly.

Maho-Yoshino commented 2 years ago

so basically i just need to revert to older forge versions for now until this issue is solved

Jayryn commented 2 years ago

so basically i just need to revert to older forge versions for now until this issue is solved

-> I have contacted @r8420 via Email and am waiting for his response.

Either you use forge versions below 41.0.94 (which is likely not compatible anymore with most updated mods) or you wait for this repository maintainer to update this resource.

Mods like JEI (Just Enough Items) have already implemented the newer patches and are dependent on 41.0.94+ (Therefor unusable with its newest updates)

Jayryn commented 2 years ago

Currently Working on a fix but need to tweak a little as some stuff changed -> most is already finished -> I will open a PR after I finish

Jayryn commented 2 years ago

@LegendaryEvenWeeb I've got it working but need to fix some minor things like you see in the screenshot below image

Maho-Yoshino commented 2 years ago

nice job there, i tried reverting all my mods to 41.0.93 but JEI doesnt seem to support anything below 41.0.94 anymore cuz for some reason i just keep getting a common_setup error with every version of JEI that is pre-41.0.94, so i guess i wasted a bunch of my time trying that

Jayryn commented 2 years ago

nice job there, i tried reverting all my mods to 41.0.93 but JEI doesnt seem to support anything below 41.0.94 anymore cuz for some reason i just keep getting a common_setup error with every version of JEI that is pre-41.0.94, so i guess i wasted a bunch of my time trying that

I have no idea how I caused this lighting mesh issue btw, I'll try to fix it though xD (I normally code plugins instead of mods so this is quite unusual programming stuff for me)

EDIT: I already fixed the button configuration, which was bugged -> will now fix lighting mesh and then we'll be ready image

EDIT 2: Whoopsie, chunk borders are broken too image

Jayryn commented 2 years ago

@LegendaryEvenWeeb I have it working locally, I will now do a little cleanup of my edits and then open a PR as well as publish it on my fork

Jayryn commented 2 years ago

@LegendaryEvenWeeb Your issue is fixed with #38. We have to wait until @r8420 will merge it.

You can use my current release for 1.19 which is exactly the same as in the PR. https://github.com/drjayy/MoreOverlays-updated/releases/tag/v1.21.2

-> Please leave this issue open so it is used as reference for the PR (aka r8420 will see it)

Maho-Yoshino commented 2 years ago

good job, now we wait for r8420

Maho-Yoshino commented 2 years ago

if you say so i will keep it open for reference btw, happy to help the update reach @r8420, even if it just means keeping this issue open

Jayryn commented 2 years ago

good job, now we wait for r8420

Thanks, you can still use my Mod Download Release with all the fixes as it contains exactly the same as the PR.

Therefor providing you with a functioning mod for you to use in 1.19

Maho-Yoshino commented 2 years ago

good job, now we wait for r8420

Thanks, you can still use my Mod Download Release with all the fixes as it contains exactly the same as the PR.

Therefor providing you with a functioning mod for you to use in 1.19

already downloaded it, but since it is 12am i am not asking my friend to fire up his server so maybe tomorrow i will try it out

Jayryn commented 2 years ago

good job, now we wait for r8420

Thanks, you can still use my Mod Download Release with all the fixes as it contains exactly the same as the PR. Therefor providing you with a functioning mod for you to use in 1.19

already downloaded it, but since it is 12am i am not asking my friend to fire up his server so maybe tomorrow i will try it out

Please keep me updated if everything works fine. I've played about 3 hours earlier on my Vanilla 1.19 Survival Server which worked perfectly fine.

Keep in mind that I updated the resource a little earlier to fix a client crash

Still same download link -> You'll see the timestamp difference in the GitHub Release.

Maho-Yoshino commented 2 years ago

my friend has spigot on his server so i will see if that could mess something up, but let's just hope it will work fine

Jayryn commented 2 years ago

my friend has spigot on his server so i will see if that could mess something up, but let's just hope it will work fine

Don't worry about spigot, it's still vanilla based and I'm using paperspigot which is just faster Spigot with more fixes and configurations.

Everything is working just fine as Spigot and Paper are trying to be as close to vanilla as possible.

Maho-Yoshino commented 2 years ago

alright then, i gotta say thank you for your contribution to one of the most useful mods to me

Jayryn commented 2 years ago

alright then, i gotta say thank you for your contribution to one of the most useful mods to me

Is everything working for you?

I've noticed a little bug when you search for items where amount numbers are grayed out and go to white again

However, this is a minor visual issue which I'll address once I'm back home in 2 days

Jayryn commented 2 years ago

@LegendaryEvenWeeb this issue can be closed as the PR is now officially merged

Maho-Yoshino commented 2 years ago

@LegendaryEvenWeeb this issue can be closed as the PR is now officially merged

alright, thanks for the help

r8420 commented 2 years ago

Should be fixed in MoreOverlays 1.21.2