Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
EwingKang opened this issue Nov 20, 2023 · 1 comment · Fixed by #6499
Closed
3 tasks done
Labels
bug Not a build issue, this is likely a bug.

Comments

@EwingKang
Copy link
Contributor

EwingKang commented Nov 20, 2023

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

@EwingKang EwingKang added the bug Not a build issue, this is likely a bug. label Nov 20, 2023
@EwingKang
Copy link
Contributor Author

After some code tracing, I discovered that at PickPointsInteractor.cpp#L156
If pg is a LineSet type, no action willl be done with all the ifs at line 164, 167, 170, and 182. However the points are already added to the objects_ in the Add() function at line 83.
The lookup_->objects_ and points_.size() no longer matches and triggered the error log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not a build issue, this is likely a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant