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

Trying to run main.cpp with sample files ballA.off and ballB.off always crashes #46

Closed
marcobeninca71 opened this issue Mar 23, 2021 · 2 comments

Comments

@marcobeninca71
Copy link

Hello
I'm building your solution in Visual Studio 2019 with build tools version v142. The solution compiles perfectly but when I run the application (both in debug and release) with the following command line

wincork.exe -union ballA.off ballB.off res.off

it always crashes inside triangle.c in function transfernodes at line 14126

x = vertexloop[0] = pointlist[coordindex++];

it looks like pointlist is not initialized in the correct way. Below the call stack

> wincork.exe!transfernodes(mesh * m, behavior * b, double * pointlist, double * pointattriblist, int * pointmarkerlist, int numberofpoints, int numberofpointattribs) Line 14126 C wincork.exe!triangulate(char * triswitches, triangulateio * in, triangulateio * out, triangulateio * vorout) Line 15732 C wincork.exe!Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem::subdivide(Corck::Mesh<CorkVertex,CorkTriangle>::IsctProblem * iprob) Line 477 C++ wincork.exe!Corck::Mesh<CorkVertex,CorkTriangle>::IsctProblem::resolveAllIntersections::__l2::<lambda>(Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem * tprob) Line 1406 C++ wincork.exe!std::invoke<void <lambda>(Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem *) &,Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem *>(Corck::Mesh<CorkVertex,CorkTriangle>::IsctProblem::resolveAllIntersections::__l2::void <lambda>(Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem *) & _Obj, Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem * && _Arg1) Line 1615 C++ wincork.exe!std::_Invoker_ret<void,1>::_Call<void <lambda>(Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem *) &,Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem *>(Corck::Mesh<CorkVertex,CorkTriangle>::IsctProblem::resolveAllIntersections::__l2::void <lambda>(Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem *) & _Func, Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem * && <_Vals_0>) Line 745 C++ wincork.exe!std::_Func_impl_no_alloc<void <lambda>(Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem *),void,Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem *>::_Do_call(Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem * && <_Args_0>) Line 939 C++ wincork.exe!std::_Func_class<void,Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem *>::operator()(Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem * <_Args_0>) Line 987 C++ wincork.exe!IterPool<Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem>::for_each(std::function<void __cdecl(Corck::Mesh<CorkVertex,CorkTriangle>::TriangleProblem *)> func) Line 141 C++ wincork.exe!Corck::Mesh<CorkVertex,CorkTriangle>::IsctProblem::resolveAllIntersections() Line 1412 C++ wincork.exe!Corck::Mesh<CorkVertex,CorkTriangle>::resolveIntersections() Line 1514 C++ wincork.exe!Corck::Mesh<CorkVertex,CorkTriangle>::BoolProblem::doSetup(Corck::Mesh<CorkVertex,CorkTriangle> & rhs) Line 178 C++ wincork.exe!Corck::Mesh<CorkVertex,CorkTriangle>::boolUnion(Corck::Mesh<CorkVertex,CorkTriangle> & rhs) Line 306 C++ wincork.exe!computeUnion(CorkTriMesh in0, CorkTriMesh in1, CorkTriMesh * out) Line 210 C++ wincork.exe!std::invoke<void (__cdecl*&)(CorkTriMesh,CorkTriMesh,CorkTriMesh *),CorkTriMesh,CorkTriMesh,CorkTriMesh *>(void(*)(CorkTriMesh, CorkTriMesh, CorkTriMesh *) & _Obj, CorkTriMesh && _Arg1, CorkTriMesh && <_Args2_0>, CorkTriMesh * && <_Args2_1>) Line 1615 C++ wincork.exe!std::_Invoker_ret<void,1>::_Call<void (__cdecl*&)(CorkTriMesh,CorkTriMesh,CorkTriMesh *),CorkTriMesh,CorkTriMesh,CorkTriMesh *>(void(*)(CorkTriMesh, CorkTriMesh, CorkTriMesh *) & _Func, CorkTriMesh && <_Vals_0>, CorkTriMesh && <_Vals_1>, CorkTriMesh * && <_Vals_2>) Line 745 C++ wincork.exe!std::_Func_impl_no_alloc<void (__cdecl*)(CorkTriMesh,CorkTriMesh,CorkTriMesh *),void,CorkTriMesh,CorkTriMesh,CorkTriMesh *>::_Do_call(CorkTriMesh && <_Args_0>, CorkTriMesh && <_Args_1>, CorkTriMesh * && <_Args_2>) Line 939 C++ wincork.exe!std::_Func_class<void,CorkTriMesh,CorkTriMesh,CorkTriMesh *>::operator()(CorkTriMesh <_Args_0>, CorkTriMesh <_Args_1>, CorkTriMesh * <_Args_2>) Line 987 C++ wincork.exe!genericBinaryOp::__l2::<lambda>(std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> & args, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> & end) Line 232 C++ wincork.exe!std::invoke<void <lambda>(std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &) &,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> const &>(genericBinaryOp::__l2::void <lambda>(std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &) & _Obj, std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> & _Arg1, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> & <_Args2_0>) Line 1615 C++ wincork.exe!std::_Invoker_ret<void,1>::_Call<void <lambda>(std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &) &,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> const &>(genericBinaryOp::__l2::void <lambda>(std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &) & _Func, std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> & <_Vals_0>, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> & <_Vals_1>) Line 745 C++ wincork.exe!std::_Func_impl_no_alloc<void <lambda>(std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &),void,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> const &>::_Do_call(std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> & <_Args_0>, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> & <_Args_1>) Line 939 C++ wincork.exe!std::_Func_class<void,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> &,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> const &>::operator()(std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> & <_Args_0>, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> & <_Args_1>) Line 987 C++ wincork.exe!CmdList::runCommands(std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> & arg_it, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::string>>> & end_it) Line 194 C++ wincork.exe!main(int argc, char * * argv) Line 311 C++

@marcobeninca71 marcobeninca71 changed the title Trying to run main.cpp with sample ballA.off and ballB.off always crashes Trying to run main.cpp with sample files ballA.off and ballB.off always crashes Mar 23, 2021
@haozhiliang
Copy link

haozhiliang commented Nov 18, 2021

I'm in the same trouble as you,Have you solved this problem?

@marcobeninca71
Copy link
Author

Hello @haozhiliang ... I didn't solve the problem. I decided not to use cork anymore: it's too unstable and not supported
sorry about that

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

2 participants