"Your computer has just performed an illegal operation"

What exactly is going on when my computer notifies me that it has just performed an “Illegal Operation” and that I will be “Shut Down”? It seems to me that if it already knows the difference between legal and illegal, it should take whatever steps to prevent it. I’m just curious as what exactly is going on.

It means the Microsoft Computer Police are going to arrest you.


>< DARWIN >
__L___L

A better term for “illegal” in this case would be “doesn’t understand”. For example, trying to access a chunk of memory that doesn’t exist (been there, done that). It is an illegal statement, but really it is complaining that it doesn’t have the foggiest clue what the software is telling it.

Now, with an illegal statement one of two things can happen:

  1. The software crashes alone.
  2. The operating system goes along with it.

It is when #2 happens that you get the system will be shutdown. It just doesn’t know how to proceed.


“Glitch … download” - Glitch’s final action. sniff

Windows© has a long list of stupid things that software running under its benevolent rule aren’t supposed to do. Whenever the application tries to do any of these things, the operating system says “Woah!, just hold it right there!” and issues the warning to you. There usually isn’t anything you can do about it except acknowledge the message, unless you have a crash prevention utility installed like Nuts & Bolts. N&B adds another choice to the warning dialog box that says “recover”. Pressing this may allow you to continue what you were doing long enough to save your work & re-launch the application. I used to have N&B installed and whenever I got the illegal op message, 99% of the time I could choose to recover & continue with no residual ill effects.

Skeptic23

Usually the problem is that the type of illegal operation that happened was one the system could not recover
from
if things went further. The error is usually caught in the beginning of the act by a software head check and if
allowed to continue would lead to disastrous consequences.

For example, a kernel file system code has a memory write going to illegal address zero. The kernel bounds checks the
address to see if its within reasonable limits - zero is not. It can’t unwind things to determine the right address. The
kernel should never write there so the head check code’s error path is to stop rather than possibly do more damage.
Another is the system finding the kernel locks held count to be off. It can’t determine who did what. The kernel lock
count should never be off and there is no error recovery sequence so it shuts down.

There are recoverable errors but you generally don’t see those posted.

Have you just installed any hardware or software?

Yeah, what Glitch said.

Micromedia Frustrator stores the field values that describe your window positions on screen in a chunk of memory that it asks your operating system to allocate to it.

Meanwhile, 'cuz you are multitasking, Macrosoft Orifice writes some vector information pertaining to a Powerstub Puzzletation document you were working on to a chunk of memory that it thinks of as its own, because it requested it earlier. Unfortunately, some nonstandard memory allocation routines that worked OK under Servile Pack 3 when Macrosoft wrote them don’t work so hot under the Servile Pack 4 you’re running on your computer, and the chunk of memory that Orifice attempts to write to has been given to Frustrator.

Scenario One: brilliant operating system with Servile Pack 4 busts Orifice and says to you that “The application ‘Orifice’ has unexpected quit because it wasn’t playing nicely with the other kids”.

Scenario Two: less-than-brilliant operating system with Servile Pack 4 says “OK, boss” and puts your Powerstub data into Micromedia Frustrator’s memory space. Frustrator says “hey, gimme that window data again, I have to refresh the window content” and the OS says, “here ya go” and hands Frustrator the totally inappropriate data now occupying that space and Frustrator says to the OS “OK, smart ass, draw THIS on your bleepin’ screen” and hands it back instructions that say to start drawing screen elements 2.4 miles off the left edge of your screen. OS with Servile Pack 4 gets a really bad case of the electronic hiccups and says “The application ‘your operating system’ could not be written because ‘your operating system’ could not be found. Keyboard not found. Press any key to continue” and reboots, complaining shortly afterwards that you didn’t shut the computer down very nicely last time.


Designated Optional Signature at Bottom of Post

Well thanks alot for all of your wonderful information. All this time I had thought that it was litteraly commiting an “Illegal” act. I surely don’t want to be responsible for tripping into the Pentagon’s database or launching a nuclear warhead, but then again, my computer can barely operate for an hour without a glitch, so I doubt if it could pull that off!
-Thanks again

Hmmm.

I always thought that illegal operation refered to the opcode, not the address. There are other messages that refer to memory specific problems such as page fault errors or segmentation errors. Maybe my UNIX background has betrayed me here. One sure way to get an illegal operation is to jump to an address that’s not code. You can do this in a C program or an assembler program pretty easily. A decent operating system will catch the problem before it corrupts the kernel, but we’re talking windows, right? If the kernel screws up there is no recovery, period.

I try to keep it simple and what do I get for my trouble… nitpickers… sheesh. :wink:

What Frolix says is true. I mean it is the operation that is illegal, not the address. Of course, my example is still valid, if you try go out of bounds in memory you’ll typically go “gurk” (technical word for a critical execution-time error), unless you have an exception handler coded… and we all code exception handlers in all our programs right guys? wink wink nudge nudge Yeah, the exception handlers are right next to the comments.

And programmers everywhere have a little chuckle.

I only code exception handlers for stuff that can go wrong :rolleyes:

Similarly, when warned by windows that something wrong happened and I am forced to close the running program, the Close dialog box gives two choices: Close and Details. When you hit details it lists a bunch of numbers. What do these numbers signify? What kind of details are they?

That is a memory dump and registers dump of the problem. If you can read machine code, ,and who can’t, you can diagnose the problem.

When some software crashes there will be a third option, “Debug”. If you have a C compiler this will open it up your compiler in debug mode so you can really see what is going on. Real techie geeks always press debug before close. :wink:

Memory dump is probably obvious.

The registers hold the current “machine code level” operation and other goodies.

Glitch,
You’d need the symbols file installed as well wouldn’t you? And besides, if you did you may not know what’s really going on. OSR’s NT Insider had a good article last month on debugging “KMODE EXCEPTION”.

It means windows sux.
Other than that, Glitch (among others) is right. These errors can mean myriad things, but usually they are a nice way for Windows to say “I am stupid. I don’t know what to do. I think I’ll just quit what I’m doing or quit all together and throw a fit. Nyeah”
If you are using 98, try running msconfig and selecting “selective start up” and then removing all the checks except “Process windows\win.ini” and “Process windows\system.ini”. This means that you will remove “Process cofig.sys, process autoexec.bat, and load startup group items.”
hit apply and then yes and then it will restart. Your system will run a lot better after this.
If you are running 95, go buy 98, buy a mac, or learn linux. In reverse order. Noonch.

Fat Guy in a Little Coat,
SDMB Self-Righteous Clique

I always thought the stories about stupid computer users were apocraphyl (did I spell that right?) until one concerning illegal Windows operations happened to me.

I was working in Customer Service at the time for a major computer and electronics mail order department. We had one customer who ordered a laptop with every possible accessory that can go with it. Well over $10,000 worth of equipment. Somehow, because I was the most computer-literate person in the department, I became “saddled” with her. You see, she didn’t have the faintest idea what she was doing. She didn’t have any idea how all these components went together. I dreaded her calls.

Anyway, one day, I get her on the phone and she’s and she’s fit to be tied. She’s screaming at me: “I thought everything I bought from you was legal and above board. I thought you were a reputable company. I’m ready to call the FBI…” When I finally got a word in edgewise, I asked her what the problem was. As it turns out, she got the famous “performed an illegal operation…” message. It took me a good half hour to explain to her that this was a technical term, not a legal term.

Thank goodness I am no longer in Customer Service. :slight_smile:

Zev Steinhardt

Sometimes when windows crashes and there’s lots of people around I like to click the details button to see the hex dump and say really loud “OH! IT’S 0A DD 1F! THAT EXPLAINS EVERYTHING! IT’S OBVIOUS! HOW COULD I HAVE MISSED THAT?!”

Uhm - it will run a lot better if for some reason there was a lot of startup stuff it was doing that you don’t want it to. If you run a virus checker or ICQ or palm hotsynch manager or a million billion other things in your tray this will not be an ideal solution for you.