cork icon indicating copy to clipboard operation
cork copied to clipboard

nullptr exception on specific operation with specific mesh

Open mahmet opened this issue 6 years ago • 0 comments

Hello,

I am getting following crash on a difference operation:

Exception thrown: read access violation. rightvertex was nullptr. in triangle.c on line 11835 (if (((leftvertex[0] == endpoint2[0]) && (leftvertex[1] == endpoint2[1])) || ((rightvertex[0] == endpoint2[0]) && (rightvertex[1] == endpoint2[1]))))

stacktrace:

>	wincork.dll!scoutsegment(mesh * m, behavior * b, otri * searchtri, double * endpoint2, __int64 newmark) Line 11835	C
 	wincork.dll!insertsegment(mesh * m, behavior * b, double * endpoint1, double * endpoint2, __int64 newmark) Line 12297	C
 	wincork.dll!formskeleton(mesh * m, behavior * b, __int64 * segmentlist, __int64 * segmentmarkerlist, __int64 numberofsegments) Line 12542	C
 	wincork.dll!triangulate(char * triswitches, triangulateio * in, triangulateio * out, triangulateio *) Line 15795	C
 	wincork.dll!Mesh<CorkVertex,CorkTriangle>::TriangleProblem::subdivide(Mesh<CorkVertex,CorkTriangle>::IsctProblem * iprob) Line 474	C++
 	wincork.dll!IterPool<Mesh<CorkVertex,CorkTriangle>::TriangleProblem>::for_each(std::function<void __cdecl(Mesh<CorkVertex,CorkTriangle>::TriangleProblem *)> func) Line 139	C++
 	wincork.dll!Mesh<CorkVertex,CorkTriangle>::IsctProblem::resolveAllIntersections() Line 1409	C++
 	wincork.dll!Mesh<CorkVertex,CorkTriangle>::BoolProblem::doSetup(Mesh<CorkVertex,CorkTriangle> & rhs) Line 173	C++
 	wincork.dll!computeDifference(CorkTriMesh in0, CorkTriMesh in1, CorkTriMesh * out) Line 219	C++
 	wincork.dll!computeBoolOp(unsigned int n_trianglesIn0, unsigned int n_verticesIn0, unsigned int * trianglesIn0, float * verticesIn0, unsigned int n_trianglesIn1, unsigned int n_verticesIn1, unsigned int * trianglesIn1, float * verticesIn1, unsigned int & n_trianglesOut, unsigned int & n_verticesOut, unsigned int * * trianglesOut, float * * verticesOut, unsigned int operation) Line 312	C++
 	[Managed to Native Transition]	
 	Common.dll!Common.Backend.CorkBoolOperation.ExecuteOperation(Kitware.VTK.vtkPolyData lhsPolyData, Kitware.VTK.vtkPolyData rhsPolyData, Common.Backend.BooleanOperations.OperationFlag operation) Line 71	C#
 	Common.dll!Common.Backend.CorkBoolOperation.GetResult(Kitware.VTK.vtkPolyData startPolyData, System.Collections.Generic.Queue<Common.Backend.BooleanOperations.Operation> operations) Line 35	C#
 	Common.dll!Common.Backend.BooleanOperations.BooleanOpsBackend.Invoke(bool showConsoleWindow) Line 191	C#
 	CGToolbox.dll!CGToolbox.BooleanOperations.Models.DifferenceOperationModel.PerformDifference(bool showConsoleWindow) Line 157	C#
 	CGToolbox.dll!CGToolbox.BooleanOperations.Models.DifferenceOperationModel.Execute(bool showConsoleWindow) Line 198	C#
 	CGToolbox.dll!CGToolbox.BooleanOperations.ViewModels.DifferenceOperationViewModel.ExecuteAsync.AnonymousMethod__0() Line 129	C#
 	mscorlib.dll!System.Threading.Tasks.Task.Execute() Line 2498	C#
 	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 954	C#
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 902	C#
 	mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot) Line 2827	C#
 	mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution) Line 2767	C#
 	mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Line 820	C#
 	[Native to Managed Transition]	
 	kernel32.dll!BaseThreadInitThunk()	Unknown
 	ntdll.dll!RtlUserThreadStart()	Unknown

the exception only occurs when doing the difference operation on these specific .off files: https://filebin.net/8l0t7ocsoz9fwrab Do the operation -diff Absturz_lhs.off Absturz_rhs.off to reproduce the error

mahmet avatar Jul 17 '19 09:07 mahmet