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

[1.20.1] Chunk loading deadlock with FTB Chunks #243

Closed
jeremiahwinsley opened this issue Dec 29, 2023 · 0 comments
Closed

[1.20.1] Chunk loading deadlock with FTB Chunks #243

jeremiahwinsley opened this issue Dec 29, 2023 · 0 comments

Comments

@jeremiahwinsley
Copy link

DO NOT REPORT AN ISSUE IF YOU HAVEN'T TESTED THE ISSUE WITH THE LATEST VERSION IN CURSEFORGE

Functional Storage Version: 1.2.6

Titanium Version: 3.8.24

Crashlog If Applicable (Upload to pastebin/gist):
https://mclo.gs/U1zxPmf

I have what seems to be a deadlock due to a particular setup with FTB Chunks force-loading a chunk containing a controller extender during player login, and that controller extender attempting to load the chunk containing the controller.

I added this hotfix on the server which fixed the deadlock and got the server running again, but I assume probably not sufficient for an actual fix:

diff --git a/src/main/java/com/buuz135/functionalstorage/block/tile/StorageControllerExtensionTile.java b/src/main/java/com/buuz135/functionalstorage/block/tile/StorageControllerExtensionTile.java
index 3b6e82b..fb98fed 100644
--- a/src/main/java/com/buuz135/functionalstorage/block/tile/StorageControllerExtensionTile.java
+++ b/src/main/java/com/buuz135/functionalstorage/block/tile/StorageControllerExtensionTile.java
@@ -80,6 +80,7 @@ public abstract class StorageControllerExtensionTile<T extends StorageController

     private Optional<StorageControllerTile> getControllerInstance() {
         if (getControllerPos() == null) return Optional.empty();
+        if (level == null || !level.isLoaded(getControllerPos())) return Optional.empty();
         return TileUtil.getTileEntity(this.level, getControllerPos(), StorageControllerTile.class);
     }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant