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

nullptr exception on specific operation with specific mesh #45

Open
mahmet opened this issue Jul 17, 2019 · 0 comments
Open

nullptr exception on specific operation with specific mesh #45

mahmet opened this issue Jul 17, 2019 · 0 comments

Comments

@mahmet
Copy link

mahmet commented Jul 17, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant