Hi All,

I am somewhat confused here and would need some assistance on how to fix this issue. The code runs for some time and crashes at some point. This problem occurs when I have a larger workload on the code. It works well for small loads.

The error returned is:

First chance exception 0xC0000005 ACCESS_VIOLATION occurred at 0x00427D77, write of address 0x00000008 at 0x00427D77

on line

return conjCodis;

I have read some stuffs on the access violation thing, pointing to the pointers. I am unable to fix mine. Thanks for your help.

vector<double> Place::addMark(Arbre *mark, double cod)
{
	vector<double> conjCodis;

	Arbre tokAux = *mark;
	map<Arbre,vector<double> ,ltstr>::iterator pos = marcatges.find(tokAux);
	if(pos!=marcatges.end())
	{
		mark = const_cast<Arbre*> (&((*pos).first));
		conjCodis = marcatges[*mark];

		marcatges[*mark].push_back(cod);
	}
	else
	{
		marcatges[*mark].push_back(cod);
	}
	return conjCodis;
}
Comments
Well done on using code tags on your first post

Good, so now use the debugger to examine your program state to try and figure out how it got into that state to begin with.

Then you can think about what code changes are needed to stop it from getting into the error state.

Comments
Yes
This article has been dead for over six months. Start a new discussion instead.