Create

Create

86M Downloads

Crashed because of deployer

AuAg140 opened this issue ยท 8 comments

commented

when I make deployer into a block, the save will crash and break.
Then I can't open the save.

image

commented

This issue has been marked as stale because it has been inactive for 3 weeks. It will be closed if it remains inactive for another 3 weeks.

commented

This issue has been closed since it has been inactive for 3 weeks since it was marked as stale.

commented

Without a crashlog it's not possible to say what's happening, but the deployer code does call some @Deprecated functions resulting in the RightClickBlock event having a null hitVec. The field is not annotated as @Nullable, so it's likely that mods assume it to be non-null. IE has (in a bit: had) that problem (BluSunrize/ImmersiveEngineering#4604), but the build with the crashing code was released after this issue was created, so it's most likely a different cause.

commented

I believe it's this issue, and in reference to the (now closed) Immersive Engineering one, here's a log from my server.
It occurs if IE is updated to 1.16.5-4.2.0-13 and there's a Create deployer somewhere in the world. Server crashes.
crash-2021-01-28_10.42.33-server.txt

Deployer in question places saplings every few ticks.

commented

Here are two new crash logs related to this issue. My setup is very simple, and is as follows:

1 saw facing away from a grown tree (it will move through as an entity when on a mecahnical piston), and a deployer on the opposite side. When a tree grows, if the deployer tries to plant a sapling in that spot, before the tree can be chopped down, the game crashes. It generates two crash logs, one that says ticking entity, and one that says 60 second tick, with all the threads that are affected. This does the same thing whether in a minecart, on a piston, or stand alone.

So, it appears that perhaps a check is failing to see if a block exists in the space before placing, maybe.

crash-2021-01-30_17.58.10-server.txt
crash-2021-01-30_17.59.11-server.txt

commented

I have been doing some testing, and this is what I found with the deployer:

If the space either has what the deployer is placing in it, or the block under it can support said thing that the deployer is placing, the game will not crash:

  • for example: this will not crash the game while the deployer is moving:
    • a sapling attempted the be placed where another sapling exists
    • a redstone where another redstone exists
    • sapling being placed on dirt
    • redstone on any solid block

The following will crash the game:
* when a tree grows where that sapling was, while the deployer is attempting to place another sapling
* as your moving entities can pass through blocks when on carts, if a deployer moves through any block and tries to place at the same time it is in that block space.
* As a sapling can not be placed on cobblestone, the game will crash when attempting to do so ...
* Air, or an empty deployer, can not place air in a block space that is currently occupied by another block, it being solid or not, say a sapling or redstone or sand in the example above, which means that, if the deployer becomes empty, as in, it has no other blocks to place, and it tries to place into ANY occupied space, the game will crash.

To mitigate this, on a tree farm for example, all on the same y level, having saws followed by ploughs with one space between saw and plough, then followed by a deployer ... this means that the deployer will always have an air block to place a block into, even if it has nothing to place. The draw back to this "fix" is that you can not have the cart/stationary contraption constantly circling your farm, otherwise, the trees would never grow, unless it is a massive loop.

With all of this information, I can deduce one thing about the code for this amazing mod ... the deployer is checking to see "what block IS placed," without checking to see "if block CAN be placed," which will through a NULLPOINTER every single time that a block can not or is not placed.

commented

Oh, BTW, in Emmersive Engineering 1.16.5..131, this is totally fixed. It no longer crashes, at least in my testing so far,

commented

Can confirm, after updating to ImmersiveEngineering-1.16.5-4.2.1-131.jar the server no longer crashes.