# "This program has performed an illegal operation and will be shut down"

**URL:** <https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671>\
**Category:** Miscellaneous and Personal Stuff I Must Share\
**Created:** [June 18, 2010, 2:18pm UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671 "2010-06-18T14:18:22Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cicero](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cicero/32/3594_2.png) [@Cicero](https://boards.straightdope.com/u/Cicero)\
**Post date:** [June 18, 2010, 2:18pm UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/1 "2010-06-18T14:18:22Z")

</div>

I had almost forgotten that horrible message. Then I fired up my old computer with Windows 98 on it today.

It was like entering the time tunnel. 186 Mb of RAM?

---

<div class="post-metadata">

**Author:** ![Icerigger](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/icerigger/32/432_2.png) [@Icerigger](https://boards.straightdope.com/u/Icerigger)\
**Post date:** [June 18, 2010, 2:27pm UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/2 "2010-06-18T14:27:53Z")

</div>

Yeah the same exact thing with me. At work our “internet computer” is a 56K modem Win98 machine and it really is a minefield trying to surf the net…slowly.

---

<div class="post-metadata">

**Author:** ![Cicero](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cicero/32/3594_2.png) [@Cicero](https://boards.straightdope.com/u/Cicero)\
**Post date:** [June 18, 2010, 2:34pm UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/3 "2010-06-18T14:34:29Z")

</div>

It is fun really. The machine checking memory at start up.

---

<div class="post-metadata">

**Author:** ![joebuck20](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@joebuck20](https://boards.straightdope.com/u/joebuck20)\
**Post date:** [June 18, 2010, 2:52pm UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/4 "2010-06-18T14:52:15Z")

</div>

Yes, I too have many unpleasant memories of getting that message. What the hell did that even mean anyway, and how were you supposed to fix it?

---

<div class="post-metadata">

**Author:** ![Discipline](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@Discipline](https://boards.straightdope.com/u/Discipline)\
**Post date:** [June 18, 2010, 3:30pm UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/5 "2010-06-18T15:30:30Z")

</div>

> [@joebuck20](#):
>
> Yes, I too have many unpleasant memories of getting that message. What the hell did that even mean anyway, and how were you supposed to fix it?

Usually that the program attempted to access memory outside the range that it was allowed. Or the memory subsystem errored in some way that had the same effect.

And you do nothing about it except curse. It’s the programmer’s fault, or your machine’s fault.

---

<div class="post-metadata">

**Author:** ![Celyn](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@Celyn](https://boards.straightdope.com/u/Celyn)\
**Post date:** [June 18, 2010, 9:18pm UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/6 "2010-06-18T21:18:26Z")

</div>

It really confused my Dad the first time he saw it.

" But HOW can it be an illegal operation? I went to shop, bought computer with my own honestly earned money, am using it in my own home, what is ILLEGAL?" :eek:

"Never mind, Dad - it’s a computer error message - it’s never going to make sense. 🙂

---

<div class="post-metadata">

**Author:** ![Rysto](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@Rysto](https://boards.straightdope.com/u/Rysto)\
**Post date:** [June 18, 2010, 10:37pm UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/7 "2010-06-18T22:37:28Z")

</div>

> [@joebuck20](#):
>
> Yes, I too have many unpleasant memories of getting that message. What the hell did that even mean anyway, and how were you supposed to fix it?

Basically, Windows enforces a bunch of rules governing what programs are and aren’t allowed to do. One example of something that a program isn’t allowed to do is write to memory that doesn’t belong to it. If done properly, this means that an individual program can crash, but it won’t take the rest of the system with it(done improperly, you get Windows 98, which managed to have the whole system crash all the time). Anyway, in programmer’s parlance, if a program breaks the rules it has performed an “illegal operation”.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [June 18, 2010, 10:58pm UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/8 "2010-06-18T22:58:22Z")

</div>

> [@Rysto](#):
>
> Basically, Windows enforces a bunch of rules governing what programs are and aren’t allowed to do. One example of something that a program isn’t allowed to do is write to memory that doesn’t belong to it. If done properly, this means that an individual program can crash, but it won’t take the rest of the system with it(done improperly, you get Windows 98, which managed to have the whole system crash all the time). Anyway, in programmer’s parlance, if a program breaks the rules it has performed an “illegal operation”.

I’ve always wondered why they don’t just isolate and encapsulate the memory in the first place, so it becomes impossible to write memory to the wrong location. Any writing to memory goes into the program’s appropriate location, and nowhere else.

In other words, instead of getting this error message, the data would be written somewhere else that is not being used, and then any reference to the memory location would be mapped to the appropriate location. Or just don’t write it at all. But just give the program a chance to continue so you might be able to save your work.

---

<div class="post-metadata">

**Author:** ![Rysto](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@Rysto](https://boards.straightdope.com/u/Rysto)\
**Post date:** [June 18, 2010, 11:32pm UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/9 "2010-06-18T23:32:43Z")

</div>

Once a program has gone that far off the rails, there’s really no saving it. If it’s writing to memory that it doesn’t own those writes really should have gone somewhere else in memory. If writes start going to the wrong place, the program isn’t going to behave correctly from that point on. And if the program reads from memory that it doesn’t own, it’s impossible to figure out what the “correct” value to return from the incorrect read would be.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [June 18, 2010, 11:49pm UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/10 "2010-06-18T23:49:14Z")

</div>

In other words, this _is_ a kind of memory encapsulation in action. It keeps programs from fucking with each others’ memory, and furthermore prevents them from going completely off the rails and fucking God knows what of their own data up once it can be demonstrated that they’re displaying a serious bug in their attempts to use their own memory.

Once a program hits that point, it’s time to either terminate it or at least enter debug mode. Which, as I recall, were indeed the options this message used to come with (though it’s hardly as though the latter would be of any use to anyone except the original programmer).

---

<div class="post-metadata">

**Author:** ![Cicero](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cicero/32/3594_2.png) [@Cicero](https://boards.straightdope.com/u/Cicero)\
**Post date:** [June 19, 2010, 12:22am UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/11 "2010-06-19T00:22:19Z")

</div>

Thanks fols. I learned far more about that error message than I ever knew. I now have to think of a way to raise it over dinner so I can pretend I am smart.

And I had to laugh at **Celyn’s** post.

---

<div class="post-metadata">

**Author:** ![installLSC](https://avatars.discourse-cdn.com/v4/letter/i/54ee81/32.png) [@installLSC](https://boards.straightdope.com/u/installLSC)\
**Post date:** [June 19, 2010, 3:29am UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/12 "2010-06-19T03:29:42Z")

</div>

Now that we’re talking about outdated computer actions, how about the rapidly flickering cursor? On my original computer (a hand-me-down made in 1999), every time I was on the internet for several hours the cursor would start rapidly flickering across the monitor. The only way to stop it would be to shut down the computer and restart. What was this and what purpose did it serve?

---

<div class="post-metadata">

**Author:** ![chrisk](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@chrisk](https://boards.straightdope.com/u/chrisk)\
**Post date:** [June 19, 2010, 7:59am UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/13 "2010-06-19T07:59:50Z")

</div>

> [@BigT](#):
>
> I’ve always wondered why they don’t just isolate and encapsulate the memory in the first place, so it becomes impossible to write memory to the wrong location. Any writing to memory goes into the program’s appropriate location, and nowhere else.
> 
> In other words, instead of getting this error message, the data would be written somewhere else that is not being used, and then any reference to the memory location would be mapped to the appropriate location. Or just don’t write it at all. But just give the program a chance to continue so you might be able to save your work.

To elaborate on what others have said, you can keep the program from going outside its own memory zone, but there’s no way of figuring out where in its own zone it was really aiming for.

Blocking those memory options entirely and giving the program a chance to continue on would be a possibility, but I see the point that it’s better just to euthanize the program once it can’t follow the rules, since it’s unlikely to be able to recover on its own terms. Especially since there’s no way of being able to guess what’s a reasonable value when it’s reading out of bounds.

---

<div class="post-metadata">

**Author:** ![GuanoLad](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/guanolad/32/42_2.png) [@GuanoLad](https://boards.straightdope.com/u/GuanoLad)\
**Post date:** [June 19, 2010, 10:12am UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/14 "2010-06-19T10:12:26Z")

</div>

> [@Celyn](#):
>
> " But HOW can it be an illegal operation? I went to shop, bought computer with my own honestly earned money, am using it in my own home, what is ILLEGAL?" :eek:

This is my main problem with error messages. Not only are they incomprehensible gobbledegook, but they will use familiar terms in an unusual way which just causes people to panic as they try to decipher it, and feel guilty thinking they did something wrong.

And over time it hasn’t improved much, except that errors are now usually less frequent.

---

<div class="post-metadata">

**Author:** ![Siam\_Sam](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Siam\_Sam](https://boards.straightdope.com/u/Siam_Sam)\
**Post date:** [June 19, 2010, 10:22am UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/15 "2010-06-19T10:22:27Z")

</div>

> [@Celyn](#):
>
> It really confused my Dad the first time he saw it.
> 
> " But HOW can it be an illegal operation? I went to shop, bought computer with my own honestly earned money, am using it in my own home, what is ILLEGAL?" :eek:
> 
> "Never mind, Dad - it’s a computer error message - it’s never going to make sense. 🙂

The program was dealing a little blow on the side.

---

<div class="post-metadata">

**Author:** ![Rysto](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@Rysto](https://boards.straightdope.com/u/Rysto)\
**Post date:** [June 19, 2010, 2:33pm UTC](https://boards.straightdope.com/t/this-program-has-performed-an-illegal-operation-and-will-be-shut-down/543671/16 "2010-06-19T14:33:48Z")

</div>

> [@GuanoLad](#):
>
> This is my main problem with error messages. Not only are they incomprehensible gobbledegook, but they will use familiar terms in an unusual way which just causes people to panic as they try to decipher it, and feel guilty thinking they did something wrong.

See, the problem is that error messages are written by programmers, and programmers have their own jargon which makes perfect sense to other programmers, but is utterly incomprehensible to non-programmers.
