🏠 back to Observable

Infinite Loops and You

Hi folks,

(and Happy Monday)

We’ve just deployed a minor improvement to our infinite loop detection in notebooks.

You may have noticed how (especially in Chrome, and Chrome-descended browsers) when you wrote an infinite loop in an Observable, not only would you have to close that tab … but you would also have to close all of your other open tabs for that author before Observable notebooks would begin responding again.

This is due to Chrome’s shared process model for web domains, even across iframes in different tabs.

Now, when you click on “Safe mode” in the “Notebook not responding” warning — Observable will automatically restart all crashed notebooks in your other tabs, so that your processes don’t stay stuck in infinite loop land.

(Hopefully, you then proceed in Safe mode to actually fix the infinite loop.)

If you’ve ever struggled with this behavior before, give it a try, and let us know if there’s anything here we can improve further.


Ah, that explains what this was about:


(I happened to check this morning if you had published any cool new notebooks - did you actually intend to make that one public?)

I did, for testing. Now you can import {loop} from "@jashkenas/infinite-loop" for all your notebook crashing needs…


You’re too kind, lol


I was working on one of my notebook and by mistake i closed safari browser.
Now whenever i start that notebook it shows that it is stuck in infinite loop.
I can switch to the safe and correct my mistake but the problem is there is actually no mistake i have done.
What should i do in this case?
I have deleted that notebook also now. But whenever i try to write the same code it gives me the same error of infinite loop.
I have become mad as i have tried solving this problem for 6 hours now.
What is the solution.
One which comes to my mind is that i create a new account.
Please HELP.

Hi @kanishk779,

I’m sorry to hear that this gave you so much trouble!

Please try closing all of your Observable tabs before working on the notebook you’re needing to fix. In some browsers, a single JavaScript process is shared between all tabs for the same website — which means that an infinite loop in one tab can get them all stuck, until you close them all and start again.

We have a bit of code in place to mitigate this when you click the button to enter Safe Mode, but it sounds like it’s not working for you.

Good luck!