ChAoSUnItY / Forgelin-Continuous

Stands with Kotlin!
Other
6 stars 4 forks source link

What could cause `can not access a member of class net.shadowfacts.forgelin.Forgelin with modifiers "private"` #19

Open SettingDust opened 1 week ago

SettingDust commented 1 week ago
net.minecraftforge.fml.common.LoaderException: forgelin Failed to load new mod instance.

    at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:603) ~[catserver.jar:git-CatServer-1.12.2-090a6ffb]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_345]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_345]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_345]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_345]
    at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?]
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?]
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?]
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?]
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?]
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?]
    at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?]
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219) ~[catserver.jar:git-CatServer-1.12.2-090a6ffb]
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197) ~[catserver.jar:git-CatServer-1.12.2-090a6ffb]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_345]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_345]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_345]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_345]
    at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?]
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?]
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?]
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?]
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?]
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?]
    at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?]
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136) ~[LoadController.class:git-CatServer-1.12.2-090a6ffb]
    at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595) ~[Loader.class:git-CatServer-1.12.2-090a6ffb]
    at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:97) ~[FMLServerHandler.class:git-CatServer-1.12.2-090a6ffb]
    at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:336) ~[FMLCommonHandler.class:git-CatServer-1.12.2-090a6ffb]
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:169) ~[nz.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:636) [MinecraftServer.class:?]
    at java.lang.Thread.run(Thread.java:750) [?:1.8.0_345]
Caused by: java.lang.IllegalAccessException: Class io.github.chaosunity.forgelin.KotlinAdapter can not access a member of class net.shadowfacts.forgelin.Forgelin with modifiers "private"
    at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102) ~[?:1.8.0_345]
    at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296) ~[?:1.8.0_345]
    at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288) ~[?:1.8.0_345]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:413) ~[?:1.8.0_345]
    at io.github.chaosunity.forgelin.KotlinAdapter.getNewInstance(KotlinAdapter.kt:21) ~[KotlinAdapter.class:?]
    at net.shadowfacts.forgelin.KotlinAdapter.getNewInstance(KotlinAdapter.kt:16) ~[KotlinAdapter.class:?]
    at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:598) ~[FMLModContainer.class:git-CatServer-1.12.2-090a6ffb]
    ... 31 more

crash-2024-11-22_22.47.01-server.txt

ChAoSUnItY commented 1 week ago

Please check the crash report text file you included, it seems be different from the crash report you commented.

SettingDust commented 1 week ago

updated

ChAoSUnItY commented 1 week ago

I'm not ure what could cause this exeception, since the following line of code should have already handled object class case and using the only object instance:

https://github.com/ChAoSUnItY/Forgelin-Continuous/blob/a9f6b8478d6c3d77dbd641c930d13752c5cbc710/src/main/kotlin/io/github/chaosunity/forgelin/KotlinAdapter.kt#L14-L22

Can you provide the modpack so I can attempt to reproduce the exception? Also, is this exception always or randomly occured?

SettingDust commented 5 days ago

图片

Always. Have no idea. https://ttttt.link/f/6743e66e7676a