---------- Forwarded message ---------
From: Alex Syniakov <innochenti@gmail.com>
Date: Tue, Apr 9, 2019 at 10:39 AM
Subject: Re: delete_vertex issue
To: <moebius@informatik.rwth-aachen.de>


please see a minimal example for reproducing crash:


#include <OpenMesh/Tools/Subdivider/Uniform/LoopT.hh>
#include <OpenMesh/Tools/Subdivider/Uniform/Sqrt3T.hh>
#include <OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh>
#include <OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh>
#include <OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh>

void crash() {
                OpenMesh::TriMesh_ArrayKernelT<> mesh;
mesh.request_face_normals();
mesh.request_vertex_normals();

mesh.request_vertex_colors();
mesh.request_edge_colors();
mesh.request_face_colors();

mesh.request_vertex_status();
mesh.request_halfedge_status();
mesh.request_edge_status();
mesh.request_face_status();

OpenMesh::VertexHandle vhandle[8];

vhandle[0] = mesh.add_vertex(OpenMesh::TriMesh_ArrayKernelT<>::Point(-1, -1, 1));
vhandle[1] = mesh.add_vertex(OpenMesh::TriMesh_ArrayKernelT<>::Point(1, -1, 1));
vhandle[2] = mesh.add_vertex(OpenMesh::TriMesh_ArrayKernelT<>::Point(1, 1, 1));
vhandle[3] = mesh.add_vertex(OpenMesh::TriMesh_ArrayKernelT<>::Point(-1, 1, 1));
vhandle[4] = mesh.add_vertex(OpenMesh::TriMesh_ArrayKernelT<>::Point(-1, -1, -1));
vhandle[5] = mesh.add_vertex(OpenMesh::TriMesh_ArrayKernelT<>::Point(1, -1, -1));
vhandle[6] = mesh.add_vertex(OpenMesh::TriMesh_ArrayKernelT<>::Point(1, 1, -1));
vhandle[7] = mesh.add_vertex(OpenMesh::TriMesh_ArrayKernelT<>::Point(-1, 1, -1));

std::vector<OpenMesh::VertexHandle>  face_vhandles;

face_vhandles.clear();
face_vhandles.push_back(vhandle[0]);
face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[2]);
face_vhandles.push_back(vhandle[3]);
mesh.add_face(face_vhandles);

face_vhandles.clear();
face_vhandles.push_back(vhandle[7]);
face_vhandles.push_back(vhandle[6]);
face_vhandles.push_back(vhandle[5]);
face_vhandles.push_back(vhandle[4]);
mesh.add_face(face_vhandles);

face_vhandles.clear();
face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[0]);
face_vhandles.push_back(vhandle[4]);
face_vhandles.push_back(vhandle[5]);
mesh.add_face(face_vhandles);

face_vhandles.clear();
face_vhandles.push_back(vhandle[2]);
face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[5]);
face_vhandles.push_back(vhandle[6]);
mesh.add_face(face_vhandles);

face_vhandles.clear();
face_vhandles.push_back(vhandle[3]);
face_vhandles.push_back(vhandle[2]);
face_vhandles.push_back(vhandle[6]);
face_vhandles.push_back(vhandle[7]);
mesh.add_face(face_vhandles);

face_vhandles.clear();
face_vhandles.push_back(vhandle[0]);
face_vhandles.push_back(vhandle[3]);
face_vhandles.push_back(vhandle[7]);
face_vhandles.push_back(vhandle[4]);
mesh.add_face(face_vhandles);

mesh.delete_vertex(vhandle[0]);
mesh.garbage_collection();

OpenMesh::Subdivider::Uniform::LoopT<OpenMesh::TriMesh_ArrayKernelT<>, double> subdivider;
subdivider.attach(mesh);
subdivider(mesh, 1, true);   //CRASH
subdivider.detach();
}

On Tue, Apr 9, 2019 at 2:06 AM Alex Syniakov <innochenti@gmail.com> wrote:
Hello,

I don't know how to file a bug, but the next steps always repro for me in OpenFlipper and OpenMesh:
1. delete vertex in mesh (box for example)
2. click subdivide
=> Crash

Thanks,
Alex


--
Thanks,
Alex


--
Thanks,
Alex