Tracks id not displaying
See original GitHub issue🐛 Bug
There is an unanswered question on the image.sc forum about track IDs not displaying. Indeed, when using the simple example from the docs, the IDs cannot be displayed and an error appears in the terminal which seems related to something deeper in vispy.
To Reproduce
- Run the demo code:
import napari
from skimage import data
hubble_image = data.hubble_deep_field()
tracks_data = [
[1, 0, 236, 0],
[1, 1, 236, 100],
[1, 2, 236, 200],
[1, 3, 236, 500],
[1, 4, 236, 1000],
[2, 0, 436, 0],
[2, 1, 436, 100],
[2, 2, 436, 200],
[2, 3, 436, 500],
[2, 4, 436, 1000],
[3, 0, 636, 0],
[3, 1, 636, 100],
[3, 2, 636, 200],
[3, 3, 636, 500],
[3, 4, 636, 1000]
]
viewer = napari.view_image(hubble_image, name='image')
viewer.add_tracks(tracks_data, name='tracks')
- Try to activate the track IDs through the tick box. No IDs are displayed.
This is the error trace that appears in the terminal (but doesn’t make napari crash):
Traceback (most recent call last):
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/app/backends/_qt.py", line 897, in paintGL
self._vispy_canvas.events.draw(region=None)
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/util/event.py", line 453, in __call__
self._invoke_callback(cb, event)
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/util/event.py", line 471, in _invoke_callback
_handle_exception(self.ignore_callback_errors,
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/util/event.py", line 469, in _invoke_callback
cb(event)
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/scene/canvas.py", line 218, in on_draw
self._draw_scene()
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/scene/canvas.py", line 277, in _draw_scene
self.draw_visual(self.scene)
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/scene/canvas.py", line 315, in draw_visual
node.draw()
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/scene/visuals.py", line 99, in draw
self._visual_superclass.draw(self)
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/visuals/visual.py", line 605, in draw
v.draw()
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/scene/visuals.py", line 99, in draw
self._visual_superclass.draw(self)
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/visuals/visual.py", line 451, in draw
self._program.draw(self._vshare.draw_mode,
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/visuals/shaders/program.py", line 102, in draw
Program.draw(self, *args, **kwargs)
File "/Users/gw18g940/miniconda3/envs/napari-tutorial/lib/python3.9/site-packages/vispy/gloo/program.py", line 498, in draw
raise RuntimeError('All attributes must have the same size, got:\n'
RuntimeError: All attributes must have the same size, got:
<VertexBuffer size=15 last_dim=1>: 15
<VertexBuffer size=48 last_dim=4>: 48
<DataBufferView on <VertexBuffer size=48 last_dim=None> at offset=0 size=48>: 48
<DataBufferView on <VertexBuffer size=48 last_dim=None> at offset=8 size=48>: 48
<VertexBuffer size=48 last_dim=1>: 48
<VertexBuffer size=48 last_dim=3>: 48
Expected behavior
There’s little documentation about the show ID
feature (it’s never used in the documentation) but from discussions in the PR implementing the layer, it looks like it should display the IDs.
Environment
napari: 0.4.12
Platform: macOS-10.15.7-x86_64-i386-64bit
System: MacOS 10.15.7
Python: 3.9.7 (default, Sep 16 2021, 08:50:36) [Clang 10.0.0 ]
Qt: 5.15.2
PyQt5: 5.15.6
NumPy: 1.20.3
SciPy: 1.7.2
Dask: 2021.11.1
VisPy: 0.9.3
OpenGL:
- GL version: 2.1 INTEL-14.7.20
- MAX_TEXTURE_SIZE: 16384
Screens:
- screen 1: resolution 1440x900, scale 2.0
Plugins:
- cellpose-napari: 0.1.4
- console: 0.0.4
- scikit-image: 0.4.12
- svg: 0.1.5
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Tracks Not Showing in MapShare or Garmin Explore Website
MapShare and the Garmin Explore website can display tracks uploaded by an active inReach device. If you are not seeing tracks when you...
Read more >'No tracks to display' | WordPress.org
I have a track in Manage tracks. It's ID is '4' (this is the fourth route I have exported from my phone). User...
Read more >Anyone know how to fix tracks not showing : r/theHunter - Reddit
Best way to fix tracks not showing = drop animal on the spot. No tracking required. Lol No seriously tho, it's a bug...
Read more >Track I.D / song information not displaying over Bluetooth.
Track I.D / song information not displaying over Bluetooth. ... YouTube shows the track info over Bluetooth, just not the music app. Same...
Read more >Logic Pro X Tracks not visible - Apple Community
Logic Pro X Tracks not visible. Why are the audio tracks in my Logic Pro X project no longer visible and how can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Nope, doesn’t work, you’re right. I reverted to using two instances.
I just had chance to try
git-bisect
on this, usingexamples/tracks_3d_with_graph.py
. The bad commit is:so it looks like something got broken during the vispy module cleanup.