You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CUSTOM(727) (0x02D7) x3 on sample_AC1032.dwg: type code above max_class_number (549) with no class entry #44
After #41 three records report object type 0x02D7 = 727, above the file's max_class_number 549, so no class entry exists. Either the object-type read is wrong for those records (e.g. a different type-code encoding for R2018 objects past a threshold) or the code is genuinely out-of-table. Dump the three records' first 64 bits with examples/probe_object_layout.rs and decide; if the type read is wrong, the fix likely recovers more than three records.
Investigated in #46. The object-type read is not wrong — leave read_object_type alone.
The three records decode tag = 01, RC = 0xE7, + 0x1F0 = 727, which is exactly what the bytes say and the documented R2010+ dispatch. They are not objects at all. First 64 bits of each, walked by hand:
A counter of 11 is an 11-byte handle value, which cannot exist; counter 0, value 0 is not a valid object handle either; and the MS sizes are inconsistent with the MC handle-stream sizes on the same records. Compare a real MESH record, 0x343 at offset 19676: 17 45 40 80 d0 ea 28 25 … — MC 23, tag 1 → 517, and it decodes cleanly.
Two more handle-map entries carry the same signature and produce the other garbage records on this file: 0x13E2 @ 212392 → CUSTOM(517) (this is the third MESH "error", the one failing inside the preamble) and 0x13E7 @ 229599 → CUSTOM(564), claiming MC = 280,720 bits.
Root cause is the address space, not the type field. The handle map addresses offsets up to 1,289,590, while AcDb:AcDbObjects assembles to 1,192,851 bytes — which is also the section descriptor's own declared decompressed size. Six handle-map offsets already fall past the end of the assembled buffer and are skipped; the five records above are offsets that land inside the buffer but on the wrong bytes.
So this issue belongs with #43 (handle-map walker vs. what the class table declares). Suggested re-titling to something like "five handle-map entries resolve to non-records; the map addresses 96,739 bytes past the assembled AcDbObjects section". A cheap integrity gate for the walker while that is open: reject a record whose handle field has counter > 8, since a handle value cannot exceed a u64 — read_handle currently shifts the excess out silently.
Activity
DrunkOnJava commentedon Aug 30, 2026
Investigated in #46. The object-type read is not wrong — leave
read_object_typealone.The three records decode
tag = 01,RC = 0xE7,+ 0x1F0= 727, which is exactly what the bytes say and the documented R2010+ dispatch. They are not objects at all. First 64 bits of each, walked by hand:0x15E6e7 74 8c 6f 79 e4 0a 7a ec 0f c1 6c 03 52 20 1a 73 78 45 ae a2 75 39 0f0x16072f 5a af 05 79 ca d0 7b 95 2b 4b 40 ea f9 73 06 93 8c 01 28 80 ff 10 620xAD2D03ABE5CC1A4E0x160F57 c8 6c 23 84 c1 04 6e cb 89 74 7f b7 53 c4 04 e0 4c 43 80 08 0f 90 3a0x411BBA
counterof 11 is an 11-byte handle value, which cannot exist;counter 0, value 0is not a valid object handle either; and theMSsizes are inconsistent with theMChandle-stream sizes on the same records. Compare a real MESH record,0x343at offset 19676:17 45 40 80 d0 ea 28 25 …— MC 23, tag 1 → 517, and it decodes cleanly.Two more handle-map entries carry the same signature and produce the other garbage records on this file:
0x13E2@ 212392 → CUSTOM(517) (this is the third MESH "error", the one failing inside the preamble) and0x13E7@ 229599 → CUSTOM(564), claimingMC = 280,720bits.Root cause is the address space, not the type field. The handle map addresses offsets up to 1,289,590, while
AcDb:AcDbObjectsassembles to 1,192,851 bytes — which is also the section descriptor's own declared decompressed size. Six handle-map offsets already fall past the end of the assembled buffer and are skipped; the five records above are offsets that land inside the buffer but on the wrong bytes.So this issue belongs with #43 (handle-map walker vs. what the class table declares). Suggested re-titling to something like "five handle-map entries resolve to non-records; the map addresses 96,739 bytes past the assembled AcDbObjects section". A cheap integrity gate for the walker while that is open: reject a record whose handle field has
counter > 8, since a handle value cannot exceed au64—read_handlecurrently shifts the excess out silently.fix(entities): close the last 39 R2018 errors — MULTILEADER, HATCH an…