bulletphysics / bullet3

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.

Home Page:http://bulletphysics.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation faults in reduced deformable examples

justincredible opened this issue · comments

The example browser is crashing on all the Reduced Deformabe Body examples (except the empty Mode Visualizer).

This is the output:

X11 functions dynamically loaded using dlopen/dlsym OK!
X11 functions dynamically loaded using dlopen/dlsym OK!
Creating context
Created GL 3.3 context
Direct GLX rendering context obtained
Making context current
GL_VENDOR=AMD
GL_RENDERER=RAVEN2 (raven2, LLVM 15.0.7, DRM 3.42, 5.15.0-105-generic)
GL_VERSION=4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
GL_SHADING_LANGUAGE_VERSION=4.60
pthread_getconcurrency()=0
Version = 4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
Vendor = AMD
Renderer = RAVEN2 (raven2, LLVM 15.0.7, DRM 3.42, 5.15.0-105-generic)
b3Printf: Selected demo: Reduced Free Fall
Nodes:  0
Links:  0
Faces:  0
Tetras: 0
Nodes:  0
Links:  0
Faces:  0
Tetras: 0
ven = AMD
b3Printf: Aborting and deleting SharedMemoryCommon object
Segmentation fault (core dumped)

and the backtrace:

(gdb) bt
#0  0x00007ffff7ddf4ca in btDeformableContactProjection::reinitialize(bool) ()
   from /home/justin/repos/forks/bullet3/build_cmake/src/BulletSoftBody/libBulletSoftBody.so.3.26
#1  0x00007ffff7dc700c in btDeformableBackwardEulerObjective::reinitialize(bool, double) ()
   from /home/justin/repos/forks/bullet3/build_cmake/src/BulletSoftBody/libBulletSoftBody.so.3.26
#2  0x00007ffff7e018b0 in btReducedDeformableBodySolver::reinitialize(btAlignedObjectArray<btSoftBody*> const&, double) () from /home/justin/repos/forks/bullet3/build_cmake/src/BulletSoftBody/libBulletSoftBody.so.3.26
#3  0x00007ffff7de7c59 in btDeformableMultiBodyDynamicsWorld::reinitialize(double) ()
   from /home/justin/repos/forks/bullet3/build_cmake/src/BulletSoftBody/libBulletSoftBody.so.3.26
#4  0x00007ffff7de985d in btDeformableMultiBodyDynamicsWorld::internalSingleStepSimulation(double) ()
   from /home/justin/repos/forks/bullet3/build_cmake/src/BulletSoftBody/libBulletSoftBody.so.3.26
#5  0x00007ffff7de4675 in btDeformableMultiBodyDynamicsWorld::stepSimulation(double, int, double) ()
   from /home/justin/repos/forks/bullet3/build_cmake/src/BulletSoftBody/libBulletSoftBody.so.3.26
#6  0x00007ffff7e41af7 in OpenGLExampleBrowser::update(float) ()
   from /home/justin/repos/forks/bullet3/build_cmake/examples/ExampleBrowser/libBulletExampleBrowserLib.so.3.26
#7  0x00005555555f969c in main ()

Most of the other backtaces are identical (Conservation Test has an extra frame, but Springboard is very different). I have a "workaround" to avoid the faults, which seems to indicate the issue is lists of constraints are not being added when a soft body is added but despite not crashing they still seem wrong.

I've tried building from a few different commits in the past but none appear to work. I also tried it on a beefier Windows machine and it's also crashing there.