Duplicate slot errors logged when sorting warehouse
uecasm opened this issue ยท 3 comments
Prerequisites
- I am running the latest alpha version of MineColonies and Structurize for my Minecraft version.
- I checked the MineColonies/Structurize wiki and made sure my issue is not covered there.
- I made sure that this issue is not a duplicate of any existing issue.
Context
- Minecraft Version: 1.16.5
- MineColonies Version: 1.0.176-ALPHA (dev)
Expected behavior
No errors
Actual behavior
Clicking the Sort button in the warehouse spams the logs with many 10s of the message below.
Steps to reproduce the issue
This was using the Fortress warehouse level 4, which does have densely-packed racks and suffers from the ambiguous bidirectional rack rendering, which seems likely to be related.
Most of the racks on the lower level were full.
Logs
[22:24:37] [Server thread/ERROR] [minecolonies/]: Trying to dump into same slot again!
java.lang.Exception: null
at com.minecolonies.coremod.util.SortingUtils.pushIntoInv(SortingUtils.java:107) ~[main/:?] {re:classloading}
at com.minecolonies.coremod.util.SortingUtils.lambda$sort$0(SortingUtils.java:67) ~[main/:?] {re:classloading}
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:1.8.0_271] {}
at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352) ~[?:1.8.0_271] {}
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) ~[?:1.8.0_271] {}
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_271] {}
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:1.8.0_271] {}
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:1.8.0_271] {}
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_271] {}
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:1.8.0_271] {}
at com.minecolonies.coremod.util.SortingUtils.sort(SortingUtils.java:67) ~[main/:?] {re:classloading}
at com.minecolonies.coremod.network.messages.server.colony.building.warehouse.SortWarehouseMessage.lambda$onExecute$0(SortWarehouseMessage.java:54) ~[main/:?] {re:classloading}
at net.minecraftforge.common.util.LazyOptional.ifPresent(LazyOptional.java:165) ~[forge-1.16.5-36.2.4_mapped_official_1.16.5-recomp.jar:?] {re:classloading}
at com.minecolonies.coremod.network.messages.server.colony.building.warehouse.SortWarehouseMessage.onExecute(SortWarehouseMessage.java:54) ~[main/:?] {re:classloading}
at com.minecolonies.coremod.network.messages.server.colony.building.warehouse.SortWarehouseMessage.onExecute(SortWarehouseMessage.java:16) ~[main/:?] {re:classloading}
Notes
Viewers
- Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
- Add a comment if you have any insights or background information that isn't already part of the conversation.
Just experienced this issue myself. Right after upgrading to Fortress Tier 4, sorting caused server to hang, and after leaving minecraft open for a while I ended up with gigabytes of the above log message.
I discovered racks on the second floor that looked like this:
I was able to solve the issue by placing items manually into the above racks, which caused them to render correctly, and sorting afterwards caused no issues. So can confirm that this appears to be a schematic issue, and related to the weird dual-racks.