✔ Version 0.13.3.7545
Debug build → DWG reading OK
Release build → DWG reading OK
❌ Version 0.13.3.7850
Debug build → DWG reading OK
Release build → DWG reading NOT correct
7545&7550
DWG Version:ACAD2000
Writing DWG produces a file that AutoCAD reports as “The drawing file is corrupted and needs recovery
After debugging the internal structure of the DWG:
hdr->last_entity becomes empty or incorrect after adding a new entity
This matches the known issues in #1105 about incomplete update of entity chain and block ownership links.
dwg_add_LINE(hdr, &pt1, &pt2);
Thank you very much for your work on libredwg. It is an excellent project and extremely valuable for DWG interoperability.