Skip to content
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

Collisions and sleep #244

Open
EmperorPenguin18 opened this issue Nov 23, 2023 · 1 comment
Open

Collisions and sleep #244

EmperorPenguin18 opened this issue Nov 23, 2023 · 1 comment

Comments

@EmperorPenguin18
Copy link

Even though I never touch any sleep functions, when I run cpSpaceStep() after a collision, and it gets to line 223 of cpSpaceComponent.c which is this;

cpBool sleep = (space->sleepTimeThreshold != INFINITY);

somehow it gets set to 1. I've double checked and sleepTimeThreshold is infinity at this point.

The reason this is an issue at all is because later on during this Step it gets stuck in an infinite loop looking for arbiters. What's curious about this issue is it only happens for me when I do a Release build in cmake and then link statically. It also doesn't happen on Windows, just Linux and emscripten from my testing.

@flychscake
Copy link

Seems to occur only if built on gcc with --ffast-math in CFLAGS, specifically -ffinite-math-only optimization appears to be the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants