Trying to set window.location
or using window.navigate()
to make the browser go to about:crash
or chrome://crash
doesn't work. Is there a way to do it?

- 44,284
- 53
- 191
- 263
-
Is there a point to this? I mean I actually don't know. But is there? – karim79 Jun 10 '12 at 02:34
-
5Create an infinite loop and sit back. – j08691 Jun 10 '12 at 02:39
-
Probably the browser doesn't allow manually pointing to those pages for security reason. I think you can kill some child process of Chrome to simulate a crash. – nhahtdh Jun 10 '12 at 02:57
-
4@karim79 The point is for crash handling. I need to make my Chrome extension crash in order to know how to recover from the crash... I have multiple extensions all communicating together acting as one. When the main controller extension detects that one of it's manipulated extensions has crashed, it needs to know at what state it was in and how to restore it (and avoid crashing again). – trusktr Jun 10 '12 at 03:43
6 Answers
FUN FUN LOOP:
txt = "a"; while(1){ txt = txt += "a"; //add as much as the browser can handle } //[evil laugh] BOOM! All memory used up, and it is now CRASHED!
http://jsfiddle.net/DerekL/M45Cn/1/
Sorry for the Chinese characters...
Extra
Fun Fun Loop also works on Firefox!
And I have to give an applause to Safari, because it automatically reload the page when it is about to crash! Good job Webkit developers!
Oh yeah...
WARNING: Don't try it in Internet Explorer... Because it crashed not my browser, instead, it crashed my Windows 7...
Yes. I have to restart the computer after that thing.

- 92,235
- 44
- 185
- 247
-
1
-
17
-
1Doesn't seem to work in Firefox, at least not anymore, because it warns about 'unresponsive script' and lets you terminate it. If that is time based, you could probably workaround it with creative use of setTimeout at just the right moments. – InfinitiesLoop May 10 '13 at 06:06
-
1
-
4@DDS: `a='5';while(a=a+a);` is all you need. It's still exponential so it will fill the memory in about 30 iterations. :) – Guffa Feb 26 '14 at 09:30
-
1If any application, including Internet Explorer, is able to blue-screen your computer then that means that you are either hitting a bug in Windows, a bug in a device driver, or a hardware failure. So, that blue-screen is *not* IE's fault. – Bruce Dawson Jun 15 '16 at 00:33
-
-
-
I realize this question is over a year old, but apparently you can use chrome://inducebrowsercrashforrealz
.
Here is a list of additional debug chrome://
URLs, taken from chrome://about
:
chrome://crash
chrome://kill
chrome://hang
chrome://shorthang
chrome://gpuclean
chrome://gpucrash
chrome://gpuhang
chrome://ppapiflashcrash
chrome://ppapiflashhang
chrome://restart

- 14,440
- 8
- 42
- 52
-
24Important note: `chrome://inducebrowsercrashforrealz` will crash **the top-level process for Chrome, including all tabs in all browser windows and all opened apps,** not just the current tab as `chrome://crash` or `chrome://kill` will. – Stuart P. Bentley Jan 11 '15 at 09:25
-
8
This is by far the most simple way. Create an Array with the largest number possible for Arrays. This will not take up a computer's memory, but it will crash the page in a number of seconds.
[...Array(2**32-1)]
Let's say that your computer can handle this (it shouldn't). Try this to give your computer more stress:
[...Array(2**32-1)].map(_=>Math.ceil(Math.random()*111))
These can be called from the address bar with:
javascript:[...Array(2**32-1)]
or
javascript:[...Array(2**32-1)].map(_=>Math.ceil(Math.random()*111))

- 1
- 1

- 736
- 5
- 16
-
When I run it, my computer is perfectly fine and I get `[30, 46, 79, 57, 97, 5, 18, 34, 86, 39, 108, 34, 30, 102, 98, 109, 84, 100, 25, 6, 5, 111, 39, 103, 45, 18, 93, 16, 57, 38, 8, 54, 84, 86, 17, 104, 12, 65, 7, 18, 74, 37, 39, 76, 66, 80, 88, 78, 21, 55, 89, 65, 22, 3, 81, 55, 106, 29, 6, 15, 24, 31, 48, 46, 82, 78, 4, 105, 21, 18, 7, 73, 73, 28, 9, 82, 48, 93, 57, 3, 86, 82, 2, 86, 9, 110, 64, 10, 74, 62, 11, 95, 25, 47, 3, 38, 42, 84, 84, 20, …]` – YJiqdAdwTifMxGR Feb 11 '21 at 20:47
-
1
Simple enter the following line of code into the chrome address bar to see a Chrome tab crash simulation:
chrome://crash
-
2
-
6Actually, chrome://crashes is where you go to see a list of crashes that have been recorded. chrome://crash is how you intentionally crash the renderer process (the tab) and chrome://crashes is how you view that crash afterwards. – Bruce Dawson Jun 15 '16 at 00:32
Found this on Reddit
Crashes an i5 8th Gen in a few seconds.
for (var i = 5; i > 3; i = i + 1)
{ console.log(i); }
<html>
<h1>This Should Crash Your Browser</h1>
</html>
Disclaimer
This will crash your StackOverflow Page in a few seconds if you run this code.

- 582
- 7
- 20
I know this question is old, but sometimes I want to seriously crash an application, so that nobody can ignore something that may be potentially missed or ignored.
I think in the context of a "traditional" web app, the best approach is to do something like this:
const error = new Error('FOO is undefined - this should never happen');
location.href = (
'/crash'
+ '?message=' + encodeURIComponent(error.message)
+ '&stack=' + encodeURIComponent(error.stack)
);
throw error
Doing location.href = 'chrome://crash'
just gives an error and does nothing.
Doing location.href = 'about:crash'
basically just navigates you to 'about:blank#blocked'
and gives you a white screen

- 23,026
- 8
- 58
- 72