Hi,
I've tried to simplify my code as much as possible...
Know I give you my code snippets (the usual code which is in any example the same is not shown as I would not expect the issue there)
the main.cpp
Code: Select all
int main(int argc, char* argv[])
{
pspDebugScreenInit();
// setup of common call backs
setupCallbacks();
Init( );
Init() is implemented in engine.cpp:
Code: Select all
struct rayDelta {
long rayDeltaX, rayDeltaY;
} ;
long mapSize; //size of the Map (width)
rayDelta preDelta[480];
void Init( ){
double rayDeltaX, rayDeltaY;
double hx;
mapSize = 512;
int x;
for (x=0;x<480;x++){
hx = x - 240;
rayDeltaX = ((hx / sqrt(hx*hx + 400*400))*1024);
rayDeltaY = (400 / sqrt(hx*hx + 400*400)*1024);
preDelta[x].rayDeltaX = rayDeltaX;
preDelta[x].rayDeltaY = rayDeltaY;
}
}
if you compile this and set the breakpoint to the to of the loop than I'm not able to debug into each line. The debugger jumps mainly to the last line. There are each time "New Thread" outputs in the console of the debugger. I've absolutely no clue whats going on.
however, I've done more and more simplification...
And it seem to me that this has nothing really to do with my first assumption that the calculation may the cause...after some tries..also bring all into the main.cpp the debugging console outputs the following:
[New Thread 76458591]
[Switching to Thread 76458591]
Current language: auto; currently c++
[New Thread 76458591]
[New Thread 76458591]
[New Thread 76458591]
[New Thread 76458591]
GDB is unable to find the start of the function at 0x883cb90
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
This problem is most likely caused by an invalid program counter or
stack pointer.
However, if you think GDB should simply search farther back
from 0x883cb90 for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
warning: GDB can't find the start of the function at 0x883cb90.
Any further Ideas ? Something seem to change/move the memory addresses/pointers in the stack...but what ?
Many thanks for any kind of advise...