xBimTeam / XbimEssentials

A .NET library to work with data in the IFC format. This is the core component of the Xbim Toolkit
https://xbimteam.github.io/
Other
485 stars 172 forks source link

fix: parsing large labels over int32.MaxValue caused a loop in the parser #497

Closed martin1cerny closed 1 year ago

martin1cerny commented 1 year ago

Toolkit currently reads entity labels as integers. This is for performance reasons as keeping all entity labels as long would increase amount of memory used by the applications considerably. Also, Int32.MaxValue provides enough space even for very large models. In the future, we may introduce internal parser time mapping to handle these special files.

In the current implementation, exception in label conversion caused a loop. This was only broken by maximum number of errors, but that is a week constraint and reported wrong number of issues. This fix doesn't introduce support for long labels.