S
33

My first Python script crashed my computer last Tuesday

I wrote a loop that never ended and my laptop froze for 20 minutes before I could force shutdown. Has anyone else caused a mess like that starting out?
3 comments

Log in to join the discussion

Log In
3 Comments
grant_allen85
I read somewhere that one guy's infinite loop actually burned out his laptop's CPU fan because it was running at max for hours. My first disaster was typing the wrong variable name in a while loop, true story it locked up my machine so bad I had to pull the battery out. Those beginner bugs hit different when you don't know about the task manager or terminal kill commands yet.
8
faith684
faith68421d ago
Oh man, @grant_allen85 that reminds me of something my buddy did back in college. His first ever program had a while(true) loop and he left it running overnight because he didn't know how to stop it. The laptop got so hot the next morning that it actually melted the plastic near the power button, had to use it as a desktop after that.
4
skylerp31
skylerp3120d ago
Had a similar thing happen with an infinite loop that was writing to a file. Didn't notice until my SSD was completely full and Windows threw a fit. The file ended up being like 50GB and it took forever to delete because the system kept trying to index it. Learned the hard way to always put a delay in loops that write data or hell just add a counter that breaks after like 1000 iterations. Those early lessons stick with you though, now I triple check every loop condition before I hit run.
5