gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Crash problems (touchscreen & keys not responding)

#137902 - melw - Fri Aug 17, 2007 8:21 am

Ok, this is a bit of needle in the haystack approach - but I welcome anyways educated guesses what might be the cause of following behaviour:

After a while (5-30 minutes), running a DS application, the touchscreen stops responding. However, it's typical that the keys do respond still after this for a while, until keypresses are also disregarded. I haven't been able to find a single spot where this happens, as it's rather linked with how long the application has been running than where the crash occurs.

My personal guess: Something wrong with the ARM7/ARM9 inter-communication? The application uses FIFO for sounds and WiFi, which is one possible source of bugs, although I've had this bug also when not using network nor sounds at all. The keys/touchscreen code is pretty much straight from the nds combined template example.

#137905 - PypeBros - Fri Aug 17, 2007 8:58 am

Afaik, the kind of weird crash you describe is usually due to memory management errors (freeing blocks twice, following NULL pointers, array overflows, etc).
The first thing you can do to find out is to install the defaultExceptionHandler() soon enough in your program. If rather than hanging, your program simply stops with a guru-meditation red screen, track what's going wrong.

If you really suspect something wrong with the 7-o-9 FIFO, maybe you can rewrite the ARM7 side so that e.g. it reset its state when some special key combo is detected. Still, most of the time, ARM9 doesn't wait for ARM7 so that shouldn't have much impact.
_________________
SEDS: Sprite Edition on DS :: modplayer

#138002 - melw - Sat Aug 18, 2007 10:30 am

Hmm. Funny thing is that even with defaultExceptionHandler() I never get the guru meditation screen. Further info: Also sounds stop playing shortly before a complete "crash".

I'll go dig bit deeper on how to debug effectively on DS - that side is still unknown territory for me.