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

Crash in World::update() when adding collision body, test if collides with world, removing collisionbody before calling World::update() #60

Closed
andreasdr opened this issue Jul 8, 2018 · 6 comments
Assignees
Labels

Comments

@andreasdr
Copy link

andreasdr commented Jul 8, 2018

Hi,

I have one situation where I need to test a single time for collision with world, when trying to find out if a player can spawn on a position or not.

Therefor I add a collision body to a dynamics world, test for collision and remove it. There are no World::update() calls involved.

When I do it this way RP3D crashes on next World::update().

Please see attached the backtrace:

`#0 0x000000080efe9fc0 in ?? ()
#1 0x0000000000954f15 in reactphysics3d::CollisionDetection::broadPhaseNotifyOverlappingPair (this=0x8060c14a8, shape1=0x80efe98a0, shape2=0x80efea020) at ext/reactphysics3d/src/collision/CollisionDetection.cpp:338

#2 0x000000000093e3c5 in reactphysics3d::BroadPhaseAlgorithm::computeOverlappingPairs (this=0x8060c15b0, memoryManager=@0x8060c1008) at ext/reactphysics3d/src/collision/broadphase/BroadPhaseAlgorithm.cpp:291
#3 0x000000000095423a in reactphysics3d::CollisionDetection::computeBroadPhase (this=0x8060c14a8) at ext/reactphysics3d/src/collision/CollisionDetection.cpp:100

#4 0x00000000009541d9 in reactphysics3d::CollisionDetection::computeCollisionDetection (this=0x8060c14a8) at ext/reactphysics3d/src/collision/CollisionDetection.cpp:77

#5 0x000000000095e016 in reactphysics3d::DynamicsWorld::update (this=0x8060c1000, timeStep=0.0329999998) at ext/reactphysics3d/src/engine/DynamicsWorld.cpp:126

#6 0x000000000059dea3 in tdme::engine::physics::World::update (this=0x8060c1000, deltaTime=0.0329999998) at src/tdme/engine/physics/World.cpp:179`

BTW: This is the last bug I currently know of that helds me back to merge my TDME2 RP3D branch into master branch.
I am super excited how RP3D works with our game and engine.

You can see this bug using my PathFindingTest. Just remove the comment before "world->update();"
https://github.com/andreasdr/tdme2/blob/reactphysics3d-current/src/tdme/tests/PathFindingTest.cpp#L166

Best regards
Andreas

@DanielChappuis
Copy link
Owner

Thanks a lot for reporting this.

I will check this using your PathFindingTest when I have some time.

@DanielChappuis DanielChappuis self-assigned this Jul 10, 2018
@DanielChappuis
Copy link
Owner

Sorry for the delay. I was on vacation.

I have pushed a fix with this commit into the "develop" branch.

Can you try if the bug is now fixed on your side ?

@andreasdr
Copy link
Author

Hi,

no worries. Very nice!!! Will check tomorrow.

Many thanx and

Best regards
Andreas

@andreasdr
Copy link
Author

Hi,

this seem to be fixed!!!

Many thanx and

Best regards
Andreas

@DanielChappuis
Copy link
Owner

Ok perfect. I have merged the fix into the "master" branch.
Thanks for reporting this bug.

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

No branches or pull requests

2 participants