From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) Newsgroups: comp.os.msdos.djgpp Subject: Weird crash with bad array Date: 18 Feb 1997 06:45:18 GMT Organization: The National Capital FreeNet Lines: 23 Message-ID: <5ebj5u$meq@freenet-news.carleton.ca> Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) NNTP-Posting-Host: freenet2.carleton.ca To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I mallocked a chunk of memory to hold a 300x15 array of short ints. The way I indexed it, the address was short *baseptr + y*300+x. Thus, a bad x coordinate would not generally go out of the malloc block but a bad y coordinate would. I accidentally wound up trying to access it at y=21... the resulting crash was spectacular and somewhat alarming. The computer made a popping noise, then rebooted itself, then froze in mid-reboot with the message "Drive failure"! I switched it physically off for a few seconds and on again. It came up with "drive failure" again but otherwise booted normally and all my disk drives worked fine. Since then it has never repeated the messgae, at boot or otherwise. What could cause such an alarming message? -- .*. Where feelings are concerned, answers are rarely simple [GeneDeWeese] -() < When I go to the theater, I always go straight to the "bag and mix" `*' bulk candy section...because variety is the spice of life... [me] Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh