Path: chuka.playstation.co.uk!news From: Steven Osman Newsgroups: scee.yaroze.freetalk.english Subject: Re: how to make my code crash-proof? Date: Thu, 21 Feb 2002 01:52:34 -0500 Organization: PlayStation Net Yaroze (SCEE) Lines: 28 Message-ID: References: <01c1ba1b$e134c5e0$4d8a933e@pal-s-omnibook> NNTP-Posting-Host: user-0cceh4k.cable.mindspring.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent 1.9/32.560 Two more things: 1. A walk-through of the source code with another programmer helps immensely (they may spot things or you will spot them as you explain your code to them) 2. Write a testing script. Make sure your script tests every aspect of the code. Ideally, you'd create your tests such that every single line of code is executed. Steven On 20 Feb 2002 14:41:46 GMT, "pal" wrote: >Even after a million hours of thorough testing, I would like to find a way >to ensure that if my code ever happens to crash or loop, the user will not >be faced with a dead screen. (can anyone be sure that any C program will >never crash?) > >I can detect loops via vsync callback. However I don't know how I could >detect crashes due to divide by zero or invalid pointers. On a PC I guess >I'd 'just' modify some interrupt vectors (not sure about the proper name in >English), but is this possible with NY (and importantly, with the standard >libraries, and how)? > >..or are there others ways to solve this (other than proving my code ;) )? > >pal