# P5 crashes chrome

**URL:** <https://discourse.processing.org/t/p5-crashes-chrome/2770>\
**Category:** p5.js\
**Created:** [August 19, 2018, 4:33am UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770 "2018-08-19T04:33:44Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)\
**Post date:** [August 19, 2018, 4:33am UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/1 "2018-08-19T04:33:44Z")

</div>

Whenever I try to run a p5.js sketch in chrome, whether it’s the web editor, the html file, or opening a server with the p5.js mode in processing, I get a "this application has stopped working pop-up, and all chrome windows close. I have tried reinstalling chrome, but it doesn’t work. It works on firefox, but I would prefer if i could make it work on chrome. Does anybody know how I could fix this?

---

<div class="post-metadata">

**Author:** ![TheWizardBear](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/thewizardbear/32/3552_2.png) [@TheWizardBear](https://discourse.processing.org/u/TheWizardBear)\
**Post date:** [August 19, 2018, 8:13am UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/2 "2018-08-19T08:13:37Z")

</div>

There isn’t something wrong with the sketch: perhaps an infinite loop or it is running too many tasks at once for the browser to handle?

---

<div class="post-metadata">

**Author:** ![tony](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tony/32/949_2.png) [@tony](https://discourse.processing.org/u/tony)\
**Post date:** [August 20, 2018, 2:32am UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/3 "2018-08-20T02:32:26Z")

</div>

Could you give us some specs?

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [August 20, 2018, 4:22am UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/4 "2018-08-20T04:22:20Z")

</div>

Please provide an MCVE. Did you run the developer tools? If something is going wrong, it should be able to tell you there. If we are able to reproduce it, then we will be able to help.

Kf

---

<div class="post-metadata">

**Author:** ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)\
**Post date:** [August 21, 2018, 1:29am UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/5 "2018-08-21T01:29:57Z")

</div>

Where are the developer tools? It isn’t an infinite loop, it happens with any p5 file, including one with one setup, draw, and createCanvas.

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [August 21, 2018, 4:25am UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/6 "2018-08-21T04:25:32Z")

</div>

In chrome, developers tools is accessed via `ctrl+shift+I` by default. You want to go to the **console** tab. If you refresh the page and interact witht the page, you should be able to see any messages there, even errors.

Provide the code that is giving you trouble.

Kf

---

<div class="post-metadata">

**Author:** ![Kevin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kevin/32/2297_2.png) [@Kevin](https://discourse.processing.org/u/Kevin)\
**Post date:** [August 21, 2018, 5:09pm UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/7 "2018-08-21T17:09:55Z")

</div>

Like @kfrajer mentioned, it’s really hard to help you if you don’t post your code as a **minimal, complete, and verifiable example** (aka an [MCVE](https://stackoverflow.com/help/mcve)). This means [debugging your code](https://happycoding.io/tutorials/processing/debugging) and [isolating the problem](https://happycoding.io/tutorials/how-to/program) into a small example that we can run ourselves to see the problem.

And yes, you should check out your developer tools to look for any errors. Shameless self-promotion: here is a guide on using your developer tools:

> **[Developer Tools](https://happycoding.io/tutorials/javascript/developer-tools)**
>
> Meet your new best friend.

Although if you’re hitting an infinite loop, you probably won’t see anything here. Your best bet is to post your MCVE.

---

<div class="post-metadata">

**Author:** ![kjhollen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kjhollen/32/23_2.png) [@kjhollen](https://discourse.processing.org/u/kjhollen)\
**Post date:** [August 21, 2018, 5:46pm UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/8 "2018-08-21T17:46:51Z")

</div>

@Kevin @kfrajer I’d like to suggest that instead of linking to an article describing an acronym, please just describe what you would like the original poster to do. Maybe there’s a way that this can be set up as a template for frequent helpers & posters. Even as an experienced contributor, I found the responses to this post unfriendly and gatekeeper-like.

@Quillbert1 is there a short, running sketch that you can paste here to help us debug the issue? Or linking to the sketch in the editor is great. Another user reported that they were using an older version of Mac OS and that they were able to get better results by upgrading their operating system. Maybe some of the debugging suggestions in this thread will be helpful: [Performance issue: p5.js crushing my CPU (possible retina issue?)](https://discourse.processing.org/t/performance-issue-p5-js-crushing-my-cpu-possible-retina-issue/999)

---

<div class="post-metadata">

**Author:** ![Kevin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kevin/32/2297_2.png) [@Kevin](https://discourse.processing.org/u/Kevin)\
**Post date:** [August 21, 2018, 5:58pm UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/9 "2018-08-21T17:58:49Z")

</div>

@kjhollen Apologies. It’s easy to slip into “short answer” mode when you’re trying to reply to the number of posts we get on this forum. I’ve added some context and additional links.

And fwiw we do have this template:

> [@Guidelines—Asking Questions](https://discourse.processing.org/t/guidelines-tips-on-asking-questions/2147):
>
> Summary (TL;DR) Ask complete questions to get better answers! Be specific. For example: I want to load an image. I tried using createImg() , and I expected the image to be on canvas, but what happened instead was the image showing up below the canvas. Isolate your problem and work in small steps. Share only the code directly related to your problem if it is part of a bigger project, and if something isn’t working, try the smallest code that could do the thing you want. Can we run your code to …

---

<div class="post-metadata">

**Author:** ![kjhollen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kjhollen/32/23_2.png) [@kjhollen](https://discourse.processing.org/u/kjhollen)\
**Post date:** [August 21, 2018, 6:13pm UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/10 "2018-08-21T18:13:46Z")

</div>

@Kevin yes, keeping up with the volume is difficult. I’m grateful for the time that you’re able to spend answering so many questions! Thank you for sharing these tips with me—while these are useful and valuable, I had something else in mind.

What I mean to suggest is that maybe there’s a place we can just have some succinct, friendly responses to common post/format issues that frequent question-answerers can start with to ensure that their responses are gentle for new posters. I’m willing to spend some time on this and will think about where to keep it.

---

<div class="post-metadata">

**Author:** ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)\
**Post date:** [August 25, 2018, 8:06pm UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/11 "2018-08-25T20:06:25Z")

</div>

It doesn’t give me time to open the console, it just crashes. I am using the empty-example index.html, and the sketch file is this:

```auto
function setup() {
  // put setup code here
  createCanvas(600,400);
}

function draw() {
  // put drawing code here
}

```

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [August 25, 2018, 10:37pm UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/12 "2018-08-25T22:37:59Z")

</div>

You need to walk us through each step of what you are doing. I mean, re-installing chrome is very… odd. To be installing Chrome means to me that you are a chrome developer and something went really wrong. To solve this problemSo, let’s go back from the beginning. What Operating system are you using? What browsers do you have beside Chrome?

Now, you have and index html. Provide this code. Also show us how you add the p5.js code. Finally, how do you run it?

Notice that for this, you do not need to setup any server.

Kf

---

<div class="post-metadata">

**Author:** ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)\
**Post date:** [August 26, 2018, 3:32am UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/13 "2018-08-26T03:32:58Z")

</div>

I am using windows 10. I also have internet explorer, edge, and firefox. I run the program by right clicking on the index.html file and opening with chrome. I open the sketch file with sublime text 3, edit it, and save it. The index.html code is:

```auto
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0>
    <style> body {padding: 0; margin: 0;} </style>
    <script src="../p5.min.js"></script>
    <script src="../addons/p5.dom.min.js"></script>
    <script src="../addons/p5.sound.min.js"></script>
    <script src="sketch.js"></script>
  </head>
  <body>
  </body>
</html>

```

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [August 26, 2018, 9:18am UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/14 "2018-08-26T09:18:35Z")

</div>

> **[Code 800A0404 issue](https://Discourse.Processing.org/t/code-800a0404-issue/2036/3)**
>
> Easiest & fastest recipe to run “.js” sketches under p5.js: 🏃 Install any Firefox-based browser in your OS and use it to open your “index.html” file: 🦊 Install Notepad2 or Notepad++ (or both) in your OS and use it to type in your “sketch.js”...

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [August 26, 2018, 9:20am UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/15 "2018-08-26T09:20:37Z")

</div>

[Chrome-allow-file-access-from-file.com](http://Chrome-allow-file-access-from-file.com)

---

<div class="post-metadata">

**Author:** ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)\
**Post date:** [August 26, 2018, 6:25pm UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/16 "2018-08-26T18:25:59Z")

</div>

I guess i will just have to use firefox then, because command line is disabled on my computer. Thanks anyways.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [August 26, 2018, 6:48pm UTC](https://discourse.processing.org/t/p5-crashes-chrome/2770/17 "2018-08-26T18:48:30Z")

</div>

Add `--allow-file-access-from-files` to the shortcut. No command line’s needed at all! 😉
