Mail Archives: djgpp/1995/10/03/04:02:00
I've got a project I'd like to move from Version 1.12.4 (pretty sure
this is the release on it) to Version 2.0 but ....
under 1.12.4 run's w/o error
under 2.0 gets a nasty SEGFAULT while accessing a 2d array of floats.
using gdb I've tracked do the exect point of the crash and can't
see any diffenence.
-------------------------
Psudo-Code
View(Buffer,dx,dy); /* Good here - performs read access ok */
Shift(Buffer,dx,dy); /* Crashes in this function */
.....
-------------------------
void Shift(float *data,int dx,int dy)
{
int x,y,v,i;
for (y=0; y<dy; y++)
for (x=0; x<dx; x++)
{
i=2 * ( y * dx + x );
v = (x+y) % 2 * 2 - 1;
data[i + 0] *= v;
data[i + 1] *= v;
}
}
------------------------------
btw: data is a 2-d array of complex numbers.
crashes when y = 33 , x = 250 (ish)
Thanks for any ideas.
-- Eric [ Stumped ]
- Raw text -