Zepalesque / The-Aether-Redux

An addon to the well-known Minecraft mod, the Aether, adding a variety of content additions, including biomes, accessories, and more!
23 stars 10 forks source link

[Bug]: Crashing on Springshroom Sign placement #57

Closed graceparmesan closed 4 months ago

graceparmesan commented 8 months ago

Minecraft Version

1.19

Mod Version

1.3.4

Forge/Neoforge Version

43.3.5

What happened?

I placed a Springshroom sign and my world crashed.

What was the expected result?

The item would be placed and I would be able to type text.

Steps to Reproduce

  1. Place a Springshroom sign
  2. World crashes into a loop, where now opening the world immediately enters a forced save and crash

Log Output (if applicable)

https://gist.github.com/graceparmesan/291357babc8512e179452b12d38ea1d8

Crash Report (if applicable)

No response

Is this a compatibility issue with another mod?

No response

Additional Context/Information

I have already reported this issue on the Better Minecraft modpack, and they directed me here (and yes, I have tested both the latest and several previous versions of the modpack)

Make sure to confirm these as well before submitting the report:

Zepalesque commented 8 months ago

should be fixed in 2.0, partially since I’ll be re-porting it to 1.19 from scratch and I think this is related to the current 1.19 versions of the mod specifically lol

Zepalesque commented 7 months ago

once the 1.19.2 port of v2.0.7 (which should be in the next few days) this’ll be fixed

Zepalesque commented 7 months ago

should be fixed in 2.0.7

Zepalesque commented 7 months ago

hmm, now i’m not so sure it’s fixed, I will look into this further

Zepalesque commented 7 months ago

Okay actually, testing what I thought might be causing it now did not crash, so nvm I guess lol if you still have the issue though feel free to reopen the issue

DragonGirl42 commented 5 months ago

I'm having this issue as well, though it was initially a Crystal sign in my case. I just had to pull from a backup and redo 2 days of work on my bricked save file. I was on an older version of the mod (1.3.4 for 1.19.2), so I updated to the newest version (of the mod, I'm still in 1.19.2) and even updated the Aether mod for good measure. No dice. After some testing, it looks like any world I place an Aether Redux sign in gets nuked.

Here's my crash log from reproducing the issue:

crash-2024-05-10_17.25.29-client.txt

I hope you're able to figure out what the issue is and fix it! I'd hate for anyone else to stumble across this bug and have their save file essentially softlocked. Or worse, weaponize it in someone else's world somehow.

Zepalesque commented 5 months ago

huh, really weird :/

yeah I’ll look into that, considering the fact that I’ve never ran into this I have a hunch it may be a mod compatibility issue

DragonGirl42 commented 5 months ago

If it helps, the way it appears for me in-game has the sign's block outline appearing in the world, the game freezing for a few seconds, then flashing to the "saving world" screen before the game completely crashes. The UI for the sign doesn't show up at all, nor does the actual sign itself - only its block outline.

If you think it's a mod compatibility issue, here is every mod that I'm currently using (sorry, I know it's a bit of a doozy):

Mods The Aether, Aether Redux, Deep Aether, Dragon Survival, Artifacts, Aquamirae, Better Villages, Biome Makeover, Biomes o’ Plenty, Galosphere, It Takes a Pillage, Repurposed Structures, Simply Hot Springs, Sky Structures, YUNG’s Better Dungeons, YUNG’s Better Mineshafts, YUNG’s Better Strongholds, YUNG’s Better Witch Huts, YUNG’s Extras, Aquaculture 2, Alex’s Mobs, Critters and Companions, Frozen Up, Kobolds, Goblin Traders, Guard Villagers, Snow Pig, Bygone Nether, Incendium, Nether Depths Upgrade, EnlightEnd, Blue Skies, The Twilight Forest, The Undergarden, Better Amethyst, Cosmetic Armor Reworked, Create, Create Crafts & Additions, Decorative Blocks, Disenchanting, Enhanced Celestials, Fast Leaf Decay, Friendly Griefing, Malum, Handcrafted, Harvest With Ease, More Dragon Eggs, Quark, Sapience, Sophisticated Backpacks, Supplementaries, Supplementaries Squared, Waystones, BetterThirdPerson, Jade, JourneyMap, Just Enough Items, WorldEdit

API and Misc AeroBlender, AutoRegLib, Architectury API, Balm, Citadel, CorgiLib, Curios API, Expandability, Experience Bug Fix, Flywheel, GeckoLib, Library Ferret, Lodestone, Moonlight Lib, Obscure API, Resourceful API, Sophisticated Core, Structory, Structure Gel API, TerraBlender, YUNG’s API

When I have time, I can try removing all but the Aether mods, then slowly adding back my mods on a test world to see which one bricks the game this way - at least that would help narrow down where the incompatibility might be.

Zepalesque commented 5 months ago

hmm so odd thing the original post seems to possibly be caused by a mod called DoAPI based on the mixins in the stack trace, I had completely forgotten about this as I couldn't find the referenced code in that mod's repository though the thing is, your crash report doesn't mention any mixins in the top of the stacktrace for the crash, despite it still having a mixin handler method, which is really odd

but yeah narrowing down what the mod could be would be helpful

DragonGirl42 commented 5 months ago

I've spent some time testing this bug by adding my mods back, little by little. The results are... inconclusive. Every library and API mod put together works fine, I ruled that out first. But from there, I found that there were several mods that would fail to load into a save with Aether Redux signs, at least with so many of my other mods added. I have no idea what the correlation is, if there is any.

After further testing, I don't think my usual method of ruling out a particular 'problem mod' will work. I tried removing all extra mods, leaving only Aether Redux and its required dependencies, and then added Galosphere to the mix to double-check my work - and the save booted like normal, even though Galosphere had broken it previously! Maybe this has to do with a weird incompatibility 'critical mass' caused by adding too many mods? Maybe it's not one particular mod, but a combination that turns into some kind of poison pill?

I'm open to suggestions. I'd even take a method of removing all signs added by Aether Redux a la Bad Mobs mod, just as a bandaid fix for now. I wish I knew how to better help you track down the exact issue or find the exact combination of mods that reveals the problem, but I'm unfortunately limited in what I can do.

Best of luck figuring this one out. This one's a real head-scratcher for me as well.

Zepalesque commented 5 months ago

yeah, very strange issue :thinking: at some point I’ll probably do some more thorough testing, maybe if I can successfully reproduce the issue and narrow down exactly what mod or mod combination is causing it, I can do some testing inside the development workspace so I can debug it and decipher what the problem is

Zepalesque commented 5 months ago

hah I was able to reproduce the issue by installing all the mods in the list together :joy: which means I'm getting somewhere, now I just have to either examine the crash report and maybe find something the other ones didn't show, or remove mods until it stops crashing

Zepalesque commented 5 months ago

and from the crash report alone, it seems this may be a Supplementaries issue, but I can't know for sure yet

Zepalesque commented 5 months ago

it seems this is going to be more difficult than I had hoped, supplementaries was not the issue

Zepalesque commented 5 months ago

okay so after some more testing, I have found something really odd So I have some mods together with redux, I place a sign/open a world with a placed sign, it crashes. I remove a few mods, it stops crashing. I put them back, it's still not crashing, even though the exact same setup was crashing before.

tbh this issue may take a bit longer to figure out than I was hoping it would, I'll probably do more testing at some point though with IntelliJ's debugger + exported mixins so I can step through the code and figure out what's happening

Cr0ssley commented 4 months ago

Hi, I'm getting the same issue (As well as The Aether's sign + Deep Aether's signs having no texture). I'm using version r1.2.3 of my own public modpack: https://www.curseforge.com/minecraft/modpacks/the-cr0ss-smp.

So much as placing a sign down will cause a crash to desktop, attached is a crash-report taken after a crash due to placing an Aether: Redux glacia wood sign on a newly created world. As I was watching the game output logs while performing this I noticed this mod fails to load certain items such as hanging signs (from the Supplementaries mod).

crash-2024-05-24_21.52.06-client.txt

Zepalesque commented 4 months ago

hmm, it’s mentioning doapi again like the initial issue very strange, as I can’t find the erroring code in doapi’s source code :thinking: I will have to look into this some more and test to see if it is in fact caused by doapi or not

VoidLeech commented 4 months ago

(Inessential function args left out) The erroring code in that latest crash log is actually the vanilla render(SignBlockEntity pBlockEntity, ...) method of SignRenderer (as clued in by the $$12 variable), which DoAPI redirects. The erroring call is $$13 = $$12.buffer(...) in said method. $$12 is assigned from Sheets.getSignMaterial($$8), $$8 is assigned from getWoodType($$6.getBlock()), and $$6 is ultimately assigned from pBlockEntity.getBlockState(). $$12 being null probably means the wood type is not in the SIGN_MATERIALS map fsr.

With the other logs, I think something is going wrong with the (use of the) Sheets.createSignMaterial(...) method (but no clue who to blame there). That'd be where you get the entity/sign/ part of entity/sign/aether_redux:{crystal/springshroom} from, which should obviously be in the path part, not the namespace part. Haven't been able to trace how that's getting there.

This should be the mixin class of relevance for that latest log. https://github.com/Team-Let-s-Do/DoAPI/blob/3fca254e51c9a1af6e04169dfcc422df3681c4dd/forge/src/main/java/de/cristelknight/doapi/forge/mixin/sign/MixinSignBlockEntityRenderer.java

I know little of mixins but hope this helps (:

Zepalesque commented 4 months ago

oh, very interesting good to know, thanks!

Zepalesque commented 4 months ago

Okay, I think I figured out the issue as well as hopefully implemented a fix

I believe it was related to a forge patch into the createSignMaterial method In the base game, it would create the minecraft:entity/sign/aether_redux:[woodtype] material, forge fixes this however by converting the string to a resource location and taking its path and namespace into account however, some mods may mistakenly mixin into this method thinking the default behavior should be vanilla's. This could be a Sinytra Connector issue, or a simple issue when porting a mod from fabric to forge. To fix this, I made redux automatically detect incorrect materials for its woodtypes in the sign material sheet and correct them.

Zepalesque commented 4 months ago

very happy to say that this has finally (hopefully) been fixed as of 2.0.16!

DragonGirl42 commented 4 months ago

Hello again! I'm so sorry to be the bearer of bad news, but this has not been fixed! Tested by running the newest update of Aether Redux with my large selection of mods, both on a world I previously nuked with the mod, and a brand new world I created just now for testing purposes.

Old Testing World Crashlog: crash-2024-06-09_08.03.17-client.txt

New Testing World Crashlog: crash-2024-06-09_08.10.37-client.txt

Again, I'm very sorry to be back in this thread, it looked like the potential fix for this issue was very hard to track down. I wish you luck in sorting out this stubborn bug!

Zepalesque commented 4 months ago

aahhh uh oh :joy: @DragonGirl42 do you have the log output file? I added some debug stuff there that should give me a better idea about why the fix didn’t work right

Zepalesque commented 4 months ago

okay NOW it's fixed, and this time I actually can confirm too, as I was able to reproduce the exact issue I know for sure because after implementing the fix and switching to that newer build of redux, the issue disappeared

DragonGirl42 commented 4 months ago

Eep, sorry! I was at work and couldn't respond until now - though it looks like you didn't need my help after all. After a quick test, I can also confirm, THIS BUG IS FINALLY FIXED ON MY END! Thank you so, so much! I can tell this was a tough one to track down, but you did it! You're the best!