Functional Storage

Functional Storage

31M Downloads

[1.21] Crash on removing upgrade

Closed this issue ยท 5 comments

commented

DO NOT REPORT AN ISSUE IF YOU HAVEN'T TESTED THE ISSUE WITH THE LATEST VERSION IN CURSEFORGE
Functional Storage Version:
Titanium Version:
Crashlog If Applicable (Upload to pastebin/gist):


Bug:
Removing upgrade from functional storage cause server crash and seems like a server corruption on the 2nd attempt.

Using version (from crash report):
functionalstorage-1.21.1-1.4.3.jar |Functional Storage |functionalstorage |1.21.1-1.4.3

crash-2025-04-27_15.39.59-server.txt

Context:
Setup an automation for Refined Storage to output in Drawers, then @xycraft fabricated resourses.
My guess: Refined Storage has a tick of computation that happens and is being stuck in sending or delivering the item in other block's inventory.

But this happened as I removed the diamond upgrade as the refined storage was pumping items.... Sorry.
Maybe there could be a debug config value for default drawer size for "fixing" such issues server wide..
I think voiding the stuck items in such situations would be just perfect.

After updating Functional Drawers, Extra Disk, Extra Storage (every Refined Storage related was up to date) server instance running on MCSS still failed. Slightly different crash report:

crash-2025-04-27_15.52.10-server.txt

Thank You
-martin

commented
commented

And how did you remove the upgrade? I cannot seem to remove diamond upgrades if the drawer fills up too much.

commented

This seems no longer possible with #409
Either way, it seems like this was a problem in Functional Storage after all, where the item handler was giving back remainders higher than the original inserted amount, if you remove an upgrade?

commented

So Buuz look at this on v1.4.1 (where I was able to remove the upgrade)

Image

I insert 64, and get back a remainder of 320.

So RS does 64-320 = -256 to get the "inserted" amount, and that fails higher up the chain when trying to insert that remainder back into the storage because it's a negative number.

commented

You shouldn't be able to remove upgrades anymore, it should be fixed