isl-org / Open3D

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

Failed to find service port for display #1673

Open TimingSpace opened 4 years ago

TimingSpace commented 4 years ago

Describe the bug On mac OS,10.15.1 Failed to find service port for display when trying to visualize a ply file.

To Reproduce Steps to reproduce the behavior: xzy = np.random.random((100,3))*10 pcd = o3d.geometry.PointCloud() pcd.points = o3d.utility.Vector3dVector(xyz) o3d.visualization.draw_geometries([pcd])

then

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: [Open3D ERROR] GLFW Error: Cocoa: Failed to find service port for display

Expected behavior Expected to visualize the point cloud

Environment (please complete the following information):

keithahern commented 4 years ago

I am running a Macbook with a second display provided by airplaying to an iPad (new OS X feature). When I disconnected the airplay display I no longer got this error.

ruoyuwangeel4930 commented 3 years ago

Hello, do you fix the problem now?

Jianghanxiao commented 3 years ago

I also meet the problem on mac M1

Ao-senXiong commented 3 years ago

Did anyone ever success this on mac M1? It troubles me!!! Thx!!!

adityamwagh commented 3 years ago

Has anyone been able to fix this on an M1 MacBook?

Jianghanxiao commented 3 years ago

Has anyone been able to fix this on an M1 MacBook?

I remember use the latest open3D can solve the problem

adityamwagh commented 3 years ago

@Jianghanxiao Do you remember how you did it? I had compiled Open3D v0.13.0, but still the visualizations didn't show up and neither the point cloud data was read.

Jianghanxiao commented 3 years ago

@Jianghanxiao Do you remember how you did it? I had compiled Open3D v0.13.0, but still the visualizations didn't show up and neither the point cloud data was read.

Based on my current environment, the open3D I use is 0.12.0. It's installed through pip

adityamwagh commented 3 years ago

Can you import a pcd file, and then show me the visualization?

DenisTome commented 2 years ago

I'm having the same issue on a M1 Max with 0.14.1 installed though pip

errissa commented 2 years ago

@DenisTome Please try the development pip packages available here. Some fixes have been made since 0.14.1 to support Apple Silicon (M1).

adityamwagh commented 2 years ago

They have changed how the visualizer is accessed in 0.14.0. Try the new one @DenisTome.

YajJackson commented 2 years ago

Tested with 0.15.1. Calling both: open3d.visualization.draw_geometries and open3d.visualization.draw raise:

[Open3D WARNING] GLFW Error: Cocoa: Failed to find service port for display

The GUI opens, but displays an empty scene:

Screen Shot 2022-06-15 at 3 00 00 PM
maurock commented 2 years ago

@YajJackson I had a similar issue, then noticed that the object is actually there but you need to rotate the viewport to see it (left click + move your mouse/zoom in-out until you see something). My guess is that it does not render properly when normals are aligned in certain directions. Setting mesh_show_wireframe=True in o3d.visualization.draw_geometries([mesh], mesh_show_wireframe=True) helps, in the sense that you can see the mesh wireframe so the object becomes more visibile even for small meshes.

tsenguunchik commented 2 years ago

Any update on this? Running M2 Macbook air

schauppi commented 2 years ago

Same issue on Mac M1. open3d 0.11.2 and python 3.8.13.

adityamwagh commented 2 years ago

@schauppi Update to Open3D 0.15.1, your version doesn't have support for Apple Silicon.

azadeh-sharafi commented 1 year ago

I have the same problem. The python crashed when I tried to close the visualization window with the same message: "[Open3D WARNING] GLFW Error: Cocoa: Failed to find service port for display"

Apple M1 chip iOS Ventura 13.0.1 Python 3.8 open3d 0.16.1

adityamwagh commented 1 year ago

@azadeh-sharafi Experiment with a newer version of Python and also try using open3d v0.15.1

xbbkok commented 1 year ago

I meet the problem on mac M2

siyanhu commented 1 year ago

me too. on MacOS Ventura 13.1, Apple M1

LouisSY commented 1 year ago

I created a Conda env with x86 architecture on my m1 Mac and I also have this problem.

Environment:

OS: macOS Ventura 13.2 Python version: 3.9.15, arch=x86_64 Open3D version:0.16.1 Is this remote workstation?: no How did you install Open3D?: pip

Hiusam commented 1 year ago

Me too. With M1 Pro, python=3.9, and open3d 0.15.1

josephko91 commented 1 year ago

I have the same issue. Python GUI opens up, but crashes when I try to close the window. python: 3.10.9 open3d: 0.16.1

rwijmashell commented 1 year ago

Was having this issue as well. I noticed that switching from draw_geometries to simply using the new draw fixed my issues.

Sergeytata commented 1 year ago

Same problem M1 Pro; Open3d 0.17.0.

Is there a prebuilt wheel with Jupyter visualisation set to ON?

jiazhou2023 commented 1 year ago

Same issue.

iryna-savchuk commented 1 year ago

I experience the same issue on my M1 MacBook Pro when running draw_geometries: [error] GLFW error: Cocoa: Failed to find service port for display

bedbad commented 1 year ago

Problem persists

siyanhu commented 1 year ago

same here for my M1 laptop. I have to switch to intel Mac right now temporarily.

prerakmody commented 1 year ago

I am using open3d==0.17.0 on a Macbook M1 with python==3.9.12 and am able to view the visualizer with o3d.visualization.draw_geometries([pcd])

But I still get the error [Open3D WARNING] GLFW Error: Cocoa: Failed to find service port for display.

On the other hand if I use the following code,

vis = open3d.visualization.Visualizer()
vis.create_window()
vis.add_geometry(pcd)
vis.run()
vis.close()

and if I close the visualizer and run more code (while inside a python interpreter), it hangs and gives the following error

[Open3D WARNING] GLFW Error: The GLFW library is not initialized
[Open3D WARNING] [PhongShaderForTriangleMesh] Compiling shaders failed.

Then I have to restart the terminal again which slows down my debugging process.

cwreynolds commented 1 year ago

Sorry that this is no help to the people still seeing this problem, but for whatever help it is to isolate the cause:

I’m able to run Open3D 0.17.0 without these problems, using macOS Monterey 12.6.4 on a 2021 MacBook Pro M1 Max. I’m using Python 3.10.10 via a Conda environment. In case it is relevant, I installed GLEW and GLFW via Homebrew, for use from c++, in the last few months.

I’m able to use o3d.visualization.draw_geometries() as in the original test code for this issue. Normally I use the “non blocking” API o3d.visualization.Visualizer(), update_geometry(), etc. I’ve also run the newer o3d.visualization.draw() tools.

I do see this message once: “[Open3D WARNING] GLFW Error: Cocoa: Failed to find service port for display” but everything seem to work OK.

OHNOalan commented 1 year ago

Encounter following bug using GLFW "0.52.0" with rust version "1.26.0" on macOS 13.4.1 with 2021 Apple M1 Pro Chip.

Bug Info: "thread 'main' panicked at 'GLFW Error: Cocoa: Failed to find service port for display'"

imxtx commented 10 months ago

same problem with M2 Pro Mac mini.

sanikeit commented 9 months ago

same issue with Mac M1 pro

jayyoung0802 commented 9 months ago

same problem with M2 pro

MaureenZOU commented 8 months ago

+1

robinthibaut commented 8 months ago

+1

LJHG commented 7 months ago

same problem on m1 pro

mxagar commented 7 months ago

Same problem here on my Apple MacBook Pro M1 (Sonoma 14.4.1).

I noticed that the latest Open3D version I can install using pip is 0.16.1, not the latest release 0.18. If I try to manually install the 0.18 release wheels I get system compatibility errors; e.g.:

$ pip install https://github.com/isl-org/Open3D/releases/download/v0.18.0/open3d-0.18.0-cp310-cp310-macosx_13_0_arm64.whl

--> ERROR: open3d-0.18.0-cp310-cp310-macosx_13_0_arm64.whl is not a supported wheel on this platform.

I suspect one could build Open3D locally on the machine or using docker to get the latest working wheels...

LaFerraille commented 7 months ago

Same issue here for Mac M2, any updates ?

jasonbian97 commented 5 months ago

Same issue for MacBookPro M2.

gdudek commented 4 months ago

Same problem with open3d 0.18.0 M3 Pro Sonoma 14.4

benjaminhr commented 3 months ago

same problem here

yc4ny commented 3 months ago

same problem here M2 AIR Sonoma 14.6.1

zhuhu00 commented 2 months ago

Omg, same problem, M3 Pro, Sequoia 15.0

henryrobbins commented 2 months ago

Same problem:

siyanhu commented 2 months ago

I'm glad that MacOS keeps making trouble to Open3D. Love this phenomenon. Should have installed a linux.

iballester commented 1 month ago

Has anyone found a solution?

henryrobbins commented 1 month ago

Has anyone found a solution?

I recommend just using the plotly visualization functions. It has limited functionality but it unblocked me for my use case. The nice thing is you can visualize within a Jupyter Notebook. You'll need to convert to legacy before plotting.

o3d.visualization.draw_plotly([pcd.legacy()])