[Gmsh] Help: Segmentation Fault
Chaman Singh Verma
csv610 at gmail.com
Thu May 28 20:40:58 CEST 2009
Hello,
I get segmentation fault while doing surface meshing. After debugging I
found the location of the
problem but don't know why it should happen.
The problem is with EdgeSwapping module. The problem starts from
void BDS_Mesh::del_edge(BDS_Edge *e)
{
e->p1->del(e);
e->p2->del(e);
e->deleted = true;
}
and in the BDS.h file ( In the BDS_Point ) class
inline void del(BDS_Edge *e)
{
std::list<BDS_Edge*>::iterator it = edges.begin();
std::list<BDS_Edge*>::iterator ite = edges.end();
while(it != ite){
cout << " EDGE IS " << *it << endl;
if(*it == e){
edges.erase(it);
break;
}
++it;
}
I notice that in the second function for some point in the edgelist, some
edge is NULL and
that creates the segmenation fault. Here is the output:
EDGE IS 0x1734130
EDGE IS 0x7f9a25875a60
EDGE IS 0
Segmentation fault
I fail to guess the cases where a point refering to a NULL edge ? Can
someone give some hints
to resolve this problem ?
Thanks.
csv
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20090529/d253c8fb/attachment.html>