Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, got this msg when I try to ru

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0

Hi, got this msg when I try to run my exe file, anyone can help?


Unhandled exception in SSD.exe : 0x(00000FD:StackOverflow)
 
Well, without the code, my first assumption is you have a recursive function that has no termination. Look in your code for any recursive functions and make sure they are appropriately defined.

Matt
 

The recursive loops in my source codes, what's wrong with it?

Using nrutil.h for matrix functions.



for(i=1; i<=IMAGE_HEIGHT; i++)
{
for(j=1; j<=IMAGE_WIDTH; j++)
{
SourceImage[j] = pBufArray[k];
k++;
}
}

AssignImage(SourceImage, LeftImage, RightImage);
SSD(LeftImage, RightImage);


void AssignImage(int **SourceImage, int **LeftImage, int **RightImage)
{
int i, j;

for(i=1; i<=IMAGE_HEIGHT; i++)
{
for(j=1; j<=HALF_WIDTH; j++)
{
// LeftImage[j] = SourceImage[j];
RightImage[j] = SourceImage[j+HALF_WIDTH];
}
}
}

void SSD(int **LeftImage, int **RightImage)
{
int j, Disparity;

for(j=Border; j<=HALF_WIDTH-Border; j++)
{
long Diff, SquaredDiff, SumSquaredDiff=0, MinSSD;
int p, q, k;

for(k=-DISP_RANGE; k<=DISP_RANGE; k++)
{

for(p=TestRow-2; p<=TestRow+2; p++)
{
for(q=j-2; q<=j+2; q++)
{
Diff = LeftImage[p][q] - RightImage[p][q+k];
SquaredDiff = Diff * Diff;
SumSquaredDiff = SumSquaredDiff + SquaredDiff;

if(MinSSD>SumSquaredDiff)
{
MinSSD = SumSquaredDiff;
Disparity = k+HALF_WIDTH;
}
}
}
}
}
printf(&quot;\nThe disparity is %ld\n&quot;, Disparity);
}
 

Hi, I kept getting stuck here when I try to debug program, what happened? Please help!


probepages:
sub ecx,_PAGESIZE_ ; yes, move down a page
sub eax,_PAGESIZE_ ; adjust request and...

test dword ptr [ecx],eax ; ...probe it

cmp eax,_PAGESIZE_ ; more than one page requested?
jae short probepages ; no
 
Aren't your image arrays defined as local variables inside of functions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top