Skip to content

ColladaLoader Segmentation fault when when mesh share indexes #697

Description

@ozzdemir

Environment

  • OS Version: Ubuntu 24.04
  • Binary build, 5

Description

  • Expected behavior: Gazebo can load valid collada meshes without any segmentation fault
  • Actual behavior: Gazebo consistently crashes when trying to load meshes with certain properties

I've found out that this issue mentioned and reported to be resolved in gz-classic, and the mentioned PR is quite small. Here are the references:

Steps to reproduce

  1. Download example mesh
  2. gz sim -v 4 test.sdf
  3. Crash with segmentation fault

Test SDF

<?xml version="1.0" ?>
<sdf version="1.10">
  <world name="default">
    <model name="dae_test">
      <static>true</static>
      <link name="link">
        <visual name="visual">
          <geometry>
            <mesh>
              <uri>file:///path/to/mesh/box-assimp-4.dae</uri>
            </mesh>
          </geometry>
        </visual>
      </link>
    </model>
  </world>
</sdf>

Output

#29   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in
#28   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x712b780d9c3b, in
#27   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x712b7804caa3, in
#26   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x712b713f0673, in
#25   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x712b713ef36a, in QThread::exec()
#24   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x712b715eba7a, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#23   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x712b7164a278, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#22   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x712b6efeda62, in g_main_context_iteration
#21   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x712b6f04d736, in
#20   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x712b6efee5c4, in
#19   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x712b7164ac0e, in
#18   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x712b715f094a, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#17   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x712b715ed117, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#16   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x712b70d28d44, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#15   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x712b7161b342, in QObject::event(QEvent*)
#14   Object "/opt/ros/jazzy/opt/gz_gui_vendor/lib/gz-gui-8/plugins/libMinimalScene.so", at 0x712b382ecdab, in gz::gui::plugins::RenderThread::RenderNext(gz::gui::plugins::RenderSync*)
#13   Object "/opt/ros/jazzy/opt/gz_gui_vendor/lib/gz-gui-8/plugins/libMinimalScene.so", at 0x712b38300546, in gz::gui::plugins::RenderThreadRhiOpenGL::RenderNext(gz::gui::plugins::RenderSync*)
#12   Object "/opt/ros/jazzy/opt/gz_gui_vendor/lib/gz-gui-8/plugins/libMinimalScene.so", at 0x712b382f1307, in gz::gui::plugins::GzRenderer::Render(gz::gui::plugins::RenderSync*, gz::gui::plugins::RenderThreadRhi&)
#11   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x712b715ed117, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#10   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x712b70d28d34, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#9    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x712b715ece81, in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*)
#8    Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/gui/libGzSceneManager.so", at 0x712b30706dc8, in gz::sim::v8::GzSceneManager::eventFilter(QObject*, QEvent*)
#7    Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/libgz-sim8-rendering.so.8", at 0x712b30666731, in gz::sim::v8::RenderUtil::Update()
#6    Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/libgz-sim8-rendering.so.8", at 0x712b306a81c7, in gz::sim::v8::SceneManager::CreateVisual(unsigned long, sdf::v14::Visual const&, unsigned long)
#5    Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/libgz-sim8-rendering.so.8", at 0x712b306a6753, in gz::sim::v8::SceneManager::LoadGeometry(sdf::v14::Geometry const&, gz::math::v7::Vector3<double>&, gz::math::v7::Pose3<double>&)
#4    Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/libgz-sim8.so.8", at 0x712b7242fd7d, in gz::sim::v8::loadMesh(sdf::v14::Mesh const&)
#3    Object "/opt/ros/jazzy/opt/gz_common_vendor/lib/libgz-common5-graphics.so.5", at 0x712b6fa1f494, in gz::common::MeshManager::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#2    Object "/opt/ros/jazzy/opt/gz_common_vendor/lib/libgz-common5-graphics.so.5", at 0x712b6f9e8e9e, in gz::common::ColladaLoader::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#1    Object "/lib/x86_64-linux-gnu/libtinyxml2.so.10", at 0x712b6faacc32, in tinyxml2::XMLElement::Attribute(char const*, char const*) const
#0    Object "/lib/x86_64-linux-gnu/libtinyxml2.so.10", at 0x712b6faacbdb, in tinyxml2::XMLElement::FindAttribute(char const*) const
Segmentation fault (Address not mapped to object [0x70])

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions