Sophisticated Backpacks

Sophisticated Backpacks

97M Downloads

Sorting backpacks with a lot of stuff in them can dupe and remove items

evsey9 opened this issue ยท 14 comments

commented

Describe the bug
When sorting a backpack with many items in it, something may cause the sort to work only partially and also remove/dupe items at the same time.

To Reproduce
Steps to reproduce the behavior:

  1. Spend a lot of time getting stuff in your backpack through the pickup upgrade
  2. Press the sort button in the backpack, several times
  3. Watch as half your backpack is duped and half the backpack is overwritten with whatever was duped?
  4. Cry a lot

Expected behavior
Sorting should NOT have a chance to just wipe half the backpack's contents.

Screenshots

2022-10-26_20-55-38.mp4

Relevant logs: https://pastebin.com/MrA5Z6Hz
I thankfully disabled autosave and made a server backup right before doing this as you can see right at the beginning of the logs, because I had a hunch this bug would happen again. I was right.
I have a world backup of before and after this bug happened, I can upload both if you need to check the world.

Versions
Mod version that you're using. Version of forge may also be helpful in some cases
SophisticatedCore 1.18.2 0.5.13.132
SophisticatedBackpacks 1.18.2 3.18.29.718
Forge 40.1.80
Modpack is AllTheMods7 0.4.34

This may be an issue with SophisticatedCore and not SophisticatedBackpacks, but I wouldn't know as I haven't used the chests too much to know if this issue affects them too.

commented

Could you retry with the latest version of core https://www.curseforge.com/minecraft/mc-mods/sophisticated-core/files/4048380

Seeing that there are lolipops in there and that the fix for them is only in the latest build of core I suspec that they have a lot to do with this issue as well.

commented

Could you retry with the latest version of core https://www.curseforge.com/minecraft/mc-mods/sophisticated-core/files/4048380

Seeing that there are lolipops in there and that the fix for them is only in the latest build of core I suspec that they have a lot to do with this issue as well.

That would explain why most of the time when I tried to get lollipops out of my backpack they would just disappear.
I'll retry and tell you the results.

commented

Seems fixed. If the bug pops up again, I will reopen the issue.

commented

I feel like the bug happened again as I sorted my backpack and it felt like only a part of it got sorted, but that could be because a part of it was simply sorted already, and I can't exactly tell if I lost anything or not. I am kind of paranoid, but since I didn't have recording on, I didn't record anything. However, in the server console this error did appear again:
https://pastebin.com/GwDaVVwt

commented

Yes, I just confirmed it and got it on recording - the bug still happens.

sorting.bug.mp4

Notice how it sorts everything up to the lollipop, leaving the rest of the backpack unsorted and duplicating/voiding some items because of that, and sorts properly only afterwards. You can see how the pestle/mortar from Potions Master got removed, however I duped an Ender Eye and some Iron ingots/Lapis/Gold.

Relevant logs: https://pastebin.com/S5haaJie

commented

So I am unable to recreate this even with ATM7 modpack whatever I do and however I gain lollipops they just work properly when sorted. Also that stack trace even though helpful in pointing to the part of the code where it breaks doesn't seem to make any sense per other parts of the code that make sure that this situation doesn't happen in code. So I will need more info on how exactly I can recreate this as I am unable to do so and you seem to be the only one who happens to have that issue.

commented

Seems fixed. If the bug pops up again, I will reopen the issue.

I am having this problem as well
it is not the sort button it is the unsort button.
When I have a stacking upgrade in a backpack and accidentally hit shift and the center button (sort) it unstacks the stacks, and half to 3/4 of my items disappear from the world permenantly. This happened to me, my husband and to both of us since all our storage is in backpacks placed in our home
We would love to completely disable this feature until fixed if that is possible I came here looking for a way to remove the unstack feature
when one tries to remove a stacking upgrade with stacked items, it simply won't let you, so this should simply not let you do it if there isn't room in the back pack but it does and it's bad enough that we will either have to not use stack upgrades or not use backpacks at all.

commented

Seems fixed. If the bug pops up again, I will reopen the issue.

I am having this problem as well it is not the sort button it is the unsort button. When I have a stacking upgrade in a backpack and accidentally hit shift and the center button (sort) it unstacks the stacks, and half to 3/4 of my items disappear from the world permenantly. This happened to me, my husband and to both of us since all our storage is in backpacks placed in our home We would love to completely disable this feature until fixed if that is possible I came here looking for a way to remove the unstack feature when one tries to remove a stacking upgrade with stacked items, it simply won't let you, so this should simply not let you do it if there isn't room in the back pack but it does and it's bad enough that we will either have to not use stack upgrades or not use backpacks at all.

This is unrelated as you are using Inventory Sorter mod which is not ready for oversized stacks and because of that deletes part of the inventory. There's a bug for this as well as for the compatibility logic not working on their tracker. Until that is solved you need to not use it with sophisticated inventories or get a different sorter which allows to block certain screens and block sophisticated there as it already has sort function and there's no reason for any other mod to sort these.
Or what also worked for me is setting sort keybind for sophisticated to the same key as the one from inventory sorter which makes the sophisticated one trigger first and sort backpacks properly.

commented

I am new to modded Minecraft and had the same thing happen where all of my items were deleted form the world forever whilst using an inventory sorter, is there anyway to get those items back? If I need to ask somewhere else where should I do that?

commented

no there is no way to get the items back as the sorting mod simply didn't place them anywhere.

commented

The unsorting with stack upgrade seems to be the issue to me as well.
Just deleted roughly 3/4 of my backpack because of fat-fingering shift-sort.
Items simply overflowed, backpack was filled with many stacks of 256 (stack upgrade tier 2), unsorting made them split to 64.
To recreate just fill your backpack with many different items stacks of 256, press unsort, then sort.
I would also like this "feature" disabled by default or disabled whenever the stacking upgrade is present within the backpack.

commented

@bgru you will need to work with the dev of the Inventory Sorter mod to have this disabled. Nothing I can do without adding hacky stuff

commented

I stopped using the inventory sorter mod altogether because of this and replaced every storage with backpack.
It seems that it works properly when inventory sorter and backpack sorting are bound to the same button, with the exception that the accident shift click can wipe your inventory.

commented

closing this as the original issue I was unable to recreate the original issue and haven't got any follow up steps on how to and the follow up inventory sorter issue is unrelated and something that needs to be solved by making sure Inventory sorter doesn't try to sort backpack inventory