Lightman's Currency

Lightman's Currency

331k Downloads

BUG: Crash with StackOverflow with the loot table

Waterspark63 opened this issue · 7 comments

commented

Minecraft Version (REQUIRED): 1.18.2
Forge Version (REQUIRED): 1.18.2-40.1.52
Lightman's Currency Version (REQUIRED): 1.1.6.2
Other Relevant Mods & Version (LC Tech, etc.): LCTech - 0.0.5.9
Connection Type (Single-player, server/client, LAN world): Server

Describe the bug
Not entirely sure what caused it, but I'm guessing something was trying to generate loot, and something with the currency mod crashed it.

Expected behavior
Not to crash with I assume loot tables.

Screenshots/Logs/Crash Reports
Error Snip: Link
Crash Report: Link
Full Latest.log: Link

commented

I'll look into it. It appears to be trying to re-apply itself when emulating the loot table to calculate the coin loot (which I use a fake loot table to generate so that it's generated through vanilla methods). There should have been a check that keeps it from being applied to the same loot context multiple times to stop this exact thing from happening, but there are a few other things I can do to make extra sure that it doesn't get executed again.

commented

I've made a patch in v1.1.6.3 that should hopefully fix the issue, but considering that I didn't encounter this error during testing, I'm going to assume it's not something I can easily replicate so I'm going to leave this issue open for now until I'm certain it's been fixed.

Please let me know if what I did fixed the issue.

commented

It's still crashing with the same error for me, here's the latest.log, I had to trim it cause it was too big for hastebin. Here's the crashlog
Do you need anything else from me?

commented

Honestly, the debug.log file would be extremely helpful, as I have some debug messages in the loot addition that should help give me some insight as to what loot table it's getting stuck on an infinite loop on, etc.

Also you don't need to use hastebin, you can attach your log files directly to your message on github, which is actually a fair bit easier for me to read through.

commented

Update: I think I found a way to ensure that it won't get stuck in a loop (so much so that I even removed the first "infinite loop" check and it had no issues), so I've uploaded v1.1.6.3a and that should definitely fix the issue.

commented

One, sorry about the late response, just got up and started on this again.

So I got more info from the player that was crashing the server, he was apparently opening some minecart chests by pillagers, and opening the chests are what crashes the server, the latest fix seems to of fixed it. I'll still send the Debug.log so if theres anything else you can notice, then it's seen ^^

Also thank you for the file reminder
debug-1.log

commented

Yup, the debug seems to match what you said, although I'm still not 100% sure why my existing infinite loop fix wasn't working. That said I'm glad that my latest fix worked, so I'm gonna go ahead and close the issue.