Fusion (Connected Textures)

Fusion (Connected Textures)

40M Downloads

[Crash] 1.12.2 crash with LoliASM

Lodgercat opened this issue · 6 comments

commented

Version Info

  • Minecraft 1.12.2
  • Fusion 1.20+

What mod loader are you using?:

  • Forge

Are you using OptiFine:
No (my mod pack crashes straight away if I use Optifine because of other mods)

Steps to Reproduce

  1. Launch my Lodgercat MMM 1.25 mod pack (https://www.curseforge.com/minecraft/modpacks/lodgercat-machines-magic-and-mythics-modpack) with Fusion version updated from the compatible 1.11 to any 1.20+ version
  2. It loads into Minecraft main menu ok with no errors
  3. Joining any server or singleplayer world crashes (both previously played and new worlds), producing the report

I've narrowed it down to just Fusion by binary-updating each mod that could be updated. Then, I tried each 1.20+ version of Fusion but they all crashed the same. I'm guessing something changed with the major update that is now incompatible with my mod pack. Would be cool to see the new changes, but if not then things still work well on 1.11 :)

Crash report (~/logs/latest.log)
https://mclo.gs/PItOkWc

commented

Turns out only Connected Glass is dependent of Fusion. Disabling connected glass instantly crashes the game (exit code 1) as soon as I begin to launch Minecraft (even with fusion 1.20+ enabled or disabled). I'll try again another time to see if something else will fix it, but that was my only immediate lead

commented

The error is a NoSuchFieldError error for BakedQuad#tintIndex for which the obfuscated name is field_178213_b. As far as I can tell, this seems correct and should work fine. Launching a regular Forge 1.12.2 game with Fusion, it indeed works fine and there are no errors for that field.
This would mean some mod you have is somehow causing a field to not exist or is causing it to not be accessible to Fusion, leading to the NoSuchFieldError. I would have no idea how a field on a vanilla would not be there, so ¯(o_o)/¯

There is not much I can do as you are using a lot of mods and this doesn't seem to be an issue from Fusion itself. Can you narrow down what mods are needed besides Fusion to cause the crash?

commented

I'll test it soon without connected glass and connected textures enabled but with Fusion 1.20+ enabled as those are the two dependencies of Fusion. Otherwise, it was only Fusion that was having the error as it worked with every other mod enabled so I'm also a bit stumped on what to try as I'm basic with technical Minecraft and my mod pack is held together with hopes and dreams

commented

source of the issue: https://github.com/LoliKingdom/LoliASM/blob/09c0b1e3f3ead5e5db8a40448aee49ca41a26cea/src/main/java/zone/rong/loliasm/patches/BakedQuadPatch.java#L28

the easiest way to work around it would involve removing the access transformer and replacing the singular field set call with reflection

commented

Well that is... something I guess. It is gonna be difficult if I have to account for vanilla fields being removed.
I believe Fusion might also use the BakedQuad#facing field, but can't remember for sure.

If it is just the BakedQuad#tintIndex field it shouldn't be too bad I don't think. Do you know if the field name would still use the obfuscated name or if it is just tintIndex?

Fusion also uses a special value for the tint index which it later checks for to indicate it should use the Fusion tinting functions from the texture. That might not work well if the tint index is limited to a byte as conflicts would be more likely.

commented

https://github.com/LoliKingdom/LoliASM/blob/09c0b1e3f3ead5e5db8a40448aee49ca41a26cea/src/main/java/zone/rong/loliasm/bakedquad/BakedQuadClassFactory.java#L44 the byte is seemingly only written to the patched classes when they're tintable and it's seemingly deobfuscated so you can probably just probe the class for the obfuscated field and assume tampering when it's absent
alternatively the mod could soft-break the related quad featureset, but you'll probably want to talk it out with the perpetrator to reach a compromise