sanity_check_attributes bodies are mostly empty across visuals
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- computer-graphics
Research direction
Start by auditing the listed sanity_check_attributes and sanity_check_attributes_buffer methods across gsp/visuals, gsp/geometry, gsp/materials, and gsp/core, beginning with the pass implementations and shallow Buffer checks. Use the existing rgba8 enforcement in gsp/materials/mesh_basic_material.py and the related #20 Bug 6 context as reference. Done means each class has defined BufferType, count, and applicable shape or range validation that fails clearly at construction or the buffer boundary.
Written by the indexing model from the issue text.
Description
Short tracking issue — most sanity_check_attributes / sanity_check_attributes_buffer static methods across the visuals/geometry/material/texture classes are either pass or limited to isinstance(x, Buffer) checks. As a result, malformed input (wrong dtype, wrong shape, mismatched counts) crashes deep in numpy at render time instead of failing clearly at construction or at the buffer boundary.
Audit (as of mesh_ng):
gsp/visuals/mesh.py—sanity_check_attributesispass;_bufferform only delegates.gsp/visuals/markers.py— bothpass.gsp/visuals/paths.py— bothpass.gsp/geometry/mesh_geometry.py— bothpass.gsp/visuals/pixels.py,points.py,segments.py,texts.py—_bufferonly has shallowisinstance(_, Buffer)checks; no shape/dtype/count validation.gsp/visuals/image.py,gsp/core/texture.py— partial type checks only.gsp/materials/mesh_basic_material.py—_buffernow enforces rgba8 on face/edge colors (#20 Bug 5); the non-buffer form is stillpass.
What good would look like (per class):
- Buffer
BufferTypematches the expected encoding (e.g. positions →vec3, indices →uint32, colors →rgba8). - Buffer count consistency between related attributes (e.g. material color count ∈ {1, vertex_count, face_count}).
- Optionally O(N) range checks (e.g.
max(indices) < vertex_count) at the buffer boundary.
Related: this is the larger Bug 6 from #20, broadened beyond Mesh.
This is just a placeholder to come back to — no fix scoped yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vispy/GSP_API
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stephrobert/dsoxlab#238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
sublimehq/package_control#1780 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nwg-piotr/nwg-displays#145 ·