Skip to content

VIEW reads its view mode as a BS before R2007 where §20.4.60 gives four bits #256

Closed

Description

@DrunkOnJava

Spec: §20.4.60 VIEW: View mode X 71, 4 bits: 0123 (0: 71 bit 1, 1: 71 bit 2, 2: 71 bit 4, 3: OPPOSITE of 71 bit 16), the same encoding as VPORT's (§20.4.64).

tables::view::decode (the pre-R2007 path) reads it as a BS (view.rs, let view_mode = c.read_bs()?), while the R2007+ split-stream path reads the four bits. A BS is 2 to 18 bits, not 4, so everything after it on R2000/R2004 is read from the wrong place: the ACadSharp sample_AC1015 and sample_AC1018 VIEW records error with "Reserved bit pattern "11" encountered in BD" (found while pairing them with AutoCAD's DXF export, #99). On R2007+ the value is surfaced as the raw four bits rather than the group-71 value; #238 converts VPORT's the way §20.4.64 prescribes and VIEW should match.

Acceptance

  • Both paths read the four bits and surface the DXF 71 value; the R2000/R2004 VIEW records decode
  • A VIEW scorer in examples/dxf_oracle shows every VIEW field equal to the export on every release

Activity

  1. added
    type:bug
    area:tables
    area:oracle
    priority:P2
    on Oct 26, 2026
  2. DrunkOnJava commented on Oct 26, 2026

    @DrunkOnJava
    OwnerAuthor

    Layout part: the PR above reads the pre-R2007 record per §20.4.60; the R14/R2000/R2004 VIEWs now close and every surfaced field equals the export. Still open here: (1) surfacing view_mode as group 71 for VIEW (after #238 lands, share its conversion); (2) the entry-header bits on R2013/R2018: VIEW's single record on each carries the clear bit first, as R2007/R2010 records do, while every other table type on R2013/R2018 carries it second (#235), so after #235 VIEW's is_xref_dependent reads true on those two records against the export's clear bit 16. Two records cannot say whether that is a per-type order or a misread prefix bit on R2013+ VIEW.

  3. DrunkOnJava commented on Oct 26, 2026

    @DrunkOnJava
    OwnerAuthor

    §20.4.60.1's own example (p169, OBJECT: view (3DH), len 40H (64), handle: 3F, an R13/R14 record whose printed CRC verifies) closes exactly on its RL boundary with the view mode read as four bits, and the crate fails on it with the same Reserved bit pattern "11" encountered in BD. Row 20.4.60 of tests/fixtures/spec-examples/r14-objects.tsv (#107) reproduces this from spec bytes with no corpus file; a fix should flip its expect cell to closes.

  4. 7 remaining items

  5. added a commit that references this issue on Oct 26, 2026
    f432436
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:oraclearea:tablespriority:P2type:bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions