crash during Delaunay2dMesh

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
torg
Posts: 5
Joined: Thu Oct 15, 2015 3:10 am

crash during Delaunay2dMesh

Post by torg »

win64bit latest trunk as of today.

poolalloc is returning unreadable memory on the 3rd tri-angle

void maketriangle(struct mesh *m, struct behavior *b, struct otri *newotri)
{
int i;

newotri->tri = (triangle *) poolalloc(&m->triangles);
/* Initialize the three adjoining triangles to be "outer space". */
newotri->tri[0] = (triangle) m->dummytri;
newotri->tri[1] = (triangle) m->dummytri;
newotri->tri[2] = (triangle) m->dummytri;

CRASH (newotri->tri[2] <Unable to read memory> )

> CC_CORE_LIBd.dll!maketriangle(mesh * m, behavior * b, otri * newotri) Line 4481 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9284 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9380 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9380 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9380 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9380 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9380 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9380 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9380 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9380 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9380 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9380 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9380 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqrecurse(mesh * m, behavior * b, float * * sortarray, int vertices, int axis, otri * farleft, otri * farright) Line 9379 C++
CC_CORE_LIBd.dll!divconqdelaunay(mesh * m, behavior * b) Line 9498 C++
CC_CORE_LIBd.dll!delaunay(mesh * m, behavior * b) Line 10366 C++
CC_CORE_LIBd.dll!triangulate(const char * triswitches, triangulateio * in, triangulateio * out, triangulateio * vorout) Line 14700 C++
CC_CORE_LIBd.dll!CCLib::Delaunay2dMesh::buildMesh(const std::vector<Vector2Tpl<float>,std::allocator<Vector2Tpl<float> > > & points2D, unsigned __int64 pointCountToUse, char * outputErrorStr) Line 201 C++
CC_CORE_LIBd.dll!CCLib::PointProjectionTools::computeTriangulation(CCLib::GenericIndexedCloudPersist * cloud, CC_TRIANGULATION_TYPES type, float maxEdgeLength, unsigned char dim, char * errorStr) Line 290 C++
QCC_DB_LIBd.dll!ccMesh::Triangulate(ccGenericPointCloud * cloud, CC_TRIANGULATION_TYPES type, bool updateNormals, float maxEdgeLength, unsigned char dim) Line 922 C++
CloudCompare.exe!MainWindow::doActionComputeMesh(CC_TRIANGULATION_TYPES type) Line 6107 C++
CloudCompare.exe!MainWindow::doActionComputeMeshAA() Line 6044 C++
CloudCompare.exe!MainWindow::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 948 C++
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: crash during Delaunay2dMesh

Post by daniel »

Is it a big cloud? And is it reproducible? If yes then I'm interested to see the cloud!
Daniel, CloudCompare admin
torg
Posts: 5
Joined: Thu Oct 15, 2015 3:10 am

Re: crash during Delaunay2dMesh

Post by torg »

daniel wrote:Is it a big cloud? And is it reproducible? If yes then I'm interested to see the cloud!
it is big and it's reproducible.

Edit->Mesh->Delaunay 2.5D (XY Plane) with Max edge length of 0.25

1.7 gig bin file. 830 compressed as 7z. I will PM you a link.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: crash during Delaunay2dMesh

Post by daniel »

Oh, well I fear that you just hit a memory wall ;) (the 'Delaunay' lib is quite old and I'm not sure it can handle more than 4Gb of memory properly).

Can you try to increase your virtual memory and try again? (who knows...).

Otherwise can you subsample your cloud first?
Daniel, CloudCompare admin
Post Reply