xBimTeam / XbimGeometry

XbimGeometry contains the CLR interop libraries and the c++ engine used to compute the 3D geometry of models.
https://xbimteam.github.io/
Other
260 stars 131 forks source link

XbimCompund. InitFaces. Catch Standard_Failure instead of std::except… #448

Closed santiagoIT closed 5 months ago

santiagoIT commented 1 year ago

XbimWire::NormalDir throws a Standard_Failure.

In XbimCompound::InitFaces a Standard_Failure needs to be caught. Not a std::exception.

This led to the exception not being caught and the program crashing.

If you need, I can send you an IFC file that you can use to reproduce the problem. Remark for me in case you want the Ifc file: HSB-19279

santiagoIT commented 1 year ago

The checks for the pull request have failed, but they seem to have nothing to do with my change:

Error C1088: Cannot flush compiler intermediate file

andyward commented 1 year ago

Thanks for the work on this - checks have passed now. Will just check over and merge

santiagoIT commented 1 year ago

I have added a new commit. There is a difference between DEBUG and optimized RELEASE builds. The first commit solves the problem in DEBUG builds. But in release builds the outernormal sometimes contained NAN doubles which then led the program to crash later on with stack overflow exceptions.

CCT-Mukund-Thakare commented 9 months ago

@santiagoIT Have you done local development environment setup for xbim ? How are visualizing the fixed bug's ? I am looking for local development environment set up documentation.

https://github.com/xBimTeam/XbimGeometry/issues/464

santiagoIT commented 5 months ago

I see the fixes have already been added to the code. I will close this pull request