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

Server crashes when dropping items ouf of Barrel #25

Open
marco-david opened this issue Aug 11, 2019 · 6 comments
Open

Server crashes when dropping items ouf of Barrel #25

marco-david opened this issue Aug 11, 2019 · 6 comments
Labels

Comments

@marco-david
Copy link

In the Sky Factory 4 modpack, I have experienced a couple server crashes while emptying barrels. As long as the items go into the player's inventory all is fine, but as soon as the items drop into the world as Item Entities (e.g. because the player's inventory is full), they can crash the server.

The server crashes with a ConcurrentModificationException without referencing any mod's source code. Hence I am unsure if this is a forge issue or a Barrels, Drums, Storage and More issue. The following exception is thrown, taken from the full crash report (https://gist.github.com/marco-david/f3a721aa06dfcddf2d00365fac635c06).

java.util.ConcurrentModificationException
	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1445)
	at java.util.HashMap$KeyIterator.next(HashMap.java:1469)
	at net.minecraft.entity.EntityTracker.func_72788_a(EntityTracker.java:290)
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:779)
	at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397)
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
	at java.lang.Thread.run(Thread.java:748)

Some testing so far has shown the following:

  • The speed of item extraction does not matter.
  • The server crashes as soon as three stacks of items (in my case cobblestone) fall onto roughly the same location (i.e. group up).
  • Since items are dropped following the player's orientation; if moving between extracting stacks such that they do not group up, the issue does not happen.
@marco-david
Copy link
Author

marco-david commented Aug 11, 2019

Further notes:

  • This issue also occurs when items are dropped individually out of a barrel. Here, however, around 10 items need to be dropped.
  • This issue does not occur when manually dropping items out of the player's inventory.
  • This issue also does not occur when dropping items with a full inventory through the Storage Remote from the Simple Storage Network mod.

This provides some more evidence that Barrels, Drums, Storage and More might be responsible.

@Funwayguy
Copy link
Owner

I wonder if I... oh... I see what I did. Yea this one is on me.

I forgot about thread safety when I changed the interaction controls to be handled by the networking. Sorta surprised this wasn't noticed way sooner before SF4's release honestly

@4rz0
Copy link

4rz0 commented Dec 19, 2019

Experiencing this as well on SF4, though our server doesn't crash, just the user that did it gets booted.

@Janterra
Copy link

Janterra commented Jun 3, 2020

@Funwayguy What's the status on this issue?

@chezpaul
Copy link

Same here for me on SkyFactory 4. Running your mod 0.0.24, server crash when I take too many out too fast I think.

@Lothrazar Lothrazar added the 1.12 label Nov 16, 2020
@anzaichiyomi2022
Copy link

I builded the fix code from theashenwolf
download link
https://github.com/anzaichiyomi2022/BarrelsDrumsStorageAndMore/releases/tag/fix

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

No branches or pull requests

7 participants