RS Bridge exportItem results into long loop of air extract and server timeout
iCornflakes opened this issue · 10 comments
Describe
So exporting items works just fine but sometimes it triggers an endless loop of trying to extract air even tho there is an item given. In this case it was a book requested to be exported but this is not related to a specific item as I have seen this happening on many different items and types already.
At the point of loop happening the server enters a "Waiting for Server" state and then timeouts the players with an overload of 15.000+ ms. We can just reconnect after that so server doesnt crash entirely.
My program only does the request first, Ive already checked the case of my code being executed too often but it only requests once for sure.
Steps to reproduce
- Request a list of items
- Randomly the loop will happen
Multiplayer?
Yes
Version
1.19.2-0.7.29r (Latest 1.19.2)
Minecraft, Forge and maybe other related mods versions
Forge 43.2.14 Minecraft 1.19.2 Modpack ATM8
Screenshots or Videos
No response
Crashlog/log
Hey, could you try this build? https://mvn.intelligence-modding.de/Intelligence/de/srendi/advancedperipherals/advancedperipherals-snapshots/1.19.2-0.7.31r-SNAPSHOT-102/advancedperipherals-snapshots-1.19.2-0.7.31r-SNAPSHOT-102.jar
I've recompiled your commit with Forge 43.2.14 because there were too many errors on other mods when I updated to *.21.
Same loop still happening:
[12Aug2023 05:32:13.658] [Server thread/DEBUG] [Advanced Peripherals/]: [DEBUG] Parsed item filter: ItemFilter{item=minecraft:shroomlight, tag=null, nbt=null, count=64, fingerprint='', fromSlot=-1, toSlot=-1}
[12Aug2023 05:32:14.237] [Server thread/DEBUG] [Advanced Peripherals/]: [DEBUG] Parsed item filter: ItemFilter{item=minecraft:shroomlight, tag=null, nbt=null, count=1, fingerprint='', fromSlot=-1, toSlot=-1}
[12Aug2023 05:32:14.267] [Server thread/DEBUG] [Advanced Peripherals/]: [DEBUG] Crafting Result of 'minecraft:air':NO_PATTERN
[12Aug2023 05:32:14.475] [Server thread/DEBUG] [Advanced Peripherals/]: [DEBUG] Parsed item filter: ItemFilter{item=minecraft:armor_stand, tag=null, nbt=null, count=64, fingerprint='', fromSlot=-1, toSlot=-1}
[12Aug2023 05:32:14.874] [Server thread/DEBUG] [Advanced Peripherals/]: [DEBUG] Parsed item filter: ItemFilter{item=minecraft:armor_stand, tag=null, nbt=null, count=1, fingerprint='', fromSlot=-1, toSlot=-1}
[12Aug2023 05:32:14.901] [Server thread/DEBUG] [Advanced Peripherals/]: [DEBUG] Trying to extract item: 1 armor_stand from filter: ItemFilter{item=minecraft:armor_stand, tag=null, nbt=null, count=1, fingerprint='', fromSlot=-1, toSlot=-1}
[12Aug2023 05:32:14.901] [Server thread/DEBUG] [Advanced Peripherals/]: [DEBUG] Extracted item: 0 air from filter: ItemFilter{item=minecraft:armor_stand, tag=null, nbt=null, count=1, fingerprint='', fromSlot=-1, toSlot=-1}
[12Aug2023 05:32:14.933] [Server thread/DEBUG] [Advanced Peripherals/]: [DEBUG] Trying to extract item: 1 armor_stand from filter: ItemFilter{item=minecraft:armor_stand, tag=null, nbt=null, count=1, fingerprint='', fromSlot=-1, toSlot=-1}
[12Aug2023 05:32:14.933] [Server thread/DEBUG] [Advanced Peripherals/]: [DEBUG] Extracted item: 0 air from filter: ItemFilter{item=minecraft:armor_stand, tag=null, nbt=null, count=1, fingerprint='', fromSlot=-1, toSlot=-1}
[12Aug2023 05:32:14.961] [Server thread/DEBUG] [Advanced Peripherals/]: [DEBUG] Trying to extract item: 1 armor_stand from filter: ItemFilter{item=minecraft:armor_stand, tag=null, nbt=null, count=1, fingerprint='', fromSlot=-1, toSlot=-1}
[12Aug2023 05:32:14.961] [Server thread/DEBUG] [Advanced Peripherals/]: [DEBUG] Extracted item: 0 air from filter: ItemFilter{item=minecraft:armor_stand, tag=null, nbt=null, count=1, fingerprint='', fromSlot=-1, toSlot=-1}
[12Aug2023 05:32:14.988] [Server thread/DEBUG] [Advanced Peripherals/]: [DEBUG] Trying to extract item: 1 armor_stand from filter: ItemFilter{item=minecraft:armor_stand, tag=null, nbt=null, count=1, fingerprint='', fromSlot=-1, toSlot=-1}```
Could you show me the script/function you're using?
EDIT: Logfile with requests from minecolony: https://pastebin.com/61bKgQ9i Note how it cut off at the end where it probably crashed not exactly sure.
Script looks fine, gonna test this in a dev environment and send you a test build. Please keep an eye on this thread, I will need some testers for this since I do not have a minecolonies colony
Script looks fine, gonna test this in a dev environment and send you a test build. Please keep an eye on this thread, I will need some testers for this since I do not have a minecolonies colony
Alright thanks for the quick takeon. I'll be around anytime just hit me up, can do some debugging too if you wanna include some more debug log for it.
I get a similar issue with the same code although my issue isn't because it requests the same item in a loop, it doesn't actually make it past "workRequests = colony.getRequests()" and just lags out the server and the code is stuck there.
I isolated this by adding debug statements throughout the code to find which line it hangs on when it starts saying "Waiting for server"
I haven't tried waiting that long because restarting the world is faster for me