-
-
Notifications
You must be signed in to change notification settings - Fork 411
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding more than 1024 points causes the 3D viewer to crash. #932
Comments
This looks like a relatively straight forward bug with our thumbnail generation Traceback (most recent call last):
File "/Users/nsofroniew/GitHub/napari/napari/_qt/qt_viewer_buttons.py", line 154, in change_ndisplay
self.viewer.dims.ndisplay = 3
File "/Users/nsofroniew/GitHub/napari/napari/components/dims.py", line 296, in ndisplay
self.events.ndisplay()
File "/Users/nsofroniew/GitHub/napari/napari/utils/event.py", line 508, in __call__
self._invoke_callback(cb, event)
File "/Users/nsofroniew/GitHub/napari/napari/utils/event.py", line 529, in _invoke_callback
cb_event=(cb, event),
File "/Users/nsofroniew/GitHub/napari/napari/utils/event.py", line 523, in _invoke_callback
cb(event)
File "/Users/nsofroniew/GitHub/napari/napari/components/viewer_model.py", line 400, in _update_layers
layer.dims.ndisplay = self.dims.ndisplay
File "/Users/nsofroniew/GitHub/napari/napari/components/dims.py", line 296, in ndisplay
self.events.ndisplay()
File "/Users/nsofroniew/GitHub/napari/napari/utils/event.py", line 508, in __call__
self._invoke_callback(cb, event)
File "/Users/nsofroniew/GitHub/napari/napari/utils/event.py", line 529, in _invoke_callback
cb_event=(cb, event),
File "/Users/nsofroniew/GitHub/napari/napari/utils/event.py", line 523, in _invoke_callback
cb(event)
File "/Users/nsofroniew/GitHub/napari/napari/layers/base/base.py", line 383, in _update_dims
self.refresh()
File "/Users/nsofroniew/GitHub/napari/napari/layers/base/base.py", line 602, in refresh
self._update_thumbnail()
File "/Users/nsofroniew/GitHub/napari/napari/layers/points/points.py", line 1322, in _update_thumbnail
colormapped[coords[:, 0], coords[:, 1]] = colors
ValueError: shape mismatch: value array of shape (1025,4) could not be broadcast to indexing result of shape (1024,4) determined by our usage of a max number of points to use for thumbnail generation - https://github.com/napari/napari/blob/master/napari/layers/points/points.py#L205 @kevinyamauchi can you take on fixing this? |
Thanks for the follow-up and link to the code. Next time I run into a bug like this I will try and take the time to fix it before posting. |
No worries! I really appreciate you flagging the bug. I am happy to make a fix today! |
@cudmore you're also more than welcome to post bugs right away, ask for pointers, and then try and fix them yourself - no need to struggle alone first!! |
馃悰 Bug
Napari crashes if I add more than 1024 3D points and switch to the 3D view. It also crashes with more than 1024 points if I explicit start up Napari with the 3D view.
To Reproduce
Environment
MacOS 10.14.3
Python 3.7.2
Napari 0.2.11
napari: 0.2.11
Platform: Darwin-18.2.0-x86_64-i386-64bit
Python: 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43) [Clang 6.0 (clang-600.0.57)]
Qt: 5.13.0
PyQt5: 5.13.0
VisPy: 0.6.4
NumPy: 1.16.4
SciPy: 1.2.1
scikit-image: 0.15.0
Dask: 2.7.0
GL version: 2.1 INTEL-12.4.7
MAX_TEXTURE_SIZE: 16384
The text was updated successfully, but these errors were encountered: