-
-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash with attempt to subtract with overflow
in SAPRegion::update_after_subregion_removal()
#593
Comments
I'm having this exact problem as well. |
I'm also having this issue but with rapier 0.19.0 and bevy_rapier3d 0.26.0. I managed to trigger the panic by manually setting the position of the transform attached to my player with the rigidbody. I still sometimes have issues reproducing it but my setup is basically an empty world where the player position and velocity are reset to Panic message for reference:
|
@DiSaber looks like you are also running Rapier in FYI @sebcrozet, since I know you mentioned you wanted to investigate in the workaround PR. Maybe that fact that this only happens in
|
I am using rapier 0.18.0 through bevy_rapier2d 0.24.0 and noticed occasional
attempt to subtract with overflow
inupdate_after_subregion_removal()
on subtract fromself.subproper_proxy_count
. I cloned rapier repo, added some debug and turns out thataxis.delete_deleted_proxies_and_endpoints_after_subregion_removal()
call returns 1 butself.subproper_proxy_count
equals 0 so subtraction causes panic in debug build.As quick workaround I changed the subtraction to
self.subproper_proxy_count = self.subproper_proxy_count.saturating_sub(num_deleted_proxies)
but it's out of my rapier knowledge to fix this properly.I'm attaching log containing debug outputs and stack backtrace + diff with changes I made. I know how to reproduce this problem (~50% chance) with current state of my project so it's possible to provide additional logs if needed.
log.txt
diff.txt
The text was updated successfully, but these errors were encountered: