MIT engineers have a reputation for applying their vast intellectual resources and physical energies toward solving some of mankind's greatest challenges. And it's fair to say this morning that at MIT's Computer Science and Artificial Intelligence Laboratory, researchers have lived up to that expectation.
They haven't built the first true AI, nor have they created perpetual motion or demonstrated a working fusion reactor. But they have figured out how to unfreeze a stalled word processing program so you can save your work, so surely those other things can't be far behind.
In all seriousness, the problem of "infinite loops" is beyond annoying. It saps productivity from software (and those using it). Infinite loops occur when a program gets stuck executing a single block of code over and over again (you probably know this as "freezing" or "f*&k!"). They often occur during functions where a program is trying to perform a task on many pieces of data in sequence, like when it searches for a word in a document for instance.
The problem occurs when the program, for whatever reason, doesn't know when to stop repeating that operation, or executing that same segment of code repeatedly. Hence the term loop. And hence your frustration, as now your program won't let you do anything else, including save your progress. So MIT researchers built a sort of crash cart for frozen programs that can shake them from an infinite loop, moving them along to the next logical block of code.
The program, appropriately named Jolt, recognizes infinite loops by examining the program's use of memory. Say your program appears to be stalled. When you run Jolt, it takes a look at the program's memory after each repetition of that loop. If there's a change after each execution, your program is probably doing something useful. If not, it's simply hung up in an infinite loop. Jolt then looks for the first instruction that follows the code the program is stuck on and forces the program to move ahead (for you programming types who are interested, there's a much more thorough nuts-and-bolts description over at MIT News).
That forced procedure may not restore the program to full functionality--for instance, Jolt (and its binary cousin Bolt) may not push the program to the correct next instruction--but ideally it will at least put the program in a state where you can save, quit, and relaunch. That beats retyping your term paper. After all, you stayed up all night just to get it finished.
unfortunately, this would also render the use of paradox in order to stop a power mad AI, useless.
why learn from your own mistakes, when you could learn from the mistakes of others?
I guess your would be really "f*&k!"d if jolt started looping then.
Generally an infinite loop is an error in the coding of the software itself. It tends to be caused when using any kind of loop syntax. All loops have some kind of exit condition (nevermind loops that are intended to run forever). If that exit condition is never met, then the loop continues forever.
As long as Jolt doesn't contain any loop syntax, there's relatively little chance it could ever enter an infinite loop of its own.
One suggestion, save as, not save, as the file could become corrupt and you would loose everything :D...
Isn't the definition of insanity doing the same thing over and over expecting different results, so you could say they create a cure for computer insanity.
I think the idea is cool, but it should be made into a developer tool. At least in the software I write, someone downloading and using this on it, could corrupt the database/files. Luckily most of the time it is n tier, and the server would just kick them off, but local operations could cause corruption that the server may be unable to detect. Users, as with all things check with your IT professionals before taking prescription apps for madness. Not all software is safe to bump ("Infinite non-progressing loops" are generally a result of a memory lock, so first ask, why would someone want to hide the key).
P.S. (Sorry about the soap box, well not really, but it is polite to suggest I am right?)
Developers, you should always write a timeout into memory locks, if the timeout passes, throw an exception to a safe point to recover. This removes any need for bumping, and ensures no infinite loops could exist. In other words, while bolt/jolt is cool conceptually, it should have rare practical value in a perfect world. This app at best guesses at a recovery point (not even a recovery point, just an actionable point.)
Why did the top-level intellectual resource in the country have to come up with this solution? Supposedly, modern computer hardware and software already makes these sorts of checks. Supposedly, the use of OOP all-but guarantees that these loops will never happen, particularly in production code. Maybe if the IT industry would stop cranking out garbage code as fast as it can, and focus on quality, society would have reliable computers. The trouble is, people tolerate low-quality computation. The IT industry is all about being just good enough.
"Supposedly, the use of OOP all-but guarantees that these loops will never happen"
You must never have written a program with a statement like that. OOP doesn't guarantee anything of the sort.
The trick here is to do what a developer's debug would do, but do it for someone that doesn't know anything about programming.
Then again depending on why the program is in an infinite loop, all you might do is crash the program. Or like the other person suggested write out garbage. Of course that all depends what it was doing. In truth if the program is hung up at the time it was in a routine to write out data you are probably screwed no matter if kick it out of the loop or not. And if it isn't writing anything, then most likely you could just kill the program and restart it.
There really is no substitute for understanding the basic rule of not saving your data at a rate equal to what you are willing to put back in if something goes wrong. Or have the program do that kind of automatic saving, which most word processor programs do these days anyways.
After all if the power goes out on your desktop (cord kicked, hardware failure...), or if you drop your laptop, or any of countless other things that can happen and infinite loop is the least of your problems.
P.S. If you have a program that goes into an infinite loop more then once in your lifetime you shouldn't be using it. With of the exception of your web browser, which in fact is not in an infinite loop like people think, instead it is waiting for something to happen on the Internet and network time outs are usually so long people give up long before the time out happens.
So who do you think will be smart enough to buy the software and integrate it into there software, Microsoft or Apple? If Microsoft were to buy it, I could see them integrating it into Microsoft office or Windows 8 some how... could make our lives much less stressful.
I onced used Jolt while drinking Jolt. <br><br>
<br> <br> I went back in time.
Most of the time ctrl+alt+del will solve the problem, although every once in a while my computer will freeze solid, the screen will gray and the only way out is a hard shut down.
This is with windows7
Not often but enough to get really frustrated!
And here boys and girls is our Moment of "DOH"!!
Let's say your PC is stuck in an "infinite loop". You can't do anything, ummmm why? Because your PC is stuck in an "infinite loop". Does not the term "infinite loop" (even slightly) suggest that your PC is no longer capable of performing tasks as simple and resource miserly as moving the cursor... since it's stuck in an "infinite loop".
Have I set the scene properly? I sure hope so or what I have to say next will be wasted on the geniuses who write these articles and develop wondrous Crash Carts.
Okay... now, your PC is stuck in an "infinite loop", incapable of doing a thing. BUT!! All you have to do is click on (Da-da-ta-da!!!!) CRASH CART and all your worries are over!
Ummm, hello! Hellllloooooooo! You can't even move your cursor to click on Crash Cart. Your PC is frozen, locked up, no longer functioning because it's STUCK IN AN "INFINITE FREAKING LOOP" ...(cough, cough) get the picture?
GOD!! I just love these moments of DOH!!! Lmfnao!