step-examples/12-8-mixed/M060.stp
Sources
- OCCT STEPControl_ActorWrite.cxx:1359 (external references) (uncovered class evidence)
Sender
deduced — OCCT uncovered-class sweep
Description
An assembly references an external STEP file via a `DOCUMENT_FILE` link, but the resolved path equals the main file's path. The reader recurses into itself. Bug-reporter language: "external reference loops", "self-reference STEP", "external file is same as main".
Reproducer recipe
A `DOCUMENT_FILE` whose `id` points back at the file's own filename.
Expected kernel behavior
Detect identity and skip with warning; or treat as a no-op reference.
Notes
Synonyms: "STEP self-reference loop", "external reference loops", "external file is same as main", "DOCUMENT_FILE points to self". **See also**: A012, Ad052.
Expected validation
occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a
Byte assertions
contains(b'DOCUMENT_FILE')contains(b"'M060.stp'")
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* M060: GEOMETRIC_CURVE_SET in file with DOCUMENT_FILE whose id points back at the main file's own name ('M060.stp') â external reference self-loop; input: AP242 STEP file where DOCUMENT_FILE references a path equal to the file's own filename, causing a reader that resolves external references to recurse into itself; the self-reference creates an infinite-recursion or cycle-detection scenario; conformant readers must detect the identity and skip with a warning, or treat as a no-op reference; silently following the link is a bug (infinite loop or stack overflow); OCC silently accepts (no diagnostic, empty result); GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty; synonyms: STEP self-reference loop, external reference loops, external file is same as main, DOCUMENT_FILE points to self */ 3HEADER; 4FILE_DESCRIPTION(('M060'),'2;1'); 5FILE_NAME('M060.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { 1 0 10303 442 1 1 4 }')); 7ENDSEC; 8DATA; 9#9000=APPLICATION_CONTEXT('mechanical design'); 10#1=APPLICATION_CONTEXT('mechanical design'); 11#2=DOCUMENT_FILE('M060.stp','self-referencing external link',#1,'step_physical_file'); 12#3=DOCUMENT('doc_001','Self-reference document','',(#2)); 13#4=DOCUMENT_REFERENCE(#3,#2,'self-ref-link'); 14#5=CARTESIAN_POINT('origin',(0.,0.,0.)); 15#6=DIRECTION('z_axis',(0.,0.,1.)); 16#7=DIRECTION('x_axis',(1.,0.,0.)); 17#8=AXIS2_PLACEMENT_3D('ref_placement',#5,#6,#7); 18#9=DIRECTION('line_dir',(1.,0.,0.)); 19#10=VECTOR(#9,10.); 20#11=LINE('ref_edge',#5,#10); 21#12=GEOMETRIC_CURVE_SET('external-reference-self-loop-document-file',(#2,#3,#4,#11,#8)); 22#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 23#9051=PRODUCT('M060','M060','',(#9050)); 24#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 25#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 26#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 27#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 28#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 29#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 30#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 31#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 32#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 33#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#12),#9060); 34#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 35ENDSEC; 36END-ISO-10303-21;