Skip to content

MLEADER reads three H handles inline on R2007+, misaligning before its TV fields (10 records of real text unread) #31

Closed

Description

@DrunkOnJava

Found in #28's TV audit (examples/audit_string_streams.rs). MLEADER's data-stream reader consumes handles inline, so it misaligns before reaching the text; the string stream holds real values ('MLeader text, hello!'). Do: handle-stream routing + string-stream TVs, same pattern as TEXT/MTEXT; self-validating test.

Activity

  1. DrunkOnJava commented on Aug 30, 2026

    @DrunkOnJava
    OwnerAuthor

    Unblocked by #46: the ten MULTILEADER failures on sample_AC1032.dwg are now genuinely in the MLEADER body. They used to die in the common entity preamble (the R2010+ graphics-preview block is sized by a BLL, not an RL), so the body decoder never ran.

    Current errors, all past the preamble:

    MLEADER max_leader_segments_points 3055747395 exceeds cap 1000   (x5)
    Reserved bit pattern "11" encountered in BL                       (x2)
    Reserved bit pattern "11" encountered in BD                       (x3)
    

    Body-cursor start bits for the first four records, if useful for a bit-by-bit walk (record data ends at the second number):

    handle body starts at bit data boundary
    0x66E 6885 8687
    0x818 5413 7151
    0x819 8293 10031
    0x81A 8293 10039

    examples/probe_entity_preamble.rs -- <file> 526 prints those directly.

  2. DrunkOnJava commented on Oct 21, 2026

    @DrunkOnJava
    OwnerAuthor

    Fixed by #58 (0e4d1f8, "close the last 39 R2018 errors"). src/entities/mleader.rs now treats every H as an object reference that lives in the handle stream from R2007 on (its doc comment, lines 80-81, and the null on R2007+ fields), and reads its text through string_stream::StringReader. All 15 MULTILEADER records of sample_AC1032.dwg close on their boundary (the module's doc comment, line 41; ARCHITECTURE.md §7g). Value checks against AutoCAD's DXF export come with the oracle work in the 0.2.0 milestone.

  3. added
    type:bug
    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

    type:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions