PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Server Crash on Load

Tekstack opened this issue ยท 9 comments

commented

Minecraft Version
1.12.2
Direwolf20 pack -- version 20112-1.4.0-1.12.2

Forge Version
14.23.1.2566

Mod Version
1.12.2-0.2.0-85

Describe your problem, including steps to reproduce it

Server Ticking Entity crash on load when loading into a world with a drone in the middle of a program. I reproduced this with the simplest "dig" program I could make. See the pastbin below. Also, can reporduce this crash in every world ie. overworld, minningworld, nether etc.

Any other comments?

https://pastebin.com/mfSeetBV
Was able to stop the crash, load the world, and take down the drones with the config option to stop all drone program execution.

commented

This looks like a problem with FTB Utilities, not with PneumaticCraft. The crash happens in FTBU, in response to a PlayerInteractEvent.LeftClickBlock event that we post. I've verified that the event is properly constructed and contains sensible data:

evt = {PlayerInteractEvent$LeftClickBlock@20339} ""
 useBlock = {Event$Result@20343} "DEFAULT"
 useItem = {Event$Result@20343} "DEFAULT"
 hitVec = {Vec3d@20333} "(171.5, 72.62000000476837, 255.0)"
 hand = {EnumHand@20344} "MAIN_HAND"
 pos = {BlockPos@20331} "BlockPos{x=259, y=68, z=302}"
 face = {EnumFacing@20332} "down"
 cancellationResult = {EnumActionResult@20345} "PASS"
 entityPlayer = {EntityDrone$DroneFakePlayer@20330} "DroneFakePlayer['desht'/5202, l='New World', x=171.50, y=71.00, z=253.50]"
 entityLiving = {EntityDrone$DroneFakePlayer@20330} "DroneFakePlayer['desht'/5202, l='New World', x=171.50, y=71.00, z=253.50]"
 entity = {EntityDrone$DroneFakePlayer@20330} "DroneFakePlayer['desht'/5202, l='New World', x=171.50, y=71.00, z=253.50]"
 isCanceled = false
 result = {Event$Result@20343} "DEFAULT"
 phase = null

DroneFakePlayer is a subclass of Forge's FakePlayer class, which in turn is a subclass of EntityPlayerMP. It looks like FTBU is somehow getting a null GameProfile from the event's fake player, but I've verified via debugger that the player in the posted PlayerInteractEvent.LeftClickBlock event has a valid and non-null GameProfile field.

commented

I just tested with a default installation of FTBLib-4.2.5 & FTBUtilies-4.2.4 and I did not get a crash. It worked fine - I started a drone digging, stopped the server, restarted, and the drone continued its dig program with no issues.

Going to need to know what versions of the FTBL/FTBU you're using, what config changes you've made to FTBU, etc. Are you running your server online or offline? What other mods are you using?

commented

FTBL version - 4.2.5
FTBU version - 4.2.4

I can confirm that these mods are causing the issue. After removing them from the server, I cannot reproduce the issue. With that being said, there are many other mods in the pack (Direwolf20 1.12.2 - 1.4.0.1) with the only manually added mod being pneumaticcraft. The server is being run online from a hosted site. Also, the config options haven't been modified from the default mod pack.

commented

Okay, Desht and I have done some testing, and Desht has managed to reproduce the crash, with a similar crashlog. I looks like in specific scenarios the Drone does not save the player's UUID (used to pass to the fake player). I did fix a suspicious condition for the UUID to save (it relying on an initialized fake player), but I doubt that was the root cause of the problem due to the fact the fake player is initialized right after spawning...

I did put in some defenses though, if the fake player now does not have an id of the player, it will get substituted with the Drone's own ID. This does work, but could have some problems, especially with server management mods like FTBU, preventing the drone editing the world because it is not allowed given its own id. If this last-resort substitution takes place you'll know about it as it is logged in the log file.

You can find a build at http://jenkins.k-4u.nl/view/Desht/job/PneumaticCraft-Repressurized/99/

commented

Thanks guys, I'll test the build and report back.

commented

Thanks. It feels feel like another mod might be interfering here but this could be rather difficult to track down. I'll leave this issue open for now and see if I can reproduce it in a DW20 instance.

commented

After a couple days of testing with the above-mentioned build, I haven't been able to reproduce the bug.

commented

Good to hear! No 'drone is not allowed to edit the world' problems either, like I saw as something that could be expected?

commented

I think this can be closed now.