libredwg
libredwg copied to clipboard
Version 12.2 loads this DWG much worse compared to v12.1
Hello,
Trying the attached DWG file with the latest build we get a much worse result. Screenshots are included in the attached zip file.
Yes, should be fixed with 8e665f0273de973cbf2c804d999be5d0f788737d
More bitsize and size recalculations are needed with DD types, if missing leading to wrong hdl offsets.
Nope, still wrong sizes, leading to wrong handle offsets. Caused by different TV zero-termination policies. header.dwg_version (the app) >= R_2004 always writes an ending zero with strings, before never. So we get different bitsizes also when there are strings when reading dwg's created with newer acad's (r2004), writing to older r2000. either we know with which version the strings were written, or we just re-calc the sizes all the time.
with 0.12.1 we got 59996 rewrite errors with this testcase. with 14527d3eed139a23a6cd165ed591be8337ad18ba we get 187 errors. with 900004be7137c7cd00a48e33104f466587cbfc7c we get 2 errors.
remaining is a wrong scale DD encode for scale.z 3 vs 0 fixed with d2084ca223607b4558801c30bbdb0c14bd9fe58d thanks for the nice testcase!
I tried to build and run libredwg-0.12.3.4231-win64 but the issue is still there (see attached files). What am I missing?

Thanks for the recovery log. Looks like the BLOCK "1573" is broken, and more. I suspect BLOCK subentity and POLYLINE vertex ordering a bit broken, but worse is the missing ownerhandle
Hello, any news on this topic?
Yes, see above. Not repro