17
uuid
7y

La me working on a new chrome extension:

- ok, this page has some hidden divs, I need to tell the extension to make windows scroll to the bottom while there are still elements with a hidden class
- creates a while(1) loop with a condition inside it to break if no elements with hidden class are longer there.
- happy with the code
- uploads the extension
- goes to page
- brings out developer tools
- goes to console
- clicks on extension on chrome
- right clicks the extension and then inspect
- ok here we go: la me click on button inside extension popup
- console shows some logs
- nice it's still looking.
.
.
.
- wait! Why is the page not scrolling ???
- looks at logs, WTF nothing changes in logs .....
- OMMMMG a infinite loop .... infinite loop inside chrome ....
- OMMMMMG my pc's gonna crash .
-stop please stop stop.
- wait! how do I stop this?
- tries CTRL+C ... nothing
- tries CTRL+Z ... nothing ...
.
.
.
.
Abort abort Aboooooort.
.
.
.
- Deletes extension from chrome.
-..... loop still running
- clicks on X to close Chrome.....
- not closing O_o
- Oh God, i need to do something before Chrome sucks all the RAM left.
- remembers the savior...
.
.
.
- Task Manager heeeelp me.
- opens Task manager
- chrome is consuming ~ 2 GB of RAM.
- WTF! Kills chrome.

Thanks for reading my lil adventure 😅

Comments
  • 2
    And this is why you avoid infinite loops 😂
    Atleast you saved it before you ran out of ram.
  • 2
    Speaking of Chrome and ram, I have the bad habit of leaving tabs open all over the place.

    From time to time the PC feels a little slow, then I'll check the task manager, and no surprise, Chrome is using all my ram.

    That's a great reminder to close some tabs.
  • 2
    @C0D4 it's been a while since I had an infinite loop. This one was a nasty one, especially that it involves Chrome.
  • 2
    @imacat I just switched to Firefox a week ago. I got fed up with Chrome consuming lots of RAM even tho 1 tab is open.
  • 2
    @imacat let me advise you these extensions:

    - Toby - https://chrome.google.com/webstore/...
    - The Great Suspender - https://chrome.google.com/webstore/...

    They save you a lot of hassle when using Chrome and... tabs start eating all your memory.
Add Comment