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

Issue with null pointer in CollisionVisitor #961

Closed
courtecuisse opened this issue Mar 11, 2019 · 3 comments
Closed

Issue with null pointer in CollisionVisitor #961

courtecuisse opened this issue Mar 11, 2019 · 3 comments
Assignees
Labels
issue: bug (minor) Bug affecting only some users or with no major impact on the framework

Comments

@courtecuisse
Copy link
Contributor

Hi,

I have an issue with commit cbee54c line 77.
It seems that a function has been added to get the number of primitives from the narrowphase without checking if the narrow phase is not NULL i.e.
m_primitivesTest += obj->getNarrowPhaseDetection()->getPrimitiveTestCount();

I use such pipeline without narrowphase, which mechanically creates a segfault in my scenes. I fixed the problem adding if (obj->getNarrowPhaseDetection()) before the previous line but it will result in m_primitiveTestCount = 0. I don't know if it will raise other issues.

Hadrien.


Suggested labels:

@damienmarchal damienmarchal added the issue: bug (minor) Bug affecting only some users or with no major impact on the framework label Mar 11, 2019
@damienmarchal
Copy link
Contributor

Definitely to fix.

@guparan guparan changed the title Issue with null pointer in CollisionVisitor #cbee54ca9953f514da374d92253f9ca6e54df51f Issue with null pointer in CollisionVisitor Mar 13, 2019
@fspadoni
Copy link
Contributor

Thank Hadrien, the fix is fine.

The m_primitiveTestCount is used only for statitistics to know how many collision tests are performed.
There should be no other crash if m_primitiveTestCount is = 0.

@damienmarchal
Copy link
Contributor

This was fixed in #962
We can close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug (minor) Bug affecting only some users or with no major impact on the framework
Projects
None yet
Development

No branches or pull requests

5 participants