Hi,

thanks for the test case. I added it as a unittest. The patch is currently tested:

https://graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/merge_requests/219

The same bug is also in the Modified Butterfly scheme. If the patch builds and works
on all architectures it will enter maser in about an hour.

Regards,
Jan Möbius

On 09.04.19 10:28, Alex Syniakov wrote:


---------- 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

_______________________________________________
OpenMesh mailing list -- openmesh@lists.rwth-aachen.de
To unsubscribe send an email to openmesh-leave@lists.rwth-aachen.de
https://lists.rwth-aachen.de/postorius/lists/openmesh.lists.rwth-aachen.de


-- 
Jan Möbius
Department of Computer Science VIII
Aachen University of Technology (RWTH)
Ahornstrasse 55, 52074 Aachen, Germany

Phone   ++49 (0)241 80-21802
Fax     ++49 (0)241 80-22899
mailto:moebius@cs.rwth-aachen.de
http://www.rwth-graphics.de