#166170 - albinofrenchy - Sun Feb 01, 2009 10:10 am
Unfortunately I don't think I can sheer this down to manageable copy-paste size; but I was wondering if anyone here can give me pointers how to fix this problem.
I have some code that I ported to the ARM processor that in general seems to do what it is supposed to . However, I think its seriously screwing up my stack in the process.
If I run something like:
It will crash NO$.
If I comment out the bottom
it works.
If I make the ctm variable static it works as well.
An interesting note is that I can display the image that is rendered with no problem. It just seems to happen whenever I try to access variables in the scope of my function. So that certainly points to a broken stack; but the fact that the code never runs has me puzzled.
Anyone with any ideas on what this could possibly be? I'm utterly confused; I can not think of a single reason that code that will NOT run is crashing NO$ (and my DS).
I have some code that I ported to the ARM processor that in general seems to do what it is supposed to . However, I think its seriously screwing up my stack in the process.
If I run something like:
Code: |
int main(void) { fz_matrix ctm; fz_error * error; fatInitDefault(); fz_cpudetect(); fz_accelerate(); consoleDemoInit(); some_pdf_init_code(); ctm = viewctm(); error = some_render_code(...); if(false) printf("CTM: %p", &ctm); return 0; } |
It will crash NO$.
If I comment out the bottom
Code: |
if(false) printf("CTM: %p", &ctm); |
it works.
If I make the ctm variable static it works as well.
An interesting note is that I can display the image that is rendered with no problem. It just seems to happen whenever I try to access variables in the scope of my function. So that certainly points to a broken stack; but the fact that the code never runs has me puzzled.
Anyone with any ideas on what this could possibly be? I'm utterly confused; I can not think of a single reason that code that will NOT run is crashing NO$ (and my DS).