Computer Question

Could one or more of the computer-savvy Dopers kindly explain to me, a technology-illiterate user, what exactly that “This Program Has Performed An Illegal Function And Will Now Shut Down” screen is all about? And maybe a way to bypass it without shutting down the program?

Thanks

This was discussed here. Usually it comes down to bad programming on the part of whoever wrote the application that crashed. There’s not much you can do when this happens. The newer versions of Microsoft Office try to detect such conditions within the Office programs and allow you to save your work first - if you’re lucky.

When you see this message it means the program has done something so heinous that the operating system (Windows) wants to kill it before it does any more damage. For example, the program might have tried to overwrite memory belonging to some other program running on your system.

A computer program is a series of instructions. An instruction is a group of buts, typically 32 (which is why the computers we use are said to have 32-bit processors) but in some instances more than 32. Those 32 bits are retrieved from memory and loaded into the CPU.

A typical instruction might be several bits for an operation identifier (opcode), plus two more groupings of bits for values to be handled by that instruction. For instance ADD two numbers together, followed by the two numbers.

Depending on the opcode, some of the other values supplied might have limits set on them. For instance, if the instruction is to get some data from an address in memory, but the address supplied is negative, that’s a problem.

If the limit is violated, you have an illegal instruction. How can this happen? Progamming errors are a big cause, but file corruption can cause it as well.

As for the second part of the OP, 'fraid not. Once an illegal instruction has occurred, the operating system takes back over (if you’re lucky) and won’t let the program go any further. If an instruction is invalid, there’s a good chance that the next instruction will be too. If you were just to skip over it, the flow of the program would be destroyed. If you tried to let it run on anyway, the next instruction, one-billionth of a second or so later, would probably also be illegal. There is also the possibility of severe system damage from an untrapped illegal instruction. Better to just terminate the program no questions asked, so that’s what the OS does.

D’oh – An instruction is a group of bits, not buts.