FabricMC / fabric

Essential hooks for modding with Fabric.
Apache License 2.0
2.36k stars 416 forks source link

[Last 6 versions of Fabric Api] [1.17.1] Client will not start #1676

Closed itsdinkd closed 3 years ago

itsdinkd commented 3 years ago

Anything after fabric-api-0.37.2+1.17.jar will cause my client to not start. Starting the game from launcher crashes after 10 seconds as you see in the logs below it doesn't load everything.

[23:01:31] [main/INFO]: Loading for game Minecraft 1.17.1 [23:01:31] [ForkJoinPool-1-worker-9/WARN]: The mod "libcd" contains invalid entries in its mod json:

warjort commented 3 years ago

There are many warnings in that log, but no actual error. Can you post your latest crash report, this is a copy of what the launcher showed when you crashed. You can find it in the folder called "crash-reports".

warjort commented 3 years ago

kubejs@1605.3.10-build.9999

This looks suspicous. 1.16 version of kubejs is unlikely to work in 1.17

Technici4n commented 3 years ago

kubejs@1605.3.10-build.9999

This looks suspicous. 1.16 version of kubejs is unlikely to work in 1.17

This is the 1.17 version :smile:

warjort commented 3 years ago

This is the 1.17 version 😄

https://www.curseforge.com/minecraft/mc-mods/kubejs-fabric/files/3355296 Isn't that just the 1.16 version hacked to compile on 1.17? It isn't supported. I don't think it even has a branch in their codebase? :-)

Technici4n commented 3 years ago

It's on shedaniel's fork. AOF4 needs it for its unification scripts, so don't be too surprised that it exists. :smile: I even host it on my "maven" for my own use (https://github.com/Technici4n/Technici4n-maven/tree/master/dev/latvian/mods/kubejs-fabric/1605.3.10-build.9999). Anyway, this is all a bit off-topic...

Waiting to see the crash log for this issue.

itsdinkd commented 3 years ago

Unfortunately a crash log is not generating

On Sat, Aug 28, 2021, 2:55 AM Adrian Brock @.***> wrote:

There are many warnings in that log, but no actual error. Can you post your latest crash report, this is a copy of what the launcher showed when you crashed. You can find it in the folder called "crash-reports".

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/FabricMC/fabric/issues/1676#issuecomment-907603057, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIL5CKAMO2RC7N6BV2NHM43T7CXAZANCNFSM5C63C3ZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

warjort commented 3 years ago

If there is no crash report that suggests it is hard crash in the Java virtual machine/native code rather than a mod error.

Something like this maybe the cause:

[23:01:44] [main/INFO]: Trying to switch memory allocators to work around memory leaks 
present with Jemalloc 5.0.0 through 5.2.0 on Windows

jemalloc is native c code I am not familiar with whatever is doing this replacement and it doesn't say who is responsible in the log message?

warjort commented 3 years ago

Does the launcher at least give you an error code when it crashed?

warjort commented 3 years ago

You might also see if you can locate a core dump made by the jvm, but I don't know where it would located? Typically it would be in the working directory of the java processs, whatever that is for minecraft running from the launcher. But it might not be generating a core dump and just exiting with an error code.

K0-RR commented 3 years ago

and it doesn't say who is responsible

https://github.com/CaffeineMC/sodium-fabric/commit/df1efdb3314c13f7724f3a74000e05f47f05c396

itsdinkd commented 3 years ago

Does the launcher at least give you an error code when it crashed?

Error code is 0 :(

itsdinkd commented 3 years ago

I don't know if this helps or not but I tried running the latest fabric with the same mod pack on my server and its actually giving an error with some real information

(irrelevant to above but I also just tried updating sodium to 0.3.1 on my client with latest fabric api, no luck. also tried removing sodium, no luck)

Exception in thread "main" java.lang.RuntimeException: Failed to setup Fabric server environment! at net.fabricmc.loader.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:58) Caused by: java.lang.RuntimeException: java.lang.RuntimeException: An exception occurred when launching the server! at net.fabricmc.loader.launch.server.FabricServerLauncher.setup(FabricServerLauncher.java:116) at net.fabricmc.loader.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:56) Caused by: java.lang.RuntimeException: An exception occurred when launching the server! at net.fabricmc.loader.launch.server.FabricServerLauncher.launch(FabricServerLauncher.java:70) at net.fabricmc.loader.launch.server.FabricServerLauncher.setup(FabricServerLauncher.java:114) ... 1 more Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at net.fabricmc.loader.launch.server.FabricServerLauncher.launch(FabricServerLauncher.java:68) ... 2 more Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:236) at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153) at net.fabricmc.loader.launch.knot.KnotServer.main(KnotServer.java:28) ... 7 more Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234) ... 9 more Caused by: java.lang.NoSuchFieldError: cachedItemVariant at net.minecraft.class_1792.(class_1792.java:91) at net.minecraft.class_1739.(class_1739.java:14) at net.minecraft.class_1802.(class_1802.java:20) at net.minecraft.class_2378.method_10234(class_2378.java:176) at net.minecraft.class_2378.method_34031(class_2378.java:275) at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:723) at net.minecraft.class_2378.(class_2378.java:274) at net.minecraft.class_2966.method_12851(class_2966.java:44) at net.minecraft.server.Main.main(Main.java:92) ... 14 more

warjort commented 3 years ago
Caused by: java.lang.NoSuchFieldError: cachedItemVariant
at net.minecraft.class_1792.(class_1792.java:91)

class_1792 is net/minecraft/class_1792 net/minecraft/item/Item

This looks like a broken mixin by some mod.

Can you try adding this mod to see if shows which mods are modifying the Item constructor. https://www.curseforge.com/minecraft/mc-mods/mixintrace

Failing that and the fact that you are getting no errors or error codes, the only thing I can suggest is to try to remove mods individually until you find the mod that is causing the problem.

Technici4n commented 3 years ago

https://github.com/FabricMC/fabric/blob/1.17/fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/mixin/transfer/ItemMixin.java

I have no clue why this is crashing though.

itsdinkd commented 3 years ago

Okay guys, went through 160 mods, fml. Culprit is Wireless Networks latest version.

itsdinkd commented 3 years ago

I wish I read your post before doing that @warjort lol probably would've saved me an hour and a half.

Technici4n commented 3 years ago

This is a subtle mixin conflict. I'll have a fix in a bit. In the meanwhile, you can manually add this jar to your mods folder, that should resolve the conflict: https://github.com/Technici4n/Technici4n-maven/raw/master/dev/technici4n/FastTransferLib/0.5.6/FastTransferLib-0.5.6.jar.

itsdinkd commented 3 years ago

Oh wow you're amazing. The FastTransferLib will allow me to keep fabric API updated + use wireless networks?

Technici4n commented 3 years ago

Hopefully yes, otherwise let me know.

itsdinkd commented 3 years ago

@Technici4n so i'm going to add it today, i'm curious though, is curseforge going to accept this mod into my modpack when uploading it to the site?

Technici4n commented 3 years ago

I think so? If that doesn't work, the next fabric API release will contain a fix.

itsdinkd commented 3 years ago

I think so? If that doesn't work, the next fabric API release will contain a fix.

so i manually added Fast transfer lib and the client still crashed upon trying to start game.

Technici4n commented 3 years ago

Crash log?

itsdinkd commented 3 years ago

It did the same as above, cut off after mods loaded. No crash log just under latest.log

On Wed, Sep 1, 2021, 2:38 AM Technici4n @.***> wrote:

Crash log?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/FabricMC/fabric/issues/1676#issuecomment-910113471, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIL5CKHYUY4MYVWOB6VIFH3T7XYA5ANCNFSM5C63C3ZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Technici4n commented 3 years ago

Ok, update to fabric API 0.40.0, remove fasttransferlib and try again. In any case, please post the full log again.

itsdinkd commented 3 years ago

0.40 fixed it :) added wireless transfer back and we're good to go.

Technici4n commented 3 years ago

Nice! :)