Performance-Fish icon indicating copy to clipboard operation
Performance-Fish copied to clipboard

Game freezes when trying to link certain storages

Open Cheremenin opened this issue 1 year ago • 7 comments

When linking together some things like hoppers (but not the vanilla or VE shelves, or Adaptive Storage Framework buildings) the game will completely freeze

Seems to be connected to Performance Fish

http://0x0.st/XX7c.log

Cheremenin avatar May 05 '24 22:05 Cheremenin

I get the same issue with the vanilla shelves

Seems like you can toggle all patches off when you link containers as a temporary workaround? Not sure which patch it is that's causing the issue.

tiger8255 avatar May 06 '24 02:05 tiger8255

I get the same issue with the vanilla shelves

Seems like you can toggle all patches off when you link containers as a temporary workaround? Not sure which patch it is that's causing the issue.

Judging by some other reports it looks like it's the "TryFindBestBetterStoreCellForWorker" patch doing it

Cheremenin avatar May 06 '24 05:05 Cheremenin

I get the same issue with the vanilla shelves Seems like you can toggle all patches off when you link containers as a temporary workaround? Not sure which patch it is that's causing the issue.

Judging by some other reports it looks like it's the "TryFindBestBetterStoreCellForWorker" patch doing it

I actually tried turning that off by itself and still froze. I don't think that's the one causing it when linking storages.

tiger8255 avatar May 06 '24 14:05 tiger8255

I had to turn off all patches in that section to stop the crashes, but I think the one TryFindBestBetterStoreCellForWorker patch can be disabled by itself for vanilla. Mods that mess with storage seem to require turning off all the other prepatches in that section of optimizations.

TheHitman2772 avatar May 06 '24 21:05 TheHitman2772

You have to disable "TryFindBestBetterStoreCellForWorker" patch, and all others patches that relies on it.

Patches to disable:

  • StorageSettingsPatches
    • AllowedToAccept
  • StoreUtilityPrepatches
    • TryFindBestBetterStoreCellFor
    • TryFindBestBetterStoreCellForWorker
  • Improve hauling accuracy

Restart your game to make the changes apply.

Also, duplicate of #44

20240616: Foxtr0t1337 posted a PR #53 fixing this issue. You can either follow his instructions to try to fix it, or wait for the official release and disable the patches above for now.

sunxyw avatar May 07 '24 07:05 sunxyw

You have to disable "TryFindBestBetterStoreCellForWorker" patch, and all others patches that relies on it.

I did that, and not only it fixed crashes, but also serious lag spikes I had.

quicksilverfox avatar May 10 '24 03:05 quicksilverfox

I can confirm that this happens to my game aswell. Game will freeze if i try to link 7 or more shelves at the same time. 6 works fine. This was all vanilla shelves. Only storage mod i have is Rimfridge. Will try to disable the patch.

kvalek avatar May 13 '24 13:05 kvalek

+1

Izeick avatar May 20 '24 22:05 Izeick

Getting this myself, also tried the listed patches to turn off, still froze.

VaelophisNyx avatar May 21 '24 20:05 VaelophisNyx

@VaelophisNyx I also encountered this bug just now, but for me sunxyw's solution worked fine. Did you restart the game after disabling the patches? I guess it might also help to clear the cache (which you can do at the bottom of the mod's settings). Otherwise, your bug might be different from the one others are encountering.

fwdekker avatar May 21 '24 21:05 fwdekker

@VaelophisNyx I also encountered this bug just now, but for me sunxyw's solution worked fine. Did you restart the game after disabling the patches? I guess it might also help to clear the cache (which you can do at the bottom of the mod's settings). Otherwise, your bug might be different from the one others are encountering.

a reload after the settings changed fixed the issue.

VaelophisNyx avatar May 21 '24 21:05 VaelophisNyx

Can confirm this happens when linking 7+ storages.

SirMalFet avatar Jun 01 '24 14:06 SirMalFet

Found the problem in the source code. It is a infinite loop caused by decreasing an index by a unchecked negative number. Will post a pr in a moment.

And no, in my case it is not because of TryFindBestBetterStoreCellForWorker but TryFindBestBetterStoreCellFor. When I link shelves it freezes.

Foxtr0t1337 avatar Jun 15 '24 19:06 Foxtr0t1337

PR is made, please feel free to try the fix out. If it can't fix the problem please let me know. If it can fix it, that's great, please let me know. ; )

To apply the fix you will need to pull the commit to your local mod folder and compile it. Or replace the 1.5/1.4 folder of the mod with ones in my repo which have the fix compiled.

Foxtr0t1337 avatar Jun 15 '24 20:06 Foxtr0t1337

PR is made, please feel free to try the fix out. If it can't fix the problem please let me know. If it can fix it, that's great, please let me know. ; )

To apply the fix you will need to pull the commit to your local mod folder and compile it. Or replace the 1.5/1.4 folder of the mod with ones in my repo which have the fix compiled.

Hi Foxtr0t1337, I just downloaded the dll you compiled to try it out and it did fix the problem caused when linking storage shelves, thank you very much!

sunxyw avatar Jun 16 '24 08:06 sunxyw

PR is made, please feel free to try the fix out. If it can't fix the problem please let me know. If it can fix it, that's great, please let me know. ; )

To apply the fix you will need to pull the commit to your local mod folder and compile it. Or replace the 1.5/1.4 folder of the mod with ones in my repo which have the fix compiled.

Can also confirm, after replacing my 1.5 folder with the one from your repo, no further crashes.

Jigain avatar Jun 16 '24 09:06 Jigain

The fix is merged in now

bbradson avatar Jun 16 '24 22:06 bbradson