Skip to content

Rapier native panic (index out of bounds) when a player holding a TACZ weapon enters ragdoll #1467

Description

@Steam2208

Context

Server crashes with a native Rapier panic (index out of bounds) whenever a player is put into a ragdoll state (via sable_player_ragdoll manual trigger or ragdoll_reactions auto-trigger) while holding a weapon from TACZ (Timeless & Classics: Zero). Reproduced multiple times in the same session, only when a TACZ weapon is in hand — has not been reproduced with vanilla items in hand.

Steps to reproduce

  1. Install TACZ (tacz-neoforge-1.21.1-1.1.8-hotfix-r6) alongside Sable + sable_player_ragdoll.
  2. Equip any TACZ weapon in the main hand.
  3. Trigger a ragdoll on the player (manual keybind, fall damage, explosion, hit, etc. — any trigger works).
  4. Server crashes with a native panic during the physics tick.

Crash log

java.lang.RuntimeException: Rapier native panic: index out of bounds: the len is 8 but the index is 8
	at dev.ryanhcode.sable.physics.impl.rapier.Rapier3D.step(Native Method)
	at dev.ryanhcode.sable.physics.impl.rapier.RapierPhysicsPipeline.physicsTick(RapierPhysicsPipeline.java:159)
	at dev.ryanhcode.sable.sublevel.system.SubLevelPhysicsSystem.tickPipelinePhysics(SubLevelPhysicsSystem.java:278)
	at dev.ryanhcode.sable.sublevel.system.SubLevelPhysicsSystem.tick(SubLevelPhysicsSystem.java:237)
	at dev.ryanhcode.sable.api.sublevel.SubLevelContainer.lambda$tick$0(SubLevelContainer.java:147)
	at it.unimi.dsi.fastutil.objects.ReferenceArrayList.forEach(ReferenceArrayList.java:719)
	at dev.ryanhcode.sable.api.sublevel.SubLevelContainer.tick(SubLevelContainer.java:147)
	at dev.ryanhcode.sable.api.sublevel.ServerSubLevelContainer.tick(ServerSubLevelContainer.java:90)
	at net.minecraft.server.level.ServerLevel.handler$eng000$sable$tickPlotContainer(ServerLevel.java:13023)
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java)
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1037)
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:917)

A related variant seen in the same session (index looks like -1 cast to an unsigned 64-bit value, 18446744073709551615), same physics tick call path:

java.lang.RuntimeException: Rapier native panic: index out of bounds: the len is 8 but the index is 18446744073709551615
	at dev.ryanhcode.sable.physics.impl.rapier.Rapier3D.step(Native Method)
	at dev.ryanhcode.sable.physics.impl.rapier.RapierPhysicsPipeline.physicsTick(RapierPhysicsPipeline.java:159)
	...

Suspected cause (not confirmed, just an observation)

The panic index (8, matching array length 8) suggests a fixed-size collider/body-part array for the player ragdoll skeleton being indexed one past its bound. This only happens with a TACZ weapon equipped, which renders as an extra GeckoLib-driven attachment on the player's hand — my guess is that this attachment ends up being counted as an extra ragdoll "part" that isn't accounted for in the fixed-size array, but I don't know the Sable/Rapier internals well enough to confirm. Flagging it in case it's useful — could also be a TACZ-side rendering/animation quirk feeding Sable bad data.

Environment

  • Minecraft: 1.21.1
  • NeoForge: 21.1.228
  • Java: 21.0.3 (Microsoft build)
  • Sable: 2.0.2 (sable-neoforge-1.21.1-2.0.2.jar)
  • sable_player_ragdoll: 0.7.0
  • sablephysicscompat: 1.3.0
  • TACZ: 1.1.8-hotfix-r6
  • tacz_aero_compat: 1.8.0

Additional notes

  • Not reproduced with any non-TACZ held item so far.
  • Also tried Sable 2.0.3 during troubleshooting — different but similarly-shaped crashes still occurred there (AbstractMethodError from an unrelated addon mod being out of date against 2.0.3's API, and a StackOverflowError from recursive logging in SubLevelPhysicsSystem.updatePose under load), so this doesn't look like a regression fixed by the 2.0.3 update.
  • Happy to provide the full crash report / log file if needed.

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