gazebosim / gz-physics

Abstract physics interface designed to support simulation and rapid development of robot applications.
https://gazebosim.org
Apache License 2.0
63 stars 38 forks source link

bullet-featherstone: Crash when deleting model with joints #573

Closed iche033 closed 3 months ago

iche033 commented 7 months ago

Environment

Description

Steps to reproduce

  1. Launch a model with a joint using bullet-featherstone plugin
    gz sim -v 4 -r log_record_dbl_pendulum.sdf --physics-engine gz-physics-bullet-featherstone-plugin
  2. Right click on pendulum and select Remove -> crash

Output

Backtrace ```sh pure virtual method called terminate called without an active exception Stack trace (most recent call last): #31 Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7f4234c31fc5, in #30 Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7f4234c2fc34, in #29 Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7f4234b7ba1e, in #28 Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7f4234aa69ac, in rb_protect #27 Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7f4234c3ec61, in rb_yield #26 Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7f4234c3a30c, in rb_vm_exec #25 Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7f4234c34c96, in #24 Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7f4234c31fc5, in #23 Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7f4234c2fc34, in #22 Object "/usr/lib/x86_64-linux-gnu/ruby/3.0.0/fiddle.so", at 0x7f42348d144b, in #21 Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7f4234bfd088, in rb_nogvl #20 Object "/usr/lib/x86_64-linux-gnu/ruby/3.0.0/fiddle.so", at 0x7f42348d0d6b, in #19 Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x7f42348ae492, in #18 Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x7f42348b1e2d, in #17 Object "/home/iche/code/gz_g_ws/install/lib/libgz-sim7-gz.so.7.6.0", at 0x7f4231079c5a, in runServer #16 Object "/home/iche/code/gz_g_ws/install/lib/libgz-sim7.so.7", at 0x7f4230017409, in #15 Object "/home/iche/code/gz_g_ws/install/lib/libgz-sim7.so.7", at 0x7f4230029252, in gz::sim::v7::SimulationRunner::Run(unsigned long) #14 Object "/home/iche/code/gz_g_ws/install/lib/libgz-sim7.so.7", at 0x7f4230028af0, in gz::sim::v7::SimulationRunner::Step(gz::sim::v7::UpdateInfo const&) #13 Object "/home/iche/code/gz_g_ws/install/lib/libgz-sim7.so.7", at 0x7f423001f999, in gz::sim::v7::SimulationRunner::UpdateSystems() #12 Object "/home/iche/code/gz_g_ws/install/lib/gz-sim-7/plugins/libgz-sim-physics-system.so", at 0x7f41e4d390f8, in gz::sim::v7::systems::Physics::Update(gz::sim::v7::UpdateInfo const&, gz::sim::v7::EntityComponentManager&) #11 Object "/home/iche/code/gz_g_ws/install/lib/gz-sim-7/plugins/libgz-sim-physics-system.so", at 0x7f41e4d225b3, in gz::sim::v7::systems::PhysicsPrivate::Step(std::chrono::duration > const&) #10 Object "/home/iche/code/gz_g_ws/install/lib/gz-physics-6/engine-plugins/libgz-physics-bullet-featherstone-plugin.so", at 0x7f41de9b68dd, in gz::physics::bullet_featherstone::SimulationFeatures::WorldForwardStep(gz::physics::Identity const&, gz::physics::SpecifyData, gz::physics::ExpectData >&, gz::physics::CompositeData&, gz::physics::ExpectData > > const&) #9 Object "/home/iche/code/gz_g_ws/install/lib/libBulletDynamics.so.3.25", at 0x7f41de586b61, in btDiscreteDynamicsWorld::stepSimulation(float, int, float) #8 Object "/home/iche/code/gz_g_ws/install/lib/libBulletDynamics.so.3.25", at 0x7f41de585f0c, in btDiscreteDynamicsWorld::internalSingleStepSimulation(float) #7 Object "/home/iche/code/gz_g_ws/install/lib/libBulletDynamics.so.3.25", at 0x7f41de5b8afb, in btMultiBodyDynamicsWorld::calculateSimulationIslands() #6 Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7f4230eaefe4, in __cxa_pure_virtual #5 Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7f4230eae2b6, in std::terminate() #4 Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7f4230eae24b, in #3 Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7f4230ea2bbd, in #2 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f42346287f2, in abort #1 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f4234642475, in raise #0 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f4234696a7c, in pthread_kill Aborted (Signal sent by tkill() 3281938 1156304) ```