Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

Point Cloud visualization GLFW Error

Open FelipeDelgadoR opened this issue 6 years ago • 24 comments

Hello everyone, I've been using Open3D 0.7.0 for a while now, playing with point clouds... I visualize my pointclouds with open3d.visualization.draw_geometries Often when I move the point clouds in the window I get this error:

[Open3D Error] GLFW Error: Failed to make context current

even with having this error printed in the console, I could keep working and moving around the point cloud with no issues

Now, I updated my Open3D to version 0.9.0 and the error is shutting down my script... so now I cannot move and visualize the point cloud as I'd like, it still shows me the point cloud, but as soon as I start moving it, it shuts my program...

Is there a fix for this? maybe I have to install or upgrade some other library? Thanks!

FelipeDelgadoR avatar Feb 28 '20 08:02 FelipeDelgadoR

Hi, Could you try to install dependencies using the scripts here and build from source?

syncle avatar Feb 28 '20 14:02 syncle

Hello! Same problem here. The same script I'm using now, was working a week ago, with the only difference that I was not getting any error in the console (as far as I remember correctly). Win 10, Python 3.7.6 (64bit) and Open3D 0.9.0

morejiik avatar Mar 05 '20 15:03 morejiik

Here some more details on the error:

Traceback (most recent call last):
  File ".../Exercise1/02_example.py", line 23, in <module>
    o3d.visualization.draw_geometries([pcd])
RuntimeError: [Open3D ERROR] GLFW Error: WGL: Failed to make context current: Handle non valido.

morejiik avatar Mar 05 '20 15:03 morejiik

Update: after some days and a PC reboot, everything seems to work correctly. I haven't changed anything and I don't know what caused the issue.

morejiik avatar Mar 10 '20 16:03 morejiik

hi, I have the same problem, I build open3d from source and when draw_geometries(),my scrip shut down. RuntimeError: [Open3D ERROR] GLFW Error: WGL: Failed to make context current: 不支持请求的转换操作。

ZhangLanTao avatar Mar 11 '20 08:03 ZhangLanTao

@ZhangLanTao even after installing the dependencies, the problem persists?

germanros1987 avatar Mar 12 '20 18:03 germanros1987

@FelipeDelgadoR @morejiik @ZhangLanTao How did you use draw_geometries? Are you using in Jupyter Notebook?

syncle avatar Mar 15 '20 15:03 syncle

nope, I'm using it in pycharm, I set GPU to NVIDIA's card and the problem haven't occur so far.

---Original--- From: "Jaesik Park"<[email protected]> Date: 2020/3/15 23:12:45 To: "intel-isl/Open3D"<[email protected]>; Cc: "ZhangLanTao"<[email protected]>;"Mention"<[email protected]>; Subject: Re: [intel-isl/Open3D] Point Cloud visualization GLFW Error (#1550)

@FelipeDelgadoR @morejiik @ZhangLanTao How did you use draw_geometries? Are you using in Jupyter Notebook?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

ZhangLanTao avatar Mar 15 '20 15:03 ZhangLanTao

Yes, I switched to NVIDIA's GPU and it works 

---Original--- From: "germanros1987"<[email protected]> Date: 2020/3/13 02:38:35 To: "intel-isl/Open3D"<[email protected]>; Cc: "ZhangLanTao"<[email protected]>;"Mention"<[email protected]>; Subject: Re: [intel-isl/Open3D] Point Cloud visualization GLFW Error (#1550)

@ZhangLanTao even after installing the dependencies, the problem persists?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

ZhangLanTao avatar Mar 15 '20 15:03 ZhangLanTao

@FelipeDelgadoR @morejiik @ZhangLanTao How did you use draw_geometries? Are you using in Jupyter Notebook?

This is the code:

pcd  = o3d.io.read_point_cloud('pcd.ply')

print(np.asarray(pcd.points).shape)
print(np.asarray(pcd.colors).shape)

o3d.visualization.draw_geometries([pcd])

No, I'm using Visual Studio Code. Sometimes it crashes with the same error, sometimes it works..

@ZhangLanTao how did you switch to the Nvidia GPU?

morejiik avatar Mar 16 '20 09:03 morejiik

@FelipeDelgadoR @morejiik @ZhangLanTao How did you use draw_geometries? Are you using in Jupyter Notebook?

This is the code:

pcd  = o3d.io.read_point_cloud('pcd.ply')

print(np.asarray(pcd.points).shape)
print(np.asarray(pcd.colors).shape)

o3d.visualization.draw_geometries([pcd])

No, I'm using Visual Studio Code. Sometimes it crashes with the same error, sometimes it works..

@ZhangLanTao how did you switch to the Nvidia GPU?

you can refer to issue #1598, It works on my PC.

ZhangLanTao avatar Mar 17 '20 02:03 ZhangLanTao

It still works with open3D 0.8.0, not sure what's the deal. Using pycharm with python 3.7

FelipeDelgadoR avatar Mar 24 '20 12:03 FelipeDelgadoR

Using a good independent Graphics card that supports openGL is an effective solution.

ixgnaz avatar Apr 22 '20 09:04 ixgnaz

Hi! Same problem here. Windows 10; python 3.6.10; open3D 0.9.0.0. in Anaconda. Try to solve it using #1598, but dont know how to using Anaconda. Someone? It would be a pity to stop using it because of this now that we were gettin along...

kezkabarra avatar May 13 '20 06:05 kezkabarra

change a graphics card may help

---Original--- From: "kezkabarra"<[email protected]> Date: 2020/5/13 14:55:31 To: "intel-isl/Open3D"<[email protected]>; Cc: "ZhangLanTao"<[email protected]>;"Mention"<[email protected]>; Subject: Re: [intel-isl/Open3D] Point Cloud visualization GLFW Error (#1550)

Hi! Same problem here. Windows 10; python 3.6.10; open3D 0.9.0.0. in Anaconda. Try to solve it using #1598, but dont know how to using Anaconda. Someone? It would be a pity to stop using it because of this now that we were gettin along...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

ZhangLanTao avatar May 13 '20 06:05 ZhangLanTao

Well, I could do that for me. But Im developping an application to deploy in many computers the solution should be more generalistic. Maybe try different version combinations of python and opend3D? Anyone with no independent graphics card working in Windows with no issues?

kezkabarra avatar May 13 '20 07:05 kezkabarra

Hi. Like Felipe mentions in the original post, the error is happening in Open3D versions prior to 0.9 as well, but it was failing silently in the background. Since 0.9 the whole visualizer throws an error and shuts down.

On the screenshot below, you can see console print outs for running same script with 0.8 and 0.10.0.1 version. On the left, GLFW fails several times. The errors are logged, but I was able to continue to use the visualizer (zoom, rotate, etc.) and without the log, I would have not noticed anything. On the right, the script shuts down with the first error.

image

I am not sure if this error handling change was deliberate decision or if it is even coming from Open3D code, but since I have a laptop with only internal GPU, the suggested workaround does not work for me and I would appreciate reverting back to the silent fails in background.

janulicny avatar Oct 15 '20 13:10 janulicny

@errissa could you have a look at this issue?

germanros1987 avatar Nov 03 '20 00:11 germanros1987

@janulicny We deliberately changed error logging to throw an exception if the severity is high enough which is why your script no longer continues past the first error. I will investigate if the error could safely be reported as a warning instead.

errissa avatar Nov 03 '20 15:11 errissa

@janulicny Please try latest master. GLFW errors are now logged as warnings so they don't force the program to quit.

errissa avatar Nov 05 '20 01:11 errissa