Ip021 — Non-finite (NaN) value in a vertex COLOR channel is silently clamped to zero

§12.15 import-format parser robustness (sub-class: non-finite-attribute-channel)

P3 — cosmetic / metadata-only

topology

Sources

Description

An OBJ extended vertex line (`v x y z r g b`) carries a finite position but a `NaN` in the trailing color triple. The geometry itself is fine; the attribute is poison. Distinct from the corpus's existing `Me*` `non_finite_coordinate` class, which covers only the position channel — a non-finite value in a non-position (color) attribute is unrepresented.

Reproducer recipe

three extended `v x y z r g b` lines, the third of which carries `nan` in its red-channel slot, followed by a triangular face referencing all three.

Expected kernel behavior

detect and reject or clamp non-finite attribute values with a diagnostic identifying the offending vertex/channel; a silent float→int cast of NaN is undefined/implementation-specific behavior and must not be relied upon.

Notes

Cross-oracle: trimesh 4.12.2 loads without error and silently clamps the NaN channel to 0 via an explicit step in `visual/color.py::to_rgba` (`colors[~np.isfinite(colors)] = 0.0`) before scaling to `uint8` — the third vertex's color decodes to `[0, 0, 255, 255]` (NaN silently became 0, not a diagnostic) — verified 2026-07-17. No exception, no warning; the deliberate clamp proves the class is real and must be handled explicitly, since a naive `float64.astype(uint8)` cast of NaN is undefined behavior in general. Synonyms: "OBJ non-finite vertex color", "NaN in color channel", "poisoned attribute silently clamped", "non-finite attribute vs non-finite position". Provenance tier: bytes-only.

Expected validation

Provenance tier

bytes-only — defect not fully embodied in fixture bytes.

Byte assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1v 0.0 0.0 0.0 1.0 0.0 0.0
2v 1.0 0.0 0.0 0.0 1.0 0.0
3v 0.0 1.0 0.0 nan 0.0 1.0
4f 1 2 3