[Resolved]Segfault on HelloWorld.cpp, btCollisionDispatcher

Post Reply
Alexandre.Bonneau
Posts: 3
Joined: Thu Apr 15, 2021 2:33 pm

[Resolved]Segfault on HelloWorld.cpp, btCollisionDispatcher

Post 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
Last edited by Alexandre.Bonneau on Thu Apr 15, 2021 4:39 pm, edited 1 time in total.
Alexandre.Bonneau
Posts: 3
Joined: Thu Apr 15, 2021 2:33 pm

Re: Segfault on HelloWorld.cpp, btCollisionDispatcher

Post 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.
Post Reply