I found this bug when I stacked 30 carts and pushed them against a wall. While they were moving I got into one of them and when the carts touched the wall the entire environment was black and all three axes of the player's position were NaN. This happened on the last captured frame before the game crashed. In the logs I found that the rotation of the carts and the player was also NaN after colliding with the block when the game crashed and closed in the launcher an error with this code popped up. It was on snapshot 24w36a.
Seed: 1304766654475133906
Coordinates: X: 160, Y: 68, Z: -558