Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AccessViolationException Cutting XbimSolid #177

Closed
andyward opened this issue May 8, 2019 · 5 comments
Closed

AccessViolationException Cutting XbimSolid #177

andyward opened this issue May 8, 2019 · 5 comments
Assignees
Labels
awaiting closure Issues that should be closed if we don't hear back on in a week bug Confirmed bug - system not working as intended
Milestone

Comments

@andyward
Copy link
Member

andyward commented May 8, 2019

Model crashes when creating 3DModelContext. See stack trace

Assemblies and versions affected:

Geometry v5.0.118

Minimal file to reproduce the issue:

FKA_ARCH_PODIUM_IFC(EDITED) PROBLEMATIC ELEMENTS ONLY.ifc as provided privately by BT

Application: IfcConverterApplication.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException at <Module>.ShapeUpgrade_UnifySameDomain.Build(ShapeUpgrade_UnifySameDomain*) at Xbim.Geometry.XbimSolid.Cut(Xbim.Common.Geometry.IXbimSolid, Double) at Xbim.Geometry.XbimSolid.Init(Xbim.Ifc4.Interfaces.IIfcBooleanResult) at Xbim.Geometry.XbimSolid.Init(Xbim.Ifc4.Interfaces.IIfcBooleanOperand) at Xbim.Geometry.XbimSolid..ctor(Xbim.Ifc4.Interfaces.IIfcBooleanOperand) at Xbim.Geometry.XbimSolid.Init(Xbim.Ifc4.Interfaces.IIfcBooleanResult) at Xbim.Geometry.XbimSolid.Init(Xbim.Ifc4.Interfaces.IIfcBooleanOperand) at Xbim.Geometry.XbimSolid..ctor(Xbim.Ifc4.Interfaces.IIfcBooleanOperand) at Xbim.Geometry.XbimSolidSet.Init(Xbim.Ifc4.Interfaces.IIfcBooleanResult) at Xbim.Geometry.XbimSolidSet..ctor(Xbim.Ifc4.Interfaces.IIfcBooleanResult) at Xbim.Geometry.XbimGeometryCreator.Create(Xbim.Ifc4.Interfaces.IIfcGeometricRepresentationItem, Xbim.Ifc4.Interfaces.IIfcAxis2Placement3D) at Xbim.Geometry.Engine.Interop.XbimGeometryEngine.Create(Xbim.Ifc4.Interfaces.IIfcGeometricRepresentationItem, Xbim.Ifc4.Interfaces.IIfcAxis2Placement3D) at Xbim.ModelGeometry.Scene.Xbim3DModelContext+<>c__DisplayClass28.<WriteShapeGeometries>b__27(Int32) at System.Threading.Tasks.Parallel+<>c__DisplayClass42_02[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<PartitionerForEachWorker>b__1() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(System.Threading.Tasks.Task) at System.Threading.Tasks.Task+<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(System.Object) at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() at System.Threading.Tasks.Task.ExecutionContextCallback(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) at System.Threading.Tasks.Task.ExecuteEntry(Boolean) at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

@andyward andyward added the bug Confirmed bug - system not working as intended label May 8, 2019
@andyward andyward added this to the 5.0.1 milestone May 8, 2019
@andyward
Copy link
Member Author

andyward commented May 8, 2019

Also see 03_interference_detection.ifc which may exhibit the same problem (provided privately)

@andyward andyward added the in progress Being worked on label May 8, 2019
@SteveLockley
Copy link
Member

This is now fixed in the develop branch from build 5.209.

@SteveLockley SteveLockley added awaiting closure Issues that should be closed if we don't hear back on in a week and removed in progress Being worked on labels May 9, 2019
@andyward
Copy link
Member Author

andyward commented May 9, 2019

Current state:

  • 03_interference_detection.ifc
  • FKA_ARCH_PODIUM_IFC(EDITED) PROBLEMATIC ELEMENTS ONLY.ifc

The latter file raises an AccessViolationException in

   at Xbim.Geometry.XbimSolidSet.DoBoolean(Object param)
   at Xbim.Geometry.XbimSolidSet.DoBoolean(IXbimSolidSet arguments, BOPAlgo_Operation operation, Double tolerance, ILogger logger)
   at Xbim.Geometry.XbimSolidSet.Cut(IXbimSolidSet solids, Double tolerance, ILogger logger)
   at Xbim.Geometry.XbimSolidSet.Init(IIfcBooleanResult boolOp, ILogger logger)
   at Xbim.Geometry.XbimGeometryCreator.Create(IIfcGeometricRepresentationItem geomRep, IIfcAxis2Placement3D objectLocation, ILogger logger)

Xbim.Essentials Version="5.0.252-develop"
Xbim.Geometry Version="5.0.211-develop"

@andyward andyward reopened this May 9, 2019
@SteveLockley
Copy link
Member

The model contains some faceted breps that are incorrectly defined (a solid made of two coincidental faces for example), these are now trapped and the exception is handled

@andyward
Copy link
Member Author

Confirmed fixed in Geometry 5.0.216-develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting closure Issues that should be closed if we don't hear back on in a week bug Confirmed bug - system not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants