-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Segmentation Fault On Mac M2 #5951
Comments
Having a similar issue. I built open3d from source to double check, and while I'm able to import open3d, there is again a segfault with python -c "import open3d as o3d; c = o3d.geometry.TriangleMesh.create_box(); o3d.visualization.draw(c)" Giving me:
I'm using:
|
Thanks for reporting this. Please test this wheel for v0.17: |
@RohanGautam As @ssheorey suggests, please try the latest wheels. I have tested your example and @jonbakerfish 's example on an M1 system with 0.17 and had no issues. |
@ssheorey the same error:
|
Thanks for the reply! I tested on my machine with 0.17 itself, as I had built open3d from scratch through the master branch, so the issue still persists (I tried the linked wheel again to double check). I don't know if it helps, but I successfully set up open3d on a friend's Macbook which was a M1 very recently as well. However, my new machine has a M2, where the problems are arising. Are there any differences between M1/M2 that could be the cause? |
We were able to verify the issue when running unit tests. Looks like it's specific to M2. Please add as much details about your environment as possible. We don't readily have an M2 available, so more help (stack trace, etc.) would be useful. |
@ssheorey I tried the faulthandler but got nothing interesting:
Do you have any other instructions to get info you want? |
Sure! Happy to provide additional information.
After the segfault, the system generated a crash report ('Python 3.9 quit unexpectedly'). This is the detailed output of the report: Full output
I also tried it with a script that confirms that it's happening in import open3d as o3d
import faulthandler # to further investigate segfault
faulthandler.enable()
o3d.utility.set_verbosity_level(o3d.utility.VerbosityLevel.Debug)
print(o3d.__version__)
c = o3d.geometry.TriangleMesh.create_box()
o3d.visualization.draw(c) Full output0.17.0 Current thread 0x00000001e0552500 (most recent call first): These are all the details i could think of. Do let me know if I can provide any other information or test things out, would be more than happy to help. |
Okay, I've somehow managed to observe pretty consistently that if i close the visualization window by pressing the 'x' on the open3d window with my mouse, it closes without issues, but closing it with keyboard shortcuts (like |
@RohanGautam Thank you for this last detail. I am able to reproduce this behavior on my system. |
@jonbakerfish the error is originating from Numpy. Can you
|
@ssheorey Yes, NumPy is running fine with |
@jonbakerfish we haven't been able to reproduce your issue on either Apple M1 or Apple M2. Can you try installing in a new python environment? |
@ssheorey Ok, I found some different results. If I install all the dependencies via conda-forge, the open3d import will crash. If I install them via pip the import is ok, but it'll crash like @RohanGautam described: # this will crash
mamba create -y -n py39_test1 python=3.9
mamba install numpy dash werkzeug nbformat=5.7.0 configargparse addict pillow matplotlib pandas pyyaml scikit-learn tqdm pyquaternion
pip install open3d-0.17.0-cp39-cp39-macosx_12_0_arm64.whl
# this won't crash
mamba create -y -n py39_test2 python=3.9
pip install open3d-0.17.0-cp39-cp39-macosx_12_0_arm64.whl |
@RohanGautam's issue was quite different and was fixed by PR #6008 . I'm not familiar with mamba - does this install conda packages? Mixing conda packages and Python wheels can be tricky and anaconda documentation warns against this. I would recommend sticking to pip wheels, since we don't provide conda packages. |
Yes, mamba is a reimplementation of the Mixing conda and pip is fine on Linux (Ubuntu) but not Mac. So the current solution is to create a python environment that uses |
Thanks for confirming. Closing this issue. |
Checklist
master
branch).Describe the issue
import open3d
crashed on Mac M2 Ventura 13.2.1Steps to reproduce the bug
Error message
[1] 8358 segmentation fault python -c "import open3d"
Expected behavior
No response
Open3D, Python and System information
Additional information
No response
The text was updated successfully, but these errors were encountered: