BrassAmber BattleTowers

BrassAmber BattleTowers

3M Downloads

Crash On Tower Collapse + Broken save - 1.18.1 mod code problem (Fixed in next version)

totrider opened this issue ยท 10 comments

commented

Once the tower completely collapses, the game crashes. Trying to load the save will kick you back out to the main menu.

To Reproduce

  1. Using custom modpack "Create-tastic 2 Arcane" https://www.curseforge.com/minecraft/modpacks/dragon-claw-community-create-tastic-2-arcane
  2. MC version 1.8.1, Forge 39.0.88
  3. BrassAmberBattleTowers-1.18.1-2.0.2.jar
  4. Singeplayer
  5. Windows 10

Expected behavior
No crashing of course

Additional context
Loaded into a fresh singleplayer world, flew around in creative until I found a battle tower. Spawned in extra hearts and items. Cleared each floor outside creative. Had to spawn in 3 keys after clearing all floors, as none were generating (original issue which will be posted separately). Fought the golem on top floor, though it broke through to the one below. After defeating, I went to golem chest - which was empty - before running down the stairs. Shortly after exiting at the bottom, the collapse had cought up to the bottom. Looked at the tower for a sec, then it crashed. I tried to reload the save, got to see the tower for a few seconds, then it crashed again.

Crash log: https://gist.github.com/totrider/9feb37cc7f06bc2c1b0a8b433e362b3c

commented

"Parsing error loading recipe create:compat/silentsgems/crushing/onyx_ore" is the first error I see, and the log cuts off suddenly, could you open the world again and post a new crash log?

Looking at the current log, I see no evidence that this crash is due to BT unfortunately ;/
It seems that the crash is because of some mod trying to add a negative value to a list that only takes positive values.

I'll try and recreat thre crash myself in the meantime/

commented

The chest loot issue is most likely the Lootr conflict.
if it is on the modlist the author of the modpack has to include the battle tower chests in the config for the lootr mod. for them to spawn with loot.

commented

As a side note, we are not updating the 1.18.1 version anymore. If this does end up being a BT bug the fix will be in the next 1.18.2 version.

commented

Tested in singleplayer without any other mods - no crash. This is not BattleTowers bug. This is eiher a seperate mod crashing the game bcause of a conflict with BT or another mod crashing the game on its own.

commented

Sorry man still can't believe you ran into such a weird bug like right away lol. It should be a very low chance, but would definitely suck if it bricks up someone's save file when they are pretty far in :/.
If it happens again (or someone lets you know about it happening) let me Know, im gonna leave this open but rename in case someone else has the same probelem.

commented

Been busy the last week+, so havn't seen this until today.

Did you notice the log file is truncated?

"This file has been truncated, but you can view the full file."

I assume it would be around line 16838:
[21:57:22] [Server thread/ERROR]: Encountered an unexpected exception
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:872) ~[client-1.18.1-20211210.034407-srg.jar%23237!/:?]
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:808) ~[client-1.18.1-20211210.034407-srg.jar%23237!/:?]
at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:86) ~[client-1.18.1-20211210.034407-srg.jar%23237!/:?]
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:668) ~[client-1.18.1-20211210.034407-srg.jar%23237!/:?]
at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258) ~[client-1.18.1-20211210.034407-srg.jar%23237!/:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.StackOverflowError

I also suspect it is due to some mod conflict. Trying to figure out what it is though, that is an entirely different beast, but let me know if there is something I can do to track down the issue. Thanks for the Lootr insight btw, I am the author of the modpack, so that would be up to me then. I did read about Lootr related issues, but not how to resolve them, so I assumed it was down to a mod update, not configuration. I suspect many use Lootr, so if there was some kind of quick mention on how to fix this issue on the mod page, that would probably help a good amount of people.

commented

All good! I did not notice/seee a link to the full file when I looked at it originally my bad. I'll look at the full file tonight.
Having the full file is really all I needed :)

Yeah with LootR I believe it just needs to be configured, but I haven't personally had time to test it myself.
If you can get it figured out, (or if I have time to at some point) I can include a note on the Cf (or here maybe) for how to configure it. It does seem to be pretty popular.

Anyways I'll let you know what I find :)

commented

So good news, it is a BT error, bad news, I know technically why this could have happened but not really how it occurred here.

Question: @totrider
Did the tower have a lot of flowing water?
Or was the water flowing out of the tower connected to a river or ocean?

How the tower handles water during the crumbling uses a recursive method. Realistically it should not have hit the java stack limit, (1000 recursions). I have added a recursion limiter to the 1.18.2 version so this won't happen in the future.
realistically the likelihood of this happening is pretty slim.

commented

Hmm, it was situated in the middle of a plains biome if I remember right. some floors had the farming sections around, but don't remember a lot of flowing water. I was too lazy to go and change the configs to spawn towers more frequently, so I flew around in creative for a good while before stumbling into this particular tower. I can try and find another tower in a new save, and see if it happens again.

commented

I just did a new tower, in a new save, the exact same method, no issue. Sadly, I don't have the save that was broken anymore, so can't help there. Hopefully it wont brick peoples saves in the future, but we are still running 1.18.1, so I guess the possibility will still be there, until the other mods are updated to 1.18.2.