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
255 stars 128 forks source link

StackOverflowException when opening IFC file (V5). Freeze with v6. #419

Open santiagoIT opened 1 year ago

santiagoIT commented 1 year ago

When opening the IFC file with Xbim.Geometry.Engine.Interop.5.1.437 a StackOverflow exception occurs.

Stackoverflow

The old XBim-Explorer (V4) can open the file. The new XBim-Explorer (V5 - compiled locally) completely crashes (process dies) while 'creating geometry'...

I tried using the develop nuget feed (v 6.0.414-develop) and then the program just freezes.

To reproduce the problem the following is sufficient:

using (var model = IfcStore.Open(ifcFilePath))
            {
                var modelcontext = new Xbim3DModelContext(model);
                modelcontext.CreateContext(XbimProgressDelegate);  // StackOverflow happens during this call
            }

Please let me know if I can be of any help. I am willing to assist. But I need some guidance.

StackOverflow.zip

santiagoIT commented 1 year ago

@SteveLockley We have run into this issue with another IFC file. I am willing to spend time on this. Would it be possible for you to give me some quick guidance on how to best approach this?

martin1cerny commented 1 year ago

Hi @santiagoIT , it is great you are giving a try to several versions of xbim. There is also recent development branch targeting .NET 6, which also uses different approach to process many geometry types. Running our tooling, this has processed the model, but raised two warnings, which might be the shapes making V4 and V5 fail:

[WRN] Cut operation on IfcProduct #12241 failed. Body shape only has been used. See log for details.
[WRN] Cut operation on IfcProduct #465274 failed. Body shape only has been used. See log for details.

Is this what you would expect to see? image

santiagoIT commented 1 year ago

@martin1cerny Thank you for looking into this!! It is great to hear that the .NET 6 version can open the file.

Yes, the screenshot looks fine!

Do you have a rough estimate to when the .NET 6 version will be released?

martin1cerny commented 1 year ago

The code is available in a branch: https://github.com/xBimTeam/XbimGeometry/tree/feature/netcore It is not production ready, so we use private Nuget feed. Would you be interested to participate in the testing and development?

santiagoIT commented 1 year ago

@martin1cerny Yes, I would be happy to assist with testing and development :-) Thank you!!

vchekalin commented 1 year ago

Hi,

I am having the same issue with the version 5.1.437, and likely in the version 5.1.666-develop the problem has been fixed. Can you please clarify when the new production release is planned?

Thanks

vchekalin commented 1 year ago

Hi @martin1cerny, are there any plan for a new release? Please see my comment above.

terroj commented 1 year ago

Hi, i have the same error.