Skip to content

tables/modern.rs omits the BL num_reactors that objects/modern.rs measured, and compensates with a different flag order #40

Closed

Description

@DrunkOnJava

Found while fixing #33.

objects::modern::open measured the R2007+ common object data (§19.4.2) as EED, BL num_reactors, B no_xdictionary, B has_ds_binary_data, confirmed three independent ways:

  • DICTIONARY's BL numitems equals the number of strings its string stream actually holds only with the BL consumed (23 / 4 / 2 / 0 on sample_AC1032.dwg); without it, numitems reads 0 on a dictionary that demonstrably has entries.
  • ACDB_PLACEHOLDER, whose body is provably empty, closes exactly on its boundary with the BL and leaves 2 bits over without it (arc_2013.dwg handle 15: 15 bits total).
  • The nine one-field *_CONTROL records close on their BL numentries only with the reactor count consumed first.

tables::modern::skip_object_prefix does not read that BL, and tables::modern::read_entry_flags compensates by reading (B, B, BS) where the pre-R2007 inline layout has (B 64-flag, BS xrefindex+1, B xdep). The two readings sum to the same total, so both satisfy the string-stream boundary check and both pass today.

An APPID record on arc_2013.dwg spends exactly 16 bits from the end of its object header to its string stream. Under prefix A (no BL) that is EED 2 + B + B then B + B + BS(0) + RC = 4 + 12. Under prefix B (with the BL) only 10 bits remain, and no combination of the documented APPID tail fields fills 10. Which reading assigns the right values to the right fields is therefore not determinable from those 16 bits, so #33 left the table path alone.

Consequence: symbol-table entry names are unaffected — they come from the string stream either way — but TableEntryHeader::is_xref_dependent, xref_index_plus_1 and is_xref_resolved may be misassigned on R2007+, and num_reactors is not surfaced for table entries at all.

Resolving this needs a file with a genuinely xref-dependent table entry (non-zero xrefindex), which the current corpus does not have.

Activity

  1. DrunkOnJava commented on Aug 30, 2026

    @DrunkOnJava
    OwnerAuthor

    From #67: tables/modern.rs's 8-bit RC after the R2013+ flag is now known NOT to be a marker payload (the flag is followed by nothing on the entity and object paths; LAYOUT's 16 bits are its own ds_block in acad_layout.rs). The RC should become DIMSTYLE's own block — but that path also omits BL num_reactors (this issue), so both variables need settling together, ideally with a file carrying a non-zero xrefindex table entry.

  2. added
    type:bug
    area:tables
    release:R2007
    release:R2010
    release:R2013
    release:R2018
    priority:P1
    and removed on Oct 21, 2026
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:tablespriority:P1release:R2007release:R2010release:R2013release:R2018type:bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions