Open GVladislavG opened 11 months ago
And there are also no Xbim.Geometry.Engine64.pdb and Xbim.Geometry.Engine32.pdb in release build configuration. Release build throws exception in Xbim.Geometry.Engine64.dll while Xbim3DModelContext.CreateContext(). I tried to attach with debugger to learn deeper, but there is no symbol files in release. Debug build doesn't throw any exception and works well.
My C++ is rusty, but some thoughts:
In debug builds there are additional checks on things like stack & heap overruns - likely why it only fails in Release. (In debug I'd check for exceptions being raised and logged. Enable all C++ exceptions in the Exception Settings window).
Equally in Release config the debug symbols (PDBs) are not created - which is why you don't see the symbol files.
Things you can try:
Is there any way to get the same behavior as debug build in release? Skipping some exceptions and getting result geometry (maby with skiped elements) would be greate result for me now)
Not really, short of using a debug (unoptimised) build. The /RTC (runtime checks) will only work in Debug/Un-optimised builds. https://learn.microsoft.com/en-us/cpp/build/reference/rtc-run-time-error-checks?view=msvc-170
What I'd hope the debug build willlet you do is identify the data / scenario that triggers the crash in Release. If you can track it down to a particular element others may be able to take a look.
So one more question. Why debug-dlls don't work on other machine (without Visual Studio)? Does it also means that I can't move them to other computer?
I think it uses different C++ runtime/libs in DEBUG - and these won't be on machines without VS. Probably a good reason not to go down that route. Best approach is to get a fix for the actual problem - but will need your model (or a subset of it) to reproduce
Ok. There are three problem files in archive. If I use XBim.Essentials ver 5.1.323 + XBim.Geometry ver 5.1.730-develop, it doesn't crash. But result geometry in 3.ifc contains many incorrect results (screenshot below). 1.ifc and 2.ifc are OK. If I use XBim.Essentials ver 6.0.427-develop + XBim.Geometry ver 5.1.730-develop, it crashes.
Hello, xBim team!
I've found very interesting moment. I've changed Exceptions handling a little bit in XbimGeometryCreator.cpp. Strings 304-310.
Then I built debug version of XBim.Geometry. All my problems with geometry creation have disappeared!)) But if I build release version of the same code, it doesn't work correctly. Also if I move debug-dlls of xBim, that I've built on my computer, to other machine it doesn't work. I use master-branch. It would be greate to fix this problem!
Thanks!