Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game freezes when trying to link certain storages #47

Closed
Cheremenin opened this issue May 5, 2024 · 17 comments
Closed

Game freezes when trying to link certain storages #47

Cheremenin opened this issue May 5, 2024 · 17 comments

Comments

@Cheremenin
Copy link

Cheremenin commented May 5, 2024

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

@tiger8255
Copy link

tiger8255 commented May 6, 2024

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.

@Cheremenin
Copy link
Author

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

@tiger8255
Copy link

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.

@TheHitman2772
Copy link

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.

@sunxyw
Copy link

sunxyw commented May 7, 2024

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.

@quicksilverfox
Copy link

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.

@kvalek
Copy link

kvalek commented May 13, 2024

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.

@Izeick
Copy link

Izeick commented May 20, 2024

+1

@VaelophisNyx
Copy link

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

@FWDekker
Copy link

@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.

@VaelophisNyx
Copy link

@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.

@SirMalFet
Copy link

Can confirm this happens when linking 7+ storages.

@Foxtr0t1337
Copy link
Contributor

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
Copy link
Contributor

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.

@sunxyw
Copy link

sunxyw commented Jun 16, 2024

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!

@Jigain
Copy link

Jigain commented Jun 16, 2024

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.

@bbradson
Copy link
Owner

The fix is merged in now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests