Amadron Delivery Drone can cause a server crash
TheDieselPunk opened this issue ยท 2 comments
For feature requests, just erase this template and clearly describe the feature you'd like to see
Minecraft Version
Minecraft 1.16.5
Forge Version
Forge 36.0.43
Mod Version
pneumaticcraft-repressurized-1.16.5-2.10.1-140
Describe your problem, including steps to reproduce it
The Amadron Delivery Drone crashed this server, here is the crashlog:
https://pastebin.com/F943XQRG
In this case, refined storage cables messed up the delivery drone's pathfinding and caused them to get stuck, running out of air in the process. They attempted to use my charging stations with dispenser upgrades to top back off before leaving, but were unable to pathfind to them. I tried saving one by picking it up in a Mob Imprisonment Tool from and placing it on top of the charging station, and then the server crashed. It's hard to tell, but I believe these drones had returned stocked items from a cancelled custom player trade.
So, steps to reproduce (in theory):
- Designate an Amadron trading chest.
- Create a player trade with a large amount of stock (2000+).
- While that's restocking, create a pathfinding issue by placing something like Refined Storage cables somewhere in the column of blocks above the chest, so that the drones get trapped and start losing air.
- Wait until the drones run out of air. (In my case the drones were still flying and only dropped into standby mode after I broke a block that they were getting caught on)
- Capture one of the drones that are out of air in a Mob Imprisonment Tool (or equivalent)
- Place the drone on top of a pressurized charging station with a dispenser upgrade. -This should cause the crash. (in my case I had two in range)
Any other comments?
It may be difficult to reproduce the issue, if you're unable to I can see if there's any variables that I missed.
The actual crash is very easy to fix (one-liner), and will be in the 2.11.0 release.
The other issue - drones getting stuck forever - is more tricky. It's partly caused by other mods (not properly marking their blocks as non-pathfindable), and partly by drones not handling getting stuck as gracefully as they could.
Easy short-term fix will be to stop Amadrones porting to charging stations to get charged up, but instead just port them back to near their destination point. Longer term, some kind of watchdog system where drones can port if they're trying to move but have been in the same place for too long might be better.