Ad119 — "Unknown ENTITY type" warning is not a hard failure (presentation subgraph silently dropped, BRL-CAD step-g)

§12.11 adversarial / parser-robustness (sub-class: warn-without-fail dispatch)

P2 — spec deviation (no data loss)

spec-violation adversarial

Sources

Sender

CATIA V5/V6, NX, and Inventor exports of AP203/AP214 files where the geometric subgraph and the presentation subgraph (STYLED_ITEM, PRESENTATION_STYLE_ASSIGNMENT, SURFACE_STYLE_USAGE, SURFACE_SIDE_STYLE, SURFACE_STYLE_FILL_AREA, FILL_AREA_STYLE, FILL_AREA_STYLE_COLOUR, COLOUR_RGB, PRESENTATION_LAYER_ASSIGNMENT, MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION) coexist.

Description

When `step-g` encounters an entity its STEPcode-generated dispatcher does not recognise, it prints `Unknown ENTITY type <name>` once per instance to stderr, marks the instance as load-failed in `entity_status`, and then completes the import; the geometric subgraph is unaffected, but every colour/layer/style assignment is silently discarded. The user only notices the lost appearance after the converted .g file is rendered. In versions ≤ 7.18.4 the same dispatch path additionally tripped a glibc malloc-corruption abort (bug #291) during cleanup of the partially-loaded styled items; the warn-without-fail pattern coexisted with a latent double-free. Distinct from Ad117 (specific crash on dangling STYLED_ITEM ref) by being the umbrella "unknown entity is silently skipped" defect that drops the entire presentation subgraph at once.

Reproducer recipe

AP203 file containing `MANIFOLD_SOLID_BREP` plus `COLOUR_RGB` → `FILL_AREA_STYLE_COLOUR` → `FILL_AREA_STYLE` → `SURFACE_STYLE_FILL_AREA` → `SURFACE_SIDE_STYLE` → `SURFACE_STYLE_USAGE` → `PRESENTATION_STYLE_ASSIGNMENT` → `STYLED_ITEM` → `PRESENTATION_LAYER_ASSIGNMENT` → `MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION`. step-g prints nine `Unknown ENTITY type` warnings and produces a colourless .g file.

Expected kernel behavior

reject; when an unknown entity type is referenced by a known consumer (e.g. `MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION` references `STYLED_ITEM` references unresolved style), the importer must either (a) implement the presentation subgraph or (b) raise `E_UNKNOWN_PRESENTATION_ENTITY` so the caller knows colour/layer information has been lost.

Notes

**See also**: Ad117, M039, A103. Synonyms: "Unknown ENTITY type STYLED_ITEM", "BRL-CAD step-g warns then drops presentation subgraph", "MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION skipped silently", "SourceForge brlcad bug 291 unknown entity type", "SourceForge brlcad bug 332 mdgpr presentation lost", "STEPcode dispatcher unknown entity warn-and-skip".

Expected validation

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

Byte assertions

Tier-3 assertions

Cross-references

Ad117, M039, A103

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Ad119 - "Unknown ENTITY type" warning is not a hard failure
3   Defect: BRL-CAD step-g (and several other STEPcode-based readers)
4   when handed a CATIA AP203 file containing presentation entities
5   (STYLED_ITEM, PRESENTATION_STYLE_ASSIGNMENT, SURFACE_STYLE_USAGE,
6   SURFACE_SIDE_STYLE, SURFACE_STYLE_FILL_AREA, FILL_AREA_STYLE,
7   FILL_AREA_STYLE_COLOUR, COLOUR_RGB, PRESENTATION_LAYER_ASSIGNMENT,
8   MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION) prints
9   "Unknown ENTITY type <name>" once per entity to stderr, marks the
10   instances as load-failed, but completes the import.  The geometry
11   imports cleanly; the user only notices the lost colour/layer/style
12   information after the file is converted and rendered.  In versions
13   <= 7.18.4 the same dispatch path additionally tripped a glibc malloc
14   corruption abort during cleanup (sourceforge bug 291) - the
15   warning-without-failure pattern coexisted with a latent
16   double-free.  Distinct from Ad117 (specific crash on dangling
17   STYLED_ITEM ref) by being the umbrella "unknown entity is silently
18   skipped" defect that covers the whole presentation subgraph at once.
19   Sources: SourceForge BRL-CAD bug #291 (CATIA V5R19 AP203 file -
20   "Unknown ENTITY type" + glibc malloc corruption) and bug #332
21   (mdgpr.step minimal repro - 11 unknown entities printed, geometry
22   loads cleanly, all presentation data lost). */
23HEADER;
24FILE_DESCRIPTION(
25  ('Ad119 - presentation entities silently dropped with Unknown ENTITY warning'),
26  '2;1');
27FILE_NAME('Ad119.stp','2026-05-02T00:00:00',('cad-research-suite'),(''),
28  'cad-research-suite','','');
29FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
30ENDSEC;
31DATA;
32/* Minimal MANIFOLD_SOLID_BREP carrier: a single point so the file has
33   *some* geometry to anchor presentation entities to.  Real-world
34   reproducer would be a full cube; the defect class is the same. */
35#10=CARTESIAN_POINT('o',(0.0,0.0,0.0));
36#11=DIRECTION('',(1.0,0.0,0.0));
37#12=DIRECTION('',(0.0,0.0,1.0));
38#13=AXIS2_PLACEMENT_3D('axis',#10,#12,#11);
39/* Defect: the entire presentation subgraph that step-g warns about then
40   silently drops. */
41#100=COLOUR_RGB('red',1.0,0.0,0.0);
42#101=FILL_AREA_STYLE_COLOUR('',#100);
43#102=FILL_AREA_STYLE('',(#101));
44#103=SURFACE_STYLE_FILL_AREA(#102);
45#104=SURFACE_SIDE_STYLE('',(#103));
46#105=SURFACE_STYLE_USAGE(.BOTH.,#104);
47#106=PRESENTATION_STYLE_ASSIGNMENT((#105));
48#107=STYLED_ITEM('',(#106),#13);
49#108=PRESENTATION_LAYER_ASSIGNMENT('layer_red','',(#107));
50#109=MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION(
51  'mdgpr_root',(#107),#13);
52ENDSEC;
53END-ISO-10303-21;