Skip to content

Opening dxf file that has a hatch with 0 BoundryPath i get a InvalidOperationException error #210

@lork6

Description

@lork6

Dxf file with code 91 value 0 ZeroHatch.zip

I don't know what exactly is the problem. Maybe something else. I can't debug properly, and i don't know how to make change is.

When the file is opened with the load function i get the following error:

System.InvalidOperationException
  HResult=0x80131509
  Message=A sorozat nem tartalmaz elemeket.
  Source=System.Core
  StackTrace:
   at System.Linq.Enumerable.Last[TSource](IEnumerable`1 source) in System.Linq\Enumerable.cs:line 2708
   at IxMilia.Dxf.Entities.DxfHatch.TrySetPair(DxfCodePair pair) in D:\a\dxf\dxf\src\IxMilia.Dxf\Entities\DxfHatch.cs:line 27
   at IxMilia.Dxf.Entities.DxfEntity.PopulateFromBuffer(DxfCodePairBufferReader buffer) in D:\a\dxf\dxf\src\IxMilia.Dxf\Entities\DxfEntity.cs:line 324
   at IxMilia.Dxf.Entities.DxfEntity.FromBuffer(DxfCodePairBufferReader buffer) in D:\a\dxf\dxf\src\IxMilia.Dxf\Generated\Entities\DxfEntityGenerated.cs:line 506
   at IxMilia.Dxf.Sections.DxfEntitiesSection.EntitiesSectionFromBuffer(DxfCodePairBufferReader buffer, DxfFile parentFile) in D:\a\dxf\dxf\src\IxMilia.Dxf\Sections\DxfEntitiesSection.cs:line 75
   at IxMilia.Dxf.Sections.DxfSection.FromBuffer(DxfCodePairBufferReader buffer, DxfFile parentFile, DxfAcadVersion version) in D:\a\dxf\dxf\src\IxMilia.Dxf\Sections\DxfSection.cs:line 66
   at IxMilia.Dxf.DxfFile.LoadFromReader(IDxfCodePairReader reader) in D:\a\dxf\dxf\src\IxMilia.Dxf\DxfFile.cs:line 274
   at IxMilia.Dxf.DxfFile.Load(Stream stream, Encoding defaultEncoding) in D:\a\dxf\dxf\src\IxMilia.Dxf\DxfFile.cs:line 205
   at IxMilia.Dxf.DxfFile.Load(String path, Encoding defaultEncoding) in D:\a\dxf\dxf\src\IxMilia.Dxf\DxfFile.cs:line 184
   at IxMilia.Dxf.DxfFile.Load(String path) in D:\a\dxf\dxf\src\IxMilia.Dxf\DxfFile.cs:line 179
   at dxfFileRead.FileReader.Open(String FileName)

  This exception was originally thrown at this call stack:
    System.Linq.Enumerable.Last<TSource>(System.Collections.Generic.IEnumerable<TSource>) in Enumerable.cs
    IxMilia.Dxf.Entities.DxfHatch.TrySetPair(IxMilia.Dxf.DxfCodePair) in DxfHatch.cs
    IxMilia.Dxf.Entities.DxfEntity.PopulateFromBuffer(IxMilia.Dxf.DxfCodePairBufferReader) in DxfEntity.cs
    IxMilia.Dxf.Entities.DxfEntity.FromBuffer(IxMilia.Dxf.DxfCodePairBufferReader) in DxfEntityGenerated.cs
    IxMilia.Dxf.Sections.DxfEntitiesSection.EntitiesSectionFromBuffer(IxMilia.Dxf.DxfCodePairBufferReader, IxMilia.Dxf.DxfFile) in DxfEntitiesSection.cs
    IxMilia.Dxf.Sections.DxfSection.FromBuffer(IxMilia.Dxf.DxfCodePairBufferReader, IxMilia.Dxf.DxfFile, IxMilia.Dxf.DxfAcadVersion) in DxfSection.cs
    IxMilia.Dxf.DxfFile.LoadFromReader(IxMilia.Dxf.IDxfCodePairReader) in DxfFile.cs
    IxMilia.Dxf.DxfFile.Load(System.IO.Stream, System.Text.Encoding) in DxfFile.cs
    IxMilia.Dxf.DxfFile.Load(string, System.Text.Encoding) in DxfFile.cs
    IxMilia.Dxf.DxfFile.Load(string) in DxfFile.cs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions