xboxscene.org forums

OG Xbox Forums => Software Forums => Development => Topic started by: Mios∞ft on May 30, 2008, 01:49:00 PM

Title: Tracking The Exception / Crash... How? Lost Faith In Conventional Meth
Post by: Mios∞ft on May 30, 2008, 01:49:00 PM

Since the past few weeks I have been trying to trace what's causing the crash.... It's getting really out of hand. sad.gif

----

Is there any, any way to keep determine the XBOX's Exception Address at the time of crash ?

for use with:
addr2line xboxmodule.o -f -e 0xEXCEPTIONADDRESS

---

I got a 100% working project that fails after a few seconds and at a regular condition.  sad.gif

I would TRULY appreciate any sort of help / Guidance smile.gif
Title: Tracking The Exception / Crash... How? Lost Faith In Conventional Meth
Post by: openxdkman on February 03, 2020, 01:40:00 PM
The stack structure is a bit unknown, so I don't know how to not hang on when crash occurs under openxdk.

The xbox debug model has a secondary thread communicating on network, but that is xdk stuff.

To stick to legal stuff, you need to add more traces.
I suspect you slowly overwrite outside your buffers boundaries (net ring buffers?).

In worst case, I ported to ps2, debuggued there then went back to xbox1.

Try to call often a function that verifies all the boundaries of your buffers (before and after). Check for a magic value you put at these boundaries. And make the function yell when these magic values vanish.
Title: Tracking The Exception / Crash... How? Lost Faith In Conventional Meth
Post by: Mios∞ft on May 30, 2008, 02:24:00 PM
QUOTE(openxdkman @ May 30 2008, 04:40 PM) View Post

The stack structure is a bit unknown, so I don't know how to not hang on when crash occurs under openxdk.

The xbox debug model has a secondary thread communicating on network, but that is xdk stuff.

To stick to legal stuff, you need to add more traces.
I suspect you slowly overwrite outside your buffers boundaries (net ring buffers?).

In worst case, I ported to ps2, debuggued there then went back to xbox1.

Try to call often a function that verifies all the boundaries of your buffers (before and after). Check for a magic value you put at these boundaries. And make the function yell when these magic values vanish.


Thanks.  smile.gif


By conventional methods I mean


It crashes when packet count reaches 112 or more at Max 115.


I do

if (rxpacketcount>=112)
{

functionwherethecrashismostprobablyhappening();
 pb_wait_for_vbl();
      pb_reset(); //new frame, let's start from push buffer head again
      pb_erase_depth_stencil_buffer(0,0,640,480); //clear depth stencil buffer (MANDATORY)
      pb_fill(0,0,640,480,0x718568); //clear frame (optional)
      pb_erase_text_screen();
pb_print(" were reached here, that's not the cause 'line number'.\n");
 pb_draw_text_screen();
          pb_finished();

Anotherfunctionwherethecrashismostprobablyhappening();
 pb_wait_for_vbl();
      pb_reset(); //new frame, let's start from push buffer head again
      pb_erase_depth_stencil_buffer(0,0,640,480); //clear depth stencil buffer (MANDATORY)
      pb_fill(0,0,640,480,0x718568); //clear frame (optional)
      pb_erase_text_screen();
pb_print(" Reached here so that's not the cause of crash\n");
 pb_draw_text_screen();
          pb_finished();

}

I do this instead of using initialize and finish at the beggining and end of the loop so that,
If the crash occurs before the end of the loop is reached, we WILL NOT loose the text.


Is this a good strategy for "conventional" debugging?

----

Also, Is there anything like stack size setting or Heap size like the PSP?
Title: Tracking The Exception / Crash... How? Lost Faith In Conventional Meth
Post by: openxdkman on June 03, 2008, 01:28:00 PM
I gave up personally, since I can port to other platforms for debugging.
If it works for you then it's good!

Try to report the total sum of the packets and compare it with low level number and size of ring buffers
Separate outgoing packets and ingoing packets

Try without any graphics at all also.

Good luck!