XbimGeometry icon indicating copy to clipboard operation
XbimGeometry copied to clipboard

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

Open santiagoIT opened this issue 2 years ago • 4 comments

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 avatar Sep 14 '23 17:09 santiagoIT

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

santiagoIT avatar Sep 14 '23 19:09 santiagoIT

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

andyward avatar Sep 15 '23 07:09 andyward

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.

santiagoIT avatar Sep 16 '23 00:09 santiagoIT

@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

CCT-Mukund-Thakare avatar Feb 15 '24 07:02 CCT-Mukund-Thakare

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

santiagoIT avatar Jun 13 '24 14:06 santiagoIT