DXF with empty names fails
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start with readCommonTableEntryCodes in the DXF reader and trace how group code 2 reaches the TableEntry.Name setter; readTextStyle in the same reader already shows the pattern of skipping an empty code 2. Reproduce by opening the attached 13file.dxf.txt, then confirm the entry is registered as unnamed0 by Table.Add. Done when that file reads without an ArgumentNullException and existing DXF reader tests still pass.
Written by the indexing model from the issue text.
Description
DXF Files with empty block names fails to read
To Reproduce
Open the attached file, It fails with an exception, because of empty block name.
Issue confirmed on latest release 3.8.35
Additional context
DXF: reading fails on a table entry with an empty name. Some files (written by older AutoCAD/ODA-based programs) have a BLOCK_RECORD (and its BLOCK) with an empty group code 2, typically an orphan block no insert uses. readCommonTableEntryCodes assigns Name directly, and the TableEntry.Name setter throws ArgumentNullException, so the whole file fails to read. AutoCAD and the ODA libraries read such files and invent a name. Fix: skip an empty code 2 as readTextStyle already does, so Table.Add names the entry (unnamed0).
- 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
-
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 5 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 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DomCR/ACadSharp#1334 · 1 comment ·
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