-
Notifications
You must be signed in to change notification settings - Fork 196
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
polyscope in jupyter notebooks crashes python #57
Comments
Hi, thanks for checking out the library and the report! I've haven't seen this issue on my end, but I'll try to reproduce it. Did you install via I think soon I'll push a new minor version which adds a runtime options to include some debugging checks, which will help us get to the bottom of these issues more quickly. |
I installed via pip, but into a conda environment (python 3.7). I may try to uninstall the pip version and use conda instead. I am not sure how to get a stack trace from within jupyter, but I am happy to help test your new minor release on windows and report back. |
I just discovered polyscope, and it's really awesome. Great work @nmwsharp! Unfortunately, I'm running into the same problem that @mhogg hit. When invoking polyscope from a Python shell (or IPython shell, or Jupyter notebook), attempting to close the polyscope GUI (by hitting the 'x' button) crashes the Python process. Specifically, the GUI freezes, I'm forced to force quit it, and Python is killed. I'm using Ubuntu 20.10, Python 3.8.6. Here's a minimum-working example.
Any idea what might be happening? I'm building a library that relies heavily on visualizing point clouds, and I'd love to be able to recommend polyscope to my users. The only thing stopping me is this particular issue. Thanks again for your awesome work! |
Ah, thank you for raising this again. I looked in to it before but could not find a solution and eventually got distracted. I'm not an experienced IPython/Jupyter programmer myself, but I certainly why this is an issue! I will look in to it again and see if I can find some fix or workaround. I'm a little surprised to hear that this also arises from a plain old Python shell in Ubuntu, since I use Polyscope there fairly often. Note that the current behavior of Polyscope is that the Is this what you are seeing? Or is it really that the prompt and GUI window are both simultaneously unresponsive after closing the window? I realize that this behavior is potentially confusing; if this is what's happening perhaps we just need to communicate it more clearly to the user. |
Thanks for the quick response!
You're totally right. This is in fact what is happening. The GUI does become unresponsive, and control is returned to the Python/IPython shell. I guess this is a bit confusing because after a few seconds, a dialog box opens up asking whether I'd like to force quit the GUI. It's the force quit that causes Python to crash. So I suppose the solution is simply to choose "wait" instead.
Yes, I think that might be helpful. At least, you'd have fewer people opening issues about this behavior :) |
Yes, totally agree. I will see if I can change this behavior in the python bindings, or at least make it more intuitive. (due to the death of TravisCI, my workflow for deploying Python versions is broken 😢 this may delay the rollout of an updated version while I sort that out on Github Actions or something) |
Ok. I just pushed some updates that address this in C++ and Python (Python version 0.1.5, already on pip and percolating to conda soon). Now, clicking the close button will actually close the window, so the OS doesn't angry and users get clear visual feedback. It's still true that when you call I also confirmed that Polyscope is usable in Jupyter notebooks in its current form, at least when the kernel is running locally. I'm closing this as fixed. However, if you still have lingering issues/crashes related to this feel free to reopen. |
I realize this issue is closed, but just wanted to add that v0.1.6 fixes the issue I had on Windows 10 where Polyscope crashed the Jupyter notebook kernel when its window was closed. Thanks! |
Glad to hear it! Please reach out again if you encounter other issues. |
Hi,
I just tried polyscope within python on Windows using the ipython terminal, jupyter notebook and jupyter lab. In all cases, polyscope works well and is quite impressive. But when I try to close the polyscope window, it always crashes python. Are there any settings I can change to address this? I am assuming it is related to the opengl backend, yes?
Cheers,
Michael
The text was updated successfully, but these errors were encountered: