Skip to content

Every R14 INSERT and DIMENSION record errors on the public corpus #227

Closed

Description

@DrunkOnJava

Finding

On ACadSharp's R14 save (sample_AC1014.dwg, AutoCAD 2025 SAVEAS "LT98", pinned by #225) every INSERT and every DIMENSION record errors, along with a 3DFACE. The nextgis R14 drawings hold none of these types, so R14 had never measured them.

Type Records erroring on R14 Same records on R2000 and later
INSERT (§20.4.9) 12 close
DIMENSION LINEAR (§20.4.24) 3 close
DIMENSION ALIGNED (§20.4.25) 2 close
DIMENSION ORDINATE (§20.4.23) 2 close
DIMENSION ANG 3PT (§20.4.26) 1 close
DIMENSION ANG 2LN (§20.4.27) 1 close
DIMENSION RADIUS (§20.4.28) 1 close
DIMENSION DIAMETER (§20.4.29) 1 close
3DFACE (§20.4.32) 1 close

All seven dimension types failing together points at the R13/R14 branch of the common dimension data (§20.4.22) or the R13/R14 entity prefix they share with INSERT; the spec's R13-R14-only fields in those tables are the first place to look.

Evidence: Measure run 40297255178 on #225; tools/corpus/baseline.tsv row sample_AC1014.dwg (676 decoded / 461 skipped / 105 errored).

Reproduce: python3 -I tools/corpus/fetch.py --dest ../dwg-corpus, then cargo run --release --example probe_decode_errors -- ../dwg-corpus/acadsharp/sample_AC1014.dwg.

Families: #141, #144, #145.

Activity

  1. added
    type:bug
    area:entities
    area:corpus
    release:R14
    priority:P1
    on Oct 26, 2026
  2. DrunkOnJava commented on Oct 26, 2026

    @DrunkOnJava
    OwnerAuthor

    The spec's own R14 examples reproduce this with no corpus file and pin the causes (#107: cargo run --release --example spec_examples, rows of tests/fixtures/spec-examples/r14-objects.tsv; every dump's printed CRC verifies):

    Spec example The crate §20.4's own R13-R14 list on the same bytes
    §20.4.9.1 INSERT (p113) cursor exhausted closes
    §20.4.23.1 DIMENSION ORDINATE (p122) cursor exhausted closes
    §20.4.24.1 LINEAR (p123), §20.4.25.1 ALIGNED (p124), §20.4.26.1 ANGULAR 3-PT (p125), §20.4.29.1 DIAMETER (p127) reserved 11 in a BD closes
    §20.4.28.1 RADIUS (p126) reserved 11 in a BD closes only with one more BD (below)
    §20.4.32.1 3DFACE (p129) delta -68 closes
    • INSERT: entities::insert::decode reads the R2000+ BB data flags and RD/DD scale on R14, where §20.4.9 gives R13-R14 three BD scales. MINSERT (§20.4.10) has no decoder; its example closes on the same R13-R14 list plus BS columns, BS rows and two BD spacings.
    • DIMENSION: dimension::read_common_with_strings reads Attachment Point BS, Linespacing Style BS, Linespacing Factor BD and Actual Measurement BD on every release; §20.4.22 gives them to R2000+ only.
    • RADIUS: §20.4.28 lists only the 10 and 15 points, but its example closes only with a BD leader length after them (0.0 here), the field §20.4.29 prints for DIAMETER. The spec's worked examples as fixtures #107's PR records it as a spec erratum.
    • 3DFACE: three_d_face::decode has only the R2000+ layout (two B, RD, DD). §20.4.32's R13-R14 list is four 3BD corners and a BS invisible-edge flag, and the example closes on it: corners (8.921, 2.352, 0), (10.325, 4.077, 0), (11.082, 1.930, 0), (9.021, 1.434, 0), flag 0.

    A fix should flip these rows' expect cells from error #227 to closes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corpusarea:entitiespriority:P1release:R14type:bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions