Vein Mining (Fabric/Forge/Quilt)

Vein Mining (Fabric/Forge/Quilt)

7M Downloads

[Bug]: Mixin incompatibility with Prism

AHilyard opened this issue ยท 3 comments

commented

Minecraft Version

1.19.2

What happened?

When this mod is installed alongside Prism in a Fabric 1.19.2 instance, somehow one of Prism's mixins is skipped without any sort of warning or error. This is the mixin in question: https://github.com/AHilyard/Prism/blob/1.19-fabric/src/main/java/com/anthonyhilyard/prism/mixin/TextColorMixin.java
This mixin adds an interface to the TextColor class and uses it for casts later, causing crashes when the mixin is skipped.
I have tried to pin down the cause of this and it has eluded me, but I suspect it may have something to do with Fabric ASM. This behavior does not occur in Forge, even though the Forge version of Prism uses identical mixins.

How do you trigger this bug?

  1. Install Legendary Tooltips and Vein Mining together on a Fabric 1.19.2 instance.
  2. Launch Minecraft.
  3. Observe crash.

Loader

Fabric

Loader Version

Fabric 0.14.9, Fabric API 0.61.0

Mod Version

veinmining-fabric-1.0.0-beta.3+1.19.2 (also occurs on beta.1)

Relevant Log Outputs

https://pastebin.com/wwkR4TyG

commented

I have tried to pin down the cause of this and it has eluded me, but I suspect it may have something to do with Fabric ASM.

I also suspect this, as I needed to investigate a very similar issue #64, however I have yet to discover any useful results. Attempts to isolate Fabric ASM into a test mod and re-implementing similar code that I use for Vein Mining does not result in a crash, which is confusing to me because I have no idea what else it could possible be about the implementation that causes this kind of error.

I'll do some further tests involving some deeper alternate builds of Vein Mining to see if I can at least root out the cause.

commented

I ended up just removing Fabric ASM. Although this might cause some minor inconsistencies when other mods try and inspect the Vein Mining enchantment, I don't expect this to result in any significant issues and I, for now, don't see a viable alternative.

It's definitely something to do with Fabric ASM because that was the only thing I changed and the new build runs fine with both mods that cause this issue together with Vein Mining. However, as I said above, testing it with just Fabric ASM and a simple copy of a similar implementation does not yield any crashes so I don't know exactly what about it was causing the problem. I can only suspect it involves a very specific set of circumstances that I accidentally triggered but I wouldn't know where to begin to investigate on that front and I'm willing to settle with my current solution for the moment.

commented

Wonderful, thank you for looking into this @TheIllusiveC4. Interestingly, I've found that other mods that are adding enchantment categories via Fabric ASM are encountering crashes as well (StellarWind22/Fabric-Shield-Lib#82), which indicates to me either a problem with Fabric ASM itself or just poor documentation on their part.