XbimGeometry icon indicating copy to clipboard operation
XbimGeometry copied to clipboard

Stack overflow while getting geometry

Open GVladislavG opened this issue 2 years ago • 5 comments

Hello, team! There is a problem in attached IFC-file.

m_3DMdlContext = new Xbim3DModelContext(m_model);
m_3DMdlContext.MaxThreads = 1;
m_3DMdlContext.CreateContext();

There is Stack overflow exception while executing m_3DMdlContext.CreateContext().

Thanks! StackOverflow.zip

GVladislavG avatar Jan 08 '23 17:01 GVladislavG

Most likely the same as I'm getting.

https://github.com/xBimTeam/XbimGeometry/issues/281 See also https://github.com/xBimTeam/XbimGeometry/issues/336

I've downloaded the source and have it building. Am attempting to connect it up with my app and debug now.

https://github.com/xBimTeam/XbimGeometry/issues/244 is helpful in getting the source building.

Belrius avatar Jan 17 '23 06:01 Belrius

Surprisingly, for me, the same file doesn't cause a crash in XBim explorer. That seems to indicate that it's a problem introduced after my xbim explorer was built as I'm using the latest nuget packages.

Have you tried your case in Xbim Explorer?

Belrius avatar Jan 17 '23 06:01 Belrius

I've done some debugging for my case here https://github.com/xBimTeam/XbimGeometry/issues/281#issuecomment-1386566556 Not sure if it can help your case. I haven't downloaded and run your test case.

Belrius avatar Jan 18 '23 06:01 Belrius

@GVladislavG It looks to me like your is hitting a similar issue to mine, with a zero direction causing a standard construction error exception. Difference is that yours is with a facetedBrep (ID 228549) and mine was with a IFCPolygonalFaceSet. But the same idea.

Once again, this loads fine in my version of xBim Xplorer image

@andyward any chance you could take a peek at this and at my more detailed dive at https://github.com/xBimTeam/XbimGeometry/issues/281#issuecomment-1386566556 ?

@GVladislavG If possible a minimal replicable case would help as your IFC is > 50mb in size and no fun to debug :).

Belrius avatar Jan 18 '23 07:01 Belrius

Looping @SteveLockley in on this as he's active on GE right now and hopefully picking these up. As noted on 281, with this model I found it working on:

  • v4 Geometry
  • netcore v5 Geometry

but broken on:

  • v5.1 Geometry
  • netcore v6 Geometry engine

andyward avatar Jan 18 '23 10:01 andyward