Hi,
I have a piece of code that runs in debug mode in VS2008, C++. The problem is that when I am debugging the code line by line, at a very weird point of the code, it crashes and says:
debug assertion faild. Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
The crash point is on the first closed curly bracket (after mesh->edges[e].needsUpdate=false;) I don't understand why on a curly bracket? does that make sense to you guys?
Can anybody help me understanding what is going on..?
for(int e=0; e<mesh->edges.size(); e++)
{
if(mesh->edges[e].valid && mesh->edges[e].v[0]>=0 && mesh->edges[e].v[1]>=0 &&
mesh->points[mesh->edges[e].v[0]].writable && mesh->points[mesh->edges[e].v[1]].writable)
{
//update v_hat and its corresponding error
DecEdge Current = DecEdge(e);
pair<Point, float> ppf = computeVhat(e);
Current.v_hat = ppf.first;
Current.error = ppf.second;
edgeSoup.push(Current);
mesh->edges[e].needsUpdate=false;
}
}