Comments (9)
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 polyscope.show()
, the function blocks and does not return until you close the GUI. Changing this would require a fundamental architectural change. However, hopefully with GUI closing like a normal window it will be more clear to users.
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.
from polyscope.
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!
from polyscope.
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 pip
or conda
? Any chance you could collect a stack trace for the crash? (don't actually know how best to get a stack trace on Windows).
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.
from polyscope.
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.
from polyscope.
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.
Python 3.8.6 (default, Sep 25 2020, 09:36:53)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import polyscope as ps
>>> import numpy as np
>>>
>>> try:
... ps.init()
... except:
... pass
...
[polyscope] Backend: openGL3_glfw -- Loaded openGL version: 3.3.0 NVIDIA 450.80.02
>>> # generate some points
>>> points = np.random.rand(100, 3)
>>>
>>> # visualize!
>>> ps_cloud = ps.register_point_cloud("my points", points)
>>> ps.show()
>>> Killed
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!
from polyscope.
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 show()
function blocks while the GUI is interactive. Then once you close the window the show()
function returns and the prompt becomes usable again, and the GUI window sits there unresponsive until you call show()
the next time.
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.
from polyscope.
Thanks for the quick response!
Note that the current behavior of Polyscope is that the show() function blocks while the GUI is interactive. Then once you close the window the show() function returns and the prompt becomes usable again, and the GUI window sits there unresponsive until you call show() the next time.
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.
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.
Yes, I think that might be helpful. At least, you'd have fewer people opening issues about this behavior :)
from polyscope.
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)
from polyscope.
Glad to hear it! Please reach out again if you encounter other issues.
from polyscope.
Related Issues (20)
- Help! The directory "glfw" in the subdirectory"deps" is empty HOT 4
- Volume Grid Marching Cube gives a rotated result HOT 1
- Issues building on GCC 13 and modern Clang (15+) HOT 2
- Count Quantities disappeared? HOT 2
- Random crashes with `ValueError: Attribute a_vertexNormals has no buffer attached` HOT 5
- Add scene bounding box HOT 1
- Is there a documented account of how to access picking? HOT 5
- Coloring individual elements of a quantity/mesh HOT 2
- Surface Face Graph has been removed?
- Give the user a flag to temporarily disable Polyscope's built-in mouse click/drag, for creating custom UIs
- Subplots support HOT 2
- Overlaying Mouse-Drawn Sketches on 3D Objects HOT 2
- `screen_coords_to_world_pos` and SSAA
- Update vertex positions when structure is translated with the gizmo? (handling multiple structures) HOT 4
- Example ps.error not working in python
- Addjusting the normal
- Addition to callbacks & custom UIs - Python
- Add feature to 'parent' a structure's transform to another structure, to keep associated structures aligned.
- set_autoscale_structures sets incorrect scale
- Rotate/zoom around selected element
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polyscope.