Better Statistics Screen

Better Statistics Screen

21M Downloads

[v2.3+any] Crashes both FabricMC and QuiltMC. Missing `Architectury API` and defective `Mixin` both causing crashes.

Shad0wolf0 opened this issue ยท 4 comments

commented

Describe the bug
Problem 1: Loading the mod by itself on quilt loader v0.18.3 will crash. Resolved by installing Quilted Fabric API.
Problem 2: With Quilted Fabric API, trying to load the pause menu in a world will crash the game. Resolved by installing Cloth Config.
Problem 3: Mobs in the mobs section don't render with the Chunks fade in mod for some reason. I don't see how the mod correlates with Better Stats. Removing Chunks fade in and keeping Sodium fixes the issue. Could this be a Chunks fade in issue?

To Reproduce Problem 1
Steps to reproduce the behavior:

  1. Install Quilt loader v0.18.3 and Better Stats v2.3 on 1.19.3
  2. Try to launch game and crash on starup

To Reproduce Problem 2
Steps to reproduce the behavior:

  1. InstallQuilt loader v0.18.3, Quilted Fabric API "QFAPI 5.0.0-beta.8 and QSL 4.0.0-beta.12", and Better Stats v2.3 on 1.19.3
  2. Launch game and join a world
  3. Go to the pause menu by pressing escape, to only freeze a bit and crash

To Reproduce Problem 3
Steps to reproduce the behavior:

  1. Install Quilt loader v0.18.3, Quilted Fabric API "QFAPI 5.0.0-beta.8 and QSL 4.0.0-beta.12", Cloth Config API v9.0.94, Better Stats v2.3, Sodium 0.4.9 for Chunks fade in v2.0.10 on 1.19.3
  2. Launch game and join a world
  3. Open pause menu and go to statistics
  4. Filter Mobs and enable Empty Stats to see no mobs rendering.

Expected behavior
Problem 1: To launch without dependencies (only advertised for Fabric currently, I think)
Problem 2: To work without dependencies (only advertised for Fabric currently, I think)
Problem 3: To render mobs in the statistics menu with Chunks fade in mod

Logs and images
problem 1.log
problem 2.log
image

commented

Hello.
I decided to look into what is causing the crashes and issues on QuiltMC, and here's what I found:

First I decided to load the mod all by itself, because it is meant to have no required dependencies. I got a crash:

org.quiltmc.loader.impl.FormattedException: java.lang.RuntimeException: Mixin transformation of net.minecraft.class_310 failed
	at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:529)
	at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:82)
	at org.quiltmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:28)
Caused by: java.lang.RuntimeException: Mixin transformation of net.minecraft.class_310 failed
	at org.quiltmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:456)
	at org.quiltmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:246)
	at org.quiltmc.loader.impl.launch.knot.KnotClassDelegate.loadClassOnly(KnotClassDelegate.java:164)
	at org.quiltmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:150)
	at org.quiltmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:228)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	at net.minecraft.client.main.Main.method_44604(Main.java:214)
	at net.minecraft.client.main.Main.main(Main.java:51)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:527)
	... 2 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392)
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234)
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202)
	at org.quiltmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:451)
	... 14 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinPreProcessorException: Attach error for #tcdcommons:tcdcommons.client.mixin.events.json:MixinMinecraftClient from mod tcdcommons during activity: [Transform -> Method onResolutionChanged(Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;)V -> INVOKEINTERFACE -> dev/architectury/event/Event::invoker:()Ljava/lang/Object;]
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:313)
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:277)
	at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1289)
	at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:292)
	at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:421)
	at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:403)
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
	... 17 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: dev.architectury.event.Event
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMemberReference(MixinPreProcessorStandard.java:783)
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMethod(MixinPreProcessorStandard.java:769)
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transform(MixinPreProcessorStandard.java:735)
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:307)
	... 23 more
Caused by: java.lang.ClassNotFoundException: dev.architectury.event.Event
	... 27 more

However if you look at the last two lines of the crash report, it appears the crash report is complaining about Architectury API missing. I then tried to see if the same would happen on FabricMC, and it did.

I then installed Architectury API, which unfortunately also requires installing Fabric API, and the game ran without crashing at first, but then crashed in the same way you provided in your problem 2.log:

java.lang.IllegalAccessError: Update to non-static final field net.minecraft.class_4185.field_22767 attempted from a different method (setOnPress) than the initializer method <init> 

I then tried to run the mod on FabricMC and got the same issue. This second crash appears to be an issue with one of my Mixins.

So, what appears to be happening are two problems indeed. One is about Architectury API not loading despite it being embedded, and the other is about a Mixin not being applied properly.

  • The first issue about Architectury API occurs because it is missing, but I embedded it into TCDCommons which itself is embedded in Better Stats. So I guess the FabricMC loader does not loaded nested embedded mods? Didn't know that...
  • The second issue is my mess-up with a Mixin that modifies a final field that represents the "on click" function for the "Statistics" button. It can easily be fixed tho.

Both of these issues seem to be a thing on both mod loaders. I will quickly try to fix fix both issues as soon as possible.
Thanks a lot for reporting them and have a great day!

commented

Also just to add, it appears I missed the fact that Architectury API depends on Fabric API. I will embed it as well and see if that fixes it. I also just fixed the Mixin issue and will publish the fix asap.

commented

TCDCommons patches have been published. I am now patching and publishing Better Stats.

If you wish to use Better Stats v2.3 right away without waiting for me to pach it, you will have to download the TCDCommons patch I just published.

commented

All fixed up. Thanks a lot for reporting the bug. I hope this doesn't break mod-packs even tho it might. I have fixed the issues and published patches tho. Have a great day!