Page 1 of 1

[Resolved]Segfault on HelloWorld.cpp, btCollisionDispatcher

Posted: Thu Apr 15, 2021 2:39 pm
by Alexandre.Bonneau
Hi,

I'm starting using Bullet for a project with Ros,
I successfully compile it and link it for cmake, and I can launch the tutorial examples without problems.

However, when I start using Bullet function in my code, (here the first two line of helloworld, I'm getting a segfault :"

Code: Select all

btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
	btCollisionDispatcher* dispatcher = new btCollisionDispatcher(collisionConfiguration);
The segfault is coming from the second line, I can create a btDefaultCollisionConfiguration with no problem, but as soon as write the second line, I have a segfault on execution.

Do you have any idea on where this might come from ?

[EDIT] The segfault is trigger by the second line, but a dispatcher is still properly created
Best regards

Re: Segfault on HelloWorld.cpp, btCollisionDispatcher

Posted: Thu Apr 15, 2021 4:38 pm
by Alexandre.Bonneau
I made it works, it was a stupid mistake.

To whoever might have this problem in the futur,

I used #include <bullet/libname.h> instead of "libname.h" some times ago because I had bad linkage of the lib in the CMake.
It still compiled, but probably only the class definition in the header and not the rest.