Repository navigation
Description
A drawing that came from Rhino opened in CADCraft without trouble. After editing it there and saving, neither the DWG nor the DXF opens in AutoCAD 2021: AutoCAD crashes, and the work had to be restarted from scratch. That is the part worth being loud about — a file that silently cannot go back is worse than one that refuses to save.
Steps
- A
.dwgexported from Rhino. It opens in CADCraft normally. - Work on it in CADCraft, save — as DWG, and once as DXF.
- Open either saved file in AutoCAD 2021: impossible. AutoCAD crashes on the file.
What I know and what I do not
- CADCraft version: not recorded before the file was lost — please tell me which to try if it matters (0.20.1 is current as I write this).
- Which save was used for each attempt (Save, Save As, Export) I can also re-check, but the result was the same for both formats.
- The input came from Rhino, which writes DWG through its own exporter, so the source is not an AutoCAD-native file even though it opened fine on the way in.
- AutoCAD 2021 is the reader, and it is a crash rather than a message, so there is nothing for me to paste from it.
What would let anyone here reproduce it
I do not want to hand over a private production drawing, but I can produce a minimal version of it — the same Rhino → CADCraft → save path, with the drawing reduced until it still crashes AutoCAD — if that helps. Say which of these you would rather have:
- the reduced file and the exact CADCraft version,
- the original file privately, or
- a list of the entity types you suspect, so I can build a file with only those.
Why it may be one of the known families
Reading the tracker, this looks like the same shape as the open file-compat reports rather than a new mechanism:
- REGION/3DSOLID entities read from a DXF 2000 make every saved DXF/DWG unreadable in ZWCAD 2025 #2334 — REGION/3DSOLID entities read from a DXF make every saved DXF/DWG unreadable in ZWCAD (
priority: critical). CADCraft answers exit code 0 while the output is unreadable elsewhere. - DXF and DWG round-trip drop 109 ACAD_PROXY_ENTITY records in v0.16.0 #2643 — DXF and DWG round-trip drop
ACAD_PROXY_ENTITYrecords while both conversions return exit code 0. - [Bug] DXF export ignores AutoCAD 2000 selection – file remains AC1027 instead of AC1015 #3213 — a DXF export forced to AutoCAD 2000 is still written as AC1027, so readers that require AC1015 refuse it.
A saved file that a different program crashes on, with no signal from CADCraft, is the common thread. #2334 is the closest in symptom (it names a second reader refusing the output), so if a maintainer thinks this is a duplicate, I will fold it there — but the reader here is AutoCAD 2021 on a DWG, and the report does not cover that.
What a better gate would look like
cadcraft-cli roundtrip (#2685) already opens, saves and reopens — which catches what a second CADCraft cannot read, not what another program chokes on. The gap is the same one #2643 states: a conversion that returns 0 while the output is unreadable. Two things would have caught this class before a person lost a day:
- an external readability check in the corpus run (open the saved file with a validator, or at least with a second independent reader), so "CADCraft can reopen it" stops standing in for "it is a valid file", and
- a warning at save time when the writer drops records or leaves entities it does not model — the writer already counts them (the DWG worker returns per-type counts since DWG reader and writer run in a child process (E7) #2673), so the count could reach the person instead of only the log.
I am happy to help test either, on Linux and Windows, with files I can share.
Activity
ticket-craft commentedon Nov 20, 2026
Thanks for the report! To look into this, we need the app version and a sample file that shows the problem. Please add them in a comment here, or open a new ticket with the details.
Possibly related: #2334 and #2920.
kuseidos commentedon Nov 20, 2026
The two programs say different things, and the difference is the useful part.
AutoCAD 2021 on the DWG — a crash, no diagnostic:
AutoCAD 2021 on the DXF — refused, drawing discarded, and it names the record:
Version: 0.20.1 (About dialog), which is the release
multimannconfirmed the DXF error on in #2904.The DXF half is #2904, and it is fixed there
Same message, same version. Since #2665 the writer puts groups 52 (pattern angle), 41 (pattern scale) and 77 (double flag) on solid and gradient fills too, and AutoCAD's reader refuses any of the three between 76 and 98 — which is exactly what
expected group code 98means: it never gets to the seed-point count. #2904 writes them for pattern fills only again and measured opened files in AutoCAD 2024 and 2026. So this DXF is a duplicate of that one and I will not open a second front for it; the fix is written and waiting to merge.The DWG half may be the same defect, and that is worth knowing before triaging it separately
DWG saves do not start from the drawing model:
write_dwgincrates/io/src/lib.rsbuildsdxf_write::dwg_bridge(d, version)and hands that DXF text tocraft_dwg::encode_kept_noted, i.e. acadrust parses the same bytes and encodes the DWG. The malformed solid/gradient hatch record therefore travels into the DWG as well. A DWG reader handed a hatch record in the wrong shape can fault where the DXF reader would have refused it politely, which is the shape of the difference above.Two things follow:
craft-dwgrather than to this repo, and it needs the same kind of measured table DXF: a solid or gradient hatch no longer makes AutoCAD refuse the file #2904 has: a drawing AutoCAD wrote itself with a solid hatch, converted here to DWG, opened there.For the reporter's own file, meanwhile
The trigger is a solid fill or a gradient; patterned hatches (ANSI31 and the like) are not affected, they open in the #2904 measurements. So a drawing whose solid fills are exploded to lines before saving should open. I can also reduce the file to the smallest version that still fails, on both formats, if a maintainer wants a fixture they can keep — I have not attached the drawing because it is private production work.
kuseidos commentedon Nov 20, 2026
A measurement that narrows the DWG half, and it goes against my own guess, so it belongs here before anyone spends time on it.
The DWG does not inherit the hatch defect. DWG saves are built from the same tags (
dxf_write::dwg_bridge→craft_dwg::encode_kept_noted), so I expected the malformed solid-hatch record to travel into the DWG and trip AutoCAD's reader there. It does not: the bridge decodes the DXF into the DWG model and writes the groups back from its own fields, and a solid fill comes out clean even onmain.How it was measured — a drawing with one SOLID hatch and one ANSI31 hatch,
cadcraft_io::write(&d, "x.dwg"), thencraft_dwg::dwg_to_dxfand the HATCH records read back:So
main's DWG is already what AutoCAD wants for a hatch, and a test asserting it passes with the bug still in the DXF writer — which is why I did not keep the test: a check that cannot fail is worse than none. It does say what the DWG path does, so it may be worth a///note or a case incrates/io/tests/it/hatch_dwg_bridge_groups.rsif a maintainer wants the behaviour pinned for another reason.What that leaves. The access violation on this reporter's DWG is a different defect from #2904, and the DXF's
expected group code 98is the first thing AutoCAD's reader refused, not necessarily the only thing wrong with the drawing. The input was a Rhino export, which is the shape #2334 describes (REGION/3DSOLID/ACIS data read from a DXF making every saved DXF/DWG unreadable elsewhere,priority: critical) — and AutoCAD meets the hatch problem first in the DXF while the DWG has no hatch problem at all, which fits a second cause behind the first.Next step from my side: an inventory of the entity types in the saved file, which does not need AutoCAD and does not need the drawing to be published — if
cadcraft-cli infoon the saved DWG prints counts per type, the report can name what the file holds without the file leaving the reporter. I will post that here when I have it.kuseidos commentedon Nov 29, 2026
Checked the release rather than the notes alone, since this report was filed against 0.20.1:
write_hatch_entitywrites 52, 41 and 77 insideif !h.solid, so a solid or gradient fill goes from its pattern type (76) straight to its seed points (98).0.20.1is the version that still writes them. That is what "expected group code 98" was.The DWG half is not covered by that fix and stays open here. The measurement above shows the DWG never carried those groups — the bridge rebuilds the hatch from its own fields — so the access violation comes from something else in the saved file. My own guess is the #2334 family: the input was a Rhino export, Rhino writes ACIS data (REGION/3DSOLID), and a drawing that carries it is exactly what #2334 describes as unreadable elsewhere with exit code 0 from CADCraft. That is a guess and I am labelling it as one; the file decides.
What I am still waiting on is the saved DWG from the reporter, so a maintainer can look at what the file actually holds instead of at what we think it holds. When it arrives I will post the entity inventory here — counts per type, no private geometry — and a reduced file if the reporter agrees to share one.
kuseidos commentedon Nov 30, 2026
The reporter no longer has the saved DWG — the project was rebuilt from scratch after the file would not open — so this half cannot be reproduced from our side, and I would rather say that than keep a report open on a promise of a file.
What remains true and useful in this issue:
If someone else has a DWG that CADCraft saved from a Rhino export and faults in AutoCAD, that file is worth more than anything we can add here, and this issue is the right place to hang it. Closing or keeping it is your call — I do not have more to add without an input file.
2ez4gcx commentedon Dec 3, 2026
Following up on kuseidos' summary of 30 November. This issue now holds two things:
Since there's nothing left to act on without a file, I'd suggest closing this in favour of #2334. If anyone has a DWG that CADCraft 0.21.0 or later saved and that AutoCAD can't open, please attach it, or open a new issue and link it here.