Skip to content

Crash with Create Big Cannons: "Body has been removed" when a CBC shell destroys an Aeronautics/Sable sub-level (1.21.1, NeoForge) #1454

Description

@Svinkimoideti

Description
When a Create Big Cannons shell impacts and destroys a Sable sub-level (Create: Aeronautics structure), the game crashes with java.lang.RuntimeException: Body has been removed.
Environment

  • Sable: 2.0.3+mc1.21.1 (latest)
  • Create Big Cannons: 5.11.7+mc.1.21.1 (latest)
  • Minecraft: 1.21.1, NeoForge: 21.1.248
  • Singleplayer, Arch Linux x86_64
    Stack trace (abridged)
    java.lang.RuntimeException: Body has been removed
    at RapierPhysicsPipeline.assertBodyValid(RapierPhysicsPipeline.java:578)
    at RapierPhysicsPipeline.getLinearVelocity(RapierPhysicsPipeline.java:485)
    at RigidBodyHandle.getLinearVelocity(RigidBodyHandle.java:161)
    at ActiveSableCompanion.getVelocity(...)
    at EntitySubLevelUtil.wrapOperation$...$createbigcannons$kickEntity$mul(EntitySubLevelUtil.java:529)
    [mixin APP: createbigcannons.mixins.json:compat.sable.EntitySubLevelUtilMixin]
    at EntitySubLevelUtil.kickEntity(...)
    at ServerLevelPlot.kickAllEntities(ServerLevelPlot.java:279)
    at ServerSubLevel.deleteAllEntities(ServerSubLevel.java:407)
    at ServerSubLevelContainer.removeSubLevel(ServerSubLevelContainer.java:137)
    at SubLevelContainer.processSubLevelRemovals(...)
    It happens while Sable removes a sub-level: CBC's EntitySubLevelUtilMixin calls getVelocity() on a rigid body that was already removed from the physics world.
    Repro
  1. Build an Aeronautics structure (sub-level).
  2. Hit it with a Create Big Cannons shell so the structure is destroyed/removed.
  3. Crash on sub-level removal.
    Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions