step-examples/12-2b-nurbs/Gn004.stp
Sources
- 08-occt-gitlog.md (G022 / G039, Mantis 0029478, OCCT 5dd92c3)
Description
Complex entity `(BOUNDED_SURFACE() B_SPLINE_SURFACE() B_SPLINE_SURFACE_WITH_KNOTS() … RATIONAL_B_SPLINE_SURFACE())` carries empty `KNOTS()` / `KNOT_MULTIPLICITIES()` lists or empty `name`. Reader null-derefs.
Reproducer recipe
A complex rational BSpline surface entity with `''` name and empty `KNOTS(())` aggregates.
Expected kernel behavior
reject the surface and skip the host face; emit a per-entity diagnostic; never crash the read.
Notes
Cross-oracle: pure-Python Part-21 validator accepts (`accept`); OCCT crashes (`signal(11)`). The crash is on the kernel side; the file is spec-conformant Part-21. **OCC behavior**: crashes (signal 11) on the empty knots/multiplicities; exactly the kernel mishandling the catalog above forbids; documented here so kernel authors know this is what OCC currently does. Synonyms: "complex BSpline surface entity with empty knots", "rational B-spline surface empty multiplicities crashes reader", "complex entity null-derefs on empty knot list", "empty KNOTS aggregate in BSpline surface complex instance", "B-spline surface with no knots crashes import".
Expected validation
occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a
Byte assertions
contains(b'B_SPLINE_SURFACE')
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Gn004: Complex rational BSpline surface entity with empty knot/multiplicity lists and an empty name; OCCT readers null-deref'd (Mantis 0029478, commit 5dd92c3); reject the surface and skip the host face; emit per-entity diagnostic; never crash; 4x4 control net present but surface declaration has empty KNOTS()/mults and '' name */ 3HEADER; 4FILE_DESCRIPTION(('Gn004'),'2;1'); 5FILE_NAME('Gn004.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 10#2=CARTESIAN_POINT('',(0.0,1.0,0.0)); 11#3=CARTESIAN_POINT('',(0.0,2.0,0.0)); 12#4=CARTESIAN_POINT('',(0.0,3.0,0.0)); 13#5=CARTESIAN_POINT('',(1.0,0.0,0.3)); 14#6=CARTESIAN_POINT('',(1.0,1.0,0.2)); 15#7=CARTESIAN_POINT('',(1.0,2.0,0.1)); 16#8=CARTESIAN_POINT('',(1.0,3.0,0.0)); 17#9=CARTESIAN_POINT('',(2.0,0.0,0.6)); 18#10=CARTESIAN_POINT('',(2.0,1.0,0.4)); 19#11=CARTESIAN_POINT('',(2.0,2.0,0.2)); 20#12=CARTESIAN_POINT('',(2.0,3.0,0.0)); 21#13=CARTESIAN_POINT('',(3.0,0.0,0.9)); 22#14=CARTESIAN_POINT('',(3.0,1.0,0.6)); 23#15=CARTESIAN_POINT('',(3.0,2.0,0.3)); 24#16=CARTESIAN_POINT('',(3.0,3.0,0.0)); 25#17=( 26 BOUNDED_SURFACE() 27 B_SPLINE_SURFACE(3,3,((#1,#2,#3,#4),(#5,#6,#7,#8),(#9,#10,#11,#12),(#13,#14,#15,#16)),.UNSPECIFIED.,.F.,.F.,.F.) 28 B_SPLINE_SURFACE_WITH_KNOTS((),(),(),(),.UNSPECIFIED.) 29 GEOMETRIC_REPRESENTATION_ITEM() 30 RATIONAL_B_SPLINE_SURFACE(((1.,1.,1.,1.),(1.,1.,1.,1.),(1.,1.,1.,1.),(1.,1.,1.,1.))) 31 REPRESENTATION_ITEM('') 32 SURFACE() 33); 34ENDSEC; 35END-ISO-10303-21;