Path: chuka.playstation.co.uk!news From: "Kenny Millar" Newsgroups: scee.yaroze.freetalk.english Subject: Re: how to make my code crash-proof? Date: Wed, 20 Feb 2002 23:53:01 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 27 Message-ID: References: <01c1ba1b$e134c5e0$4d8a933e@pal-s-omnibook> NNTP-Posting-Host: pc1-kirk2-0-cust102.ren.cable.ntl.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Best advice from me would be to check the CPU specs and see if it throws an exception, or generates an interrupt, for such things as 'invalid instruction' or 'divide by zero' then hook into that exception or interrupt vector. -Kenny "pal" wrote in message news:01c1ba1b$e134c5e0$4d8a933e@pal-s-omnibook... > 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 >