You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a .CDX file with the following FINGERPRINTGUID section:
"$FINGERPRINTGUID
2
9"
Because no actual GUID is specified in-between, the framework attempts to read an empty string as a GUID. Here is the full stack trace:
at System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result) in f:\dd\ndp\clr\src\BCL\system\guid.cs:line 462
at System.Guid.Parse(String input) in f:\dd\ndp\clr\src\BCL\system\guid.cs:line 262
at IxMilia.Dxf.DxfHeader.GuidString(String s) in D:\IxMilia\Dxf\src\IxMilia.Dxf\Sections\DxfHeader.cs:line 87
at IxMilia.Dxf.DxfHeader.SetHeaderVariable(String keyName, DxfCodePair pair) in D:\IxMilia\Dxf\src\IxMilia.Dxf\Sections\Generated\DxfHeaderGenerated.cs:line 4562
at IxMilia.Dxf.Sections.DxfHeaderSection.HeaderSectionFromBuffer(DxfCodePairBufferReader buffer) in D:\IxMilia\Dxf\src\IxMilia.Dxf\Sections\DxfHeaderSection.cs:line 437
at IxMilia.Dxf.Sections.DxfSection.FromBuffer(DxfCodePairBufferReader buffer, DxfAcadVersion version) in D:\IxMilia\Dxf\src\IxMilia.Dxf\Sections\DxfSection.cs:line 71
at IxMilia.Dxf.DxfFile.LoadFromReader(IDxfCodePairReader reader) in D:\IxMilia\Dxf\src\IxMilia.Dxf\DxfFile.cs:line 257
at IxMilia.Dxf.DxfFile.Load(Stream stream) in D:\IxMilia\Dxf\src\IxMilia.Dxf\DxfFile.cs:line 188
The file can be opened just fine by regular DXF readers.
Would there be any chance this field could get ignored in this situation?
UPDATE:
I pulled the sources locally, and indeed the issue is that the static method DxfHeader.GuidString attempts convert an empty string to a Guid, resulting in an error. If performing a check for NullOrWhitespace before propagating the Guid conversion, and returning an empty Guid otherwise, it seems to work just fine.
The text was updated successfully, but these errors were encountered:
We have a .CDX file with the following FINGERPRINTGUID section:
Because no actual GUID is specified in-between, the framework attempts to read an empty string as a GUID. Here is the full stack trace:
The file can be opened just fine by regular DXF readers.
Would there be any chance this field could get ignored in this situation?
UPDATE:
I pulled the sources locally, and indeed the issue is that the static method DxfHeader.GuidString attempts convert an empty string to a Guid, resulting in an error. If performing a check for NullOrWhitespace before propagating the Guid conversion, and returning an empty Guid otherwise, it seems to work just fine.
The text was updated successfully, but these errors were encountered: