Home > Software engineering >  Access conflict
Access conflict

Time:04-15

0 x000000013f4f3fd9 in untreated exception: 0 xc0000005: while reading position 0 x0000000140153c6c access conflict, just a simple addition, didn't do anything, Array_Hist is unsigned int array passed the first address pointer, array is no problem, because before this function is also the use of the array in the histogram statistics

Unsigned short PlayBack1Calculate: : CalGlayMax (unsigned int * Array_Hist, unsigned short Number_Pixel)
{

Unsigned int Number_Pixel_Inside=0;

//Number_Pixel_Inside=0;

For (int I=IMAGE_LEN - 1; I & gt; 0; I -)
{
Number_Pixel_Inside +=Array_Hist [I];//this is a problem the breakpoint

If (Number_Pixel_Inside & gt;=Number_Pixel)
{
Return ((unsigned short) I);
}
}

Return ((unsigned short) 0);
}

CodePudding user response:

Mostly Array_Hist crossing the line, or before calling this function and destroys memory,
No shortcut, debug step by step
  • Related