Wr015 — Duplicate `#N` instance numbers in the same DATA section

§12.13 writer-pathology (sub-class: instance numbering)

P2 — spec deviation (no data loss)

writer

Sources

Sender

Writers with broken counter logic when emitting multi-section or multi-pass files (collision between sections or passes)

Description

Two entities in the same DATA section share the same `#N`. Spec violation. Receivers diverge: first-wins, last-wins, both-loaded-and-randomly-resolved, reject. Bug-reporter language: "duplicate #5", "same instance number twice", "STEP file has collision".

Reproducer recipe

`#10 = CARTESIAN_POINT('a',(0.,0.,0.));` and later `#10 = CARTESIAN_POINT('b',(1.,1.,1.));` in the same DATA section.

Expected kernel behavior

reject as malformed; spec mandates unique instance numbers per DATA section. Document the resolution policy if the kernel chooses tolerant first-wins / last-wins.

Notes

Lh010-class.

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

Lh010

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Wr015: two entities share instance number #10 in the same DATA section */
3HEADER;
4FILE_DESCRIPTION(('Wr015 - duplicate instance number in DATA section'),'2;1');
5FILE_NAME('Wr015.stp','2026-06-20T00:00:00',('auto-generated'),(''),
6  'auto-generated','','');
7FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
8ENDSEC;
9DATA;
10/* Defect: #10 appears twice — duplicate instance number, spec violation */
11#1=DIRECTION('zdir',(0.,0.,1.));
12#2=DIRECTION('xdir',(1.,0.,0.));
13#5=CARTESIAN_POINT('ref-point',(0.5,0.5,0.));
14/* First definition of #10 */
15#10=CARTESIAN_POINT('a',(0.,0.,0.));
16#11=CARTESIAN_POINT('p1',(1.,0.,0.));
17#12=CARTESIAN_POINT('p2',(0.,1.,0.));
18/* Second definition of #10 — duplicate, spec violation */
19#10=CARTESIAN_POINT('b',(1.,1.,1.));
20#20=GEOMETRIC_CURVE_SET('dup-id',(#5,#11,#12));
21ENDSEC;
22END-ISO-10303-21;