SuperMartijn642 / SuperMartijn642sCoreLib

14 stars 2 forks source link

[Crash] Crash when used with Iceberg #57

Closed AHilyard closed 7 months ago

AHilyard commented 7 months ago

Version Info

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?

SuperMartijn642 commented 7 months ago

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.

AHilyard commented 7 months ago

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.

SuperMartijn642 commented 7 months ago

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 😅

AHilyard commented 7 months ago

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. 😄

SuperMartijn642 commented 7 months ago

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: https://github.com/MinecraftForge/MinecraftForge/issues/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!