SuperMartijn642's Core Lib

SuperMartijn642's Core Lib

85M Downloads

[Crash] Crash when used with Iceberg

AHilyard opened this issue · 5 comments

commented

Version Info

  • Minecraft, Forge 1.20.2
  • Core Lib, 1.1.16

Steps to Reproduce
Install both mods, game crashes on launch with mixin errors.

Crash report (~/logs/latest.log)
latest.log

Hey there Martijn, I've received a crash report for Iceberg in Forge 1.20.2 (here). It appears that my GuiGraphics.renderTooltipInternal mixins are not playing nice, but it's hard to tell what exactly is going on. Mixin seems to think that CoreLib is somehow changing the LVT of that method, but I don't see anything that might be causing that. Any ideas?

commented

Sadly, it seems this issue indeed occurs for any AT and mixin which captures local variables. I have created a Forge issue for it here: MinecraftForge/MinecraftForge#9820

I have also removed the AT entry for GuiGraphics#renderTooltipInternal and changed it to an invoker like you suggested. This at least makes it so the mods no longer crash together.
Thank you for looking into it and reaching out!

commented

That is rather odd. Indeed, I don't think I really do anything related to the GuiGraphics class besides just make regular use of it. I have no clue why my core lib would have any effect on mixins for it.

commented

Okay, I've done some testing and the only solution that I can find that works is changing CoreLib to use an invoker instead of an access transformer on renderTooltipInternal. I honestly don't know why this problem is cropping up now, since neither of our libraries have changed how they are interacting with the GuiGraphics class. 🤷‍♂️

I can make a PR for this change if you prefer.

commented

That... seems very annoying. I feel like this might be something unintended introduced by the changes to Forge during 1.20.2. I do wonder if the same holds for any AT'd methods.

Seems like an easy enough workaround for this case specifically, although not ideal of course. I am currently quite busy with school, so I will probably have a look during the weekend 😅

commented

That's possible, quite annoying unfortunately. Maybe it's only for AT'd methods that also have a mixin capturing locals.
I totally understand, I'm in no rush. Don't let this stress you. 😄