Skip to content

Error followed by a crash (segmentation fault) with GUI "selection" tab with LineSet object #6498

@EwingKang

Description

@EwingKang

Checklist

Describe the issue

I'm using c++ devel
If there exists an open3d::geometry::LineSet object, GUI from open3d::visualization::Draw() would crash upon selection of Actions -> show settings -> Mouse control (drop down) -> Selection (tab).

Upon inspections with GDB, there are two part of this issue. The first one is a log error at cpp/open3d/visualization/gui/PickPointsInteractor.cpp:85. And the second actual segmentation fault is a memory-related crash during destructor. The traceback of second crash is attached.

Steps to reproduce the bug

In C++:

auto linset_aaa_t = std::make_shared<open3d::t::geometry::LineSet>(aaa, aaa_indices);
std::vector<open3d::visualization::DrawObject> drawobject;
drawobject.push_back(open3d::visualization::DrawObject("lineset", linset_aaa_t, true));
open3d::visualization::Draw(drawobject, "path");
  • Execute the program
  • Actions -> show settings -> Mouse control (drop down) -> Selection (tab).

Crash immediately

Error message

[Open3D Error] (void open3d::visualization::gui::SelectionIndexLookup::Add(const string&, size_t)) /root/Open3D/cpp/open3d/visualization/gui/PickPointsInteractor.cpp:85: start_index 25142 must be larger than all previously added objects 25142.
[Open3D INFO] Memory Statistics: (Device) (#Malloc) (#Free)
[Open3D INFO] ---------------------------------------------
[Open3D WARNING] CPU:0: 62 58 --> 4 with 19768 total bytes
[Open3D WARNING] 0x5653a5dbd750 @ 2288 bytes
[Open3D WARNING] 0x5653a5ffd4a0 @ 2288 bytes
[Open3D WARNING] 0x5653a6529b30 @ 8328 bytes
[Open3D WARNING] 0x5653a652bbc0 @ 6864 bytes
[Open3D INFO] ---------------------------------------------
Segmentation fault (core dumped)

Expected behavior

Not crash.

Open3D, Python and System information

- Operating system: Ubuntu 22.04
- Python version: 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
- Open3D version: [2a11e0e40d](https://github.com/isl-org/Open3D/commit/2a11e0e40d5f9db4c80d9b6543e455d70a368822)
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc 11.4

Additional information

20231120_open3d_crash_traceback.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot a build issue, this is likely a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions