Drawing require recovery
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start with the DWG header template decoding path that validates the MEASUREMENT value, then inspect how AC1032 headers are read and compare the supplied drawing with a valid file. Reproduce the reported invalid value 256 and identify where it originates before changing parsing behavior. Done means the drawing opens without recovery in ACadSharp and existing DWG parsing behavior remains covered.
Written by the indexing model from the issue text.
Description
Describe the bug
On open the produced file required recovering
To Reproduce
Open the file
Expected behavior
Screenshots
Additional context
Here is a bug report from OpenCadStudio, the same recovery happens in AutoCAD but without a detailed log
Open CAD Studio drawing recovery report
Report schema: 2
Report ID: R2-1794921983-2512df80a35d
Application version: 2026.45
Application build: 2026.45
Application revision: fb0a667e269b
Build profile: release
Build features: none
Reader version: 0.6.8
Reader revision: eababc0
Platform: windows/x86_64
Created (Unix seconds): 1794921983
File: drawing-2512df80a35d.dwg
Size: 15052 bytes
Source SHA-256: 2512df80a35d1f5d855c6a4edee21183a5a96599a785190bceef129a88aa5212
Result: opened with a recovery report
Summary
Format: DWG
Format version: AC1032
Maintenance version: 228
Recovery mode: true
Stream completed: true
Source sections: 2
Observed source records: 162
Successfully decoded source records: 145
Known skipped source records: 0
Output entities: 13
Output objects: 83
Output table records: 41
Entities scanned: 13
Parser errors recovered: 2
References checked: 0
References loaded: 0
References recovered: 0
References unavailable: 0
References failed: 0
References skipped: 0
Save as new file required: yes
Timing
Parse: 2 ms
Validation: 0 ms
References: 0 ms
Scene caches: 0 ms
Geometry prep: 2 ms
Total: 53 ms
Diagnostics
[Warning] Reading DWG file version: AC1032 (AC24)
[Warning] AC18 inner header: page_map_address=0x39E0, section_map_id=14
[Warning] AC18: Read 15 page records from page map
[Warning] AC18: Read 12 section descriptors from section map
[Error] Invalid file format: Invalid MEASUREMENT value: 256
[Error] Initial read failed; recovery mode continued: Invalid file format: Invalid MEASUREMENT value: 256
Structured reader diagnostics
[code=template-decode-failed stage=header section=AcDb:Template offset=- offset-basis=- line=- handle=- type=-] Invalid file format: Invalid MEASUREMENT value: 256
[code=strict-read-failed stage=record-stream section=- offset=- offset-basis=- line=- handle=- type=-] Invalid file format: Invalid MEASUREMENT value: 256
The source file was not modified by this operation.
Save the repaired drawing as a new file before continuing work.
Release needed
3.8.35
- Yes, using the Nuget package.
- No, using the github repo.
- Dominant language
- C#
- Stars
- 873
- Forks
- 223
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 28
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DomCR/ACadSharp
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
DWG writer: text styles get the text-style table as their xref block handlePossibly taken @menes97 claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
Maintainers usually reply within 3 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 3 days
-
DwgWriter writes a null shape-file handle for SHAPE entities (WriteShapes = true)Possibly taken @menes97 claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
DwgReader reads a color-book entity's Color as ByBlock instead of the book's colorPossibly taken @menes97 claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
Similar issues
-
hand-to-AI
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CactuseSecurity/firewall-orchestrator#5803 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
bug python
Difficulty 1/5 Under an hour Newbie friendliness 88/100
ilia-sokolov/OfficeAgent.NET#89 ·
Maintainers usually reply within 13 days