Place fence below floating fence then destroy a connected block to place another fence.
Game crashes when the block connected to the stacked fence is destroyed.

v2.1.0 - Alpha 11
Windows 10 64-bit
RAM 12 GB
I just tried this on version 78, and it seems fences break all physics in the game when you destroy a block adjacent to a fence which has an item near it.
Repro: Dig a hole in between other blocks, don't pick up the dropped block, place fence in dug out area, dig any adjacent area on the sides.
Result: No block will have a rigidbody _except_ for the block you just placed.
Observations: It does not seem to happen when the block is surrounded by only 3 other blocks on the sides. Same for destroying blocks above or below while surrounded by less than 4 blocks on the sides.
Fun fact: after destroying that block while in ghost mode, you're able to _see_ the air block (with the in-game thing that tells you block names)
@pollend could this be caused by some interactions in the Block Family code?
I suppose testing to see if any blocks using a similar family definition also break it.
potentially but I can't really think of a situation where this would happen. you can try using git-bisect.
Reproduced with a fresh build today; issue is still active.
Here is the log results upon breaking the block: https://pastebin.com/fjJsdX40
The second of the two errors is repeated every tick until the game is paused.
Once the game is exited and reloaded, physics seem to function normally once again.
I've discovered why this happens.
The fence cross shape (when it connects to 4 blocks) has 3 colliders.
The fence T shape (when it connects to 3 blocks) has 2 colliders.
The block entity that is interacting with the fence when it changes shape winds up looking for that third collider, which is now outside the bounds of the array.
I tested this by adding an extra collider to the T shape, and the error no longer occurred. But, of course, that isn't a proper solution.
My guess is that there is a notification event of some sort sent to the physics system when a block is broken or placed, which is not being sent when the block family chooses a new shape.
Re-opening this until we can release the associated TeraBullet PR and make the engine use it - TeraBullet is fixed, but engine still needs a push to get over the finish line :-)
(Darnit GitHub, why can't you read our minds instead of our typed text?)
Now properly fixed in the engine after releasing TeraBullet formally and bumping the dependency version in the engine! Thanks for the help everybody :-)
Most helpful comment
I've discovered why this happens.
The fence cross shape (when it connects to 4 blocks) has 3 colliders.
The fence T shape (when it connects to 3 blocks) has 2 colliders.
The block entity that is interacting with the fence when it changes shape winds up looking for that third collider, which is now outside the bounds of the array.
I tested this by adding an extra collider to the T shape, and the error no longer occurred. But, of course, that isn't a proper solution.
My guess is that there is a notification event of some sort sent to the physics system when a block is broken or placed, which is not being sent when the block family chooses a new shape.