<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Dear Gmsh Author,<BR> <BR>There is a crash bug in below function which marked with color:<BR> <BR>The vertex in _sizes is 2d vertex, so it should alwasy find nothing with 3d vertex V0, V1.<BR> <BR>void backgroundMesh::updateSizes(GFace *_gf)<br>{<br>////////// Ignored ////////<BR><br> const double _beta = 1.3;<br> for (int i=0;i<3;i++){<br> std::set<MEdge,Less_Edge>::iterator it = edges.begin();<br> for ( ; it != edges.end(); ++it){<br> MVertex *v0 = it->getVertex(0);<br> MVertex *v1 = it->getVertex(1); <BR> <BR> // Old code<BR><em><font color="#d24726"> //MVertex *V0 = _2Dto3D[v0];<br> //MVertex *V1 = _2Dto3D[v1];<br> //std::map<MVertex*,double>::iterator s0 = _sizes.find(V0);<br> //std::map<MVertex*,double>::iterator s1 = _sizes.find(V1);</font></em><BR> <BR> // Fixed code<br><font color="#d24726"> std::map<MVertex*, double>::iterator s0 = _sizes.find(v0);<br> std::map<MVertex*, double>::iterator s1 = _sizes.find(v1);</font><br> if (s0->second < s1->second)s1->second = std::min(s1->second,_beta*s0->second);<br> else s0->second = std::min(s0->second,_beta*s1->second);<br> }<br> }<br>} <BR> </div></body>
</html>