[bug] toasts crash game instantly on latest version
RedRain0o0 opened this issue ยท 20 comments
im trying to develop an addon for l4j and keep running into a problem with toast rendering. by problem i mean the game crashes and floods with at wily.legacy.client.LegacyTip.getHeight(LegacyTip.java:94)
.
crash-2024-05-16_23.00.08-client.txt
You clearly modified the getHeight method to obtain the result of the height method, which already obtains the result of getHeight, causing a StackOverflowError
i didnt modify that, my mod is currently just the template mod and assets. only thing is that i tried to install CottonMCs GUI lib but then removed it. ive tried on latest as well as 1.6.2a, as well as rebuilt my gradle.
i havent actually added l4j as a dep yet, so the version im using is off modrinth (which is why im so confused)
This is logical, it's what it says, if there is a StackOverflowError, there is a "loop" involved, and at least in my local code (which I haven't modified anything compared to what's in the repository) there is no getHeight method on the line 94 of the LegacyTip class, as described in the log
Maybe it's a mixin that is changing the result of the height method to that of getHeight? Just a hypothesis, were you testing with another mod besides CottonMCs GUI?
im using L4J 1.6.2a right now, but prior i was using 1.6.3c. im also using ModMenu 9.0.0, CustomPlayerModels 0.6.16c, architectury 11.1.17 on fabric version 0.15.11 with fabricapi 0.97.0
Yeah, it doesn't really matter, anyway you're using it, it didn't answer the main question, have you tried running Legacy4J without any other mod other than its dependencies?
booting an instance with just deps and clicking Change Skin
does not crash the game. i am now very confused
Maybe it's a mixin that is changing the result of the height method to that of getHeight? Just a hypothesis, were you testing with another mod besides CottonMCs GUI?
So that's it, it's probably an insecure mixin being applied over the Toast class
i think its part of my mod breaking it, likely left over from LibGUI. i think im gonna try deleting my mod and readding the fabric template
tried an entire refresh and its still broken. i think im gonna come back to this later
ok, so i (without changing anything about the mod) built it and threw it into the latest version of Re-Console and toasts do not crash it. it seems to be a problem with IntelliJ IDEA itself, meaning any time i want to test i need to full build unless i find a fix
(Been trying to debug this issue with @RedRain0o0 in a discord voice chat)
after testing several things, we have determined this is a very annoying and niche issue.
- The game DID NOT crash when they ran L4J and their built mod .jar together in a PrismLauncher instance.
- The game DID NOT crash when they ran L4J under offline mode, again in PrismLauncher.
- The game DID NOT crash when they ran L4J via IDEA as a Java project.
- The game DID crash when attempting to run L4J within the other IDEA project, both via /run/mods/ (1.6.3c) and as a dependency via CurseMaven (1.6.2a, as 1.6.3c would crash due to a controller mapping error)
The crash is on the Render Thread, caused by some form of infinite loop within the LegacyTip class' width() and height() methods.
The issue may be fabric specific (we did not test other launchers, as they are only developing the mod for fabric currently)
Because it is an infinite loop, the stack trace is unhelpful in tracking the issue, and because the issue does not exist when the project itself is ran, breakpoints (seemingly) cannot be used.
If you have any ideas as to what the problem may be, or how we could test further, we would be open to debugging and trying to figure out this issue together. It is rather elusive.
@Wilyicaro (sorry for ping but idk if youve seen this and id rather not be forced to build for every test)
This is related to #544, which is caused by Yarn mappings giving the 2 methods the same name.