isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.26k stars 2.29k forks source link

Segmentation Fault When Using `set_front` in Visualizer (段错误 (核心已转储)) #6978

Open Made-Gpt opened 6 days ago

Made-Gpt commented 6 days ago

Checklist

Describe the issue

Hi, I'm encountering a segmentation fault when trying to set the view control using set_front and other camera controls (set_lookat, set_up) within the Visualizer class in Open3D. The visualizer works fine until I try to modify the camera view control parameters.

Any guidance on this issue would be greatly appreciated. Thank you!

Steps to reproduce the bug

import open3d as o3d
import numpy as np

... ...

# Initialize visualizer
vis = o3d.visualization.Visualizer()
vis.create_window(window_name="Point Cloud", width=1200, height=600)
vis.add_geometry(pano_pcd)
ctr = vis.get_view_control()
ctr.set_front([1, 0, 0])
vis.run()
vis.destroy_window()

Error message

00000 11111 段错误 (核心已转储)

Expected behavior

The camera view should adjust without causing a segmentation fault.

Open3D, Python and System information

1. When I remove the `set_front` call, the visualizer runs without issue.
2. I am working with a point cloud containing 8,294,400 points and corresponding color data.
3. The segmentation fault occurs after calling `set_front` (or sometimes `set_lookat`).
4. My system:
   - OS: Ubuntu 20.04
   - Open3D Version: 0.18.0
   - Python Version: 3.9

Additional information

The program crashes with a segmentation fault when calling set_front (or related methods) after starting the visualizer.

sisabyss commented 1 day ago

It could be a compatibility issue with numpy 2.x. I had a similar problem before, and I resolved it by downgrading numpy to 1.26. What version of numpy are you using? Try downgrading to version 1.26 to see if it fixes the issue. #6874

Made-Gpt commented 1 day ago

@sisabyss Thank you for you answer! My numpy version was 2.0.2, and I took your advice, now every thing is ok!