hydrogen
hydrogen copied to clipboard
Cannot interrupt/kill kernel without force quitting Atom
Description:
Kernel cannot be killed without force quitting Atom.
Steps to Reproduce:
- Run an infinite while loop in an unsaved .py file
- Try to interrupt the process. Window is frozen. Kick self for not saving work prior to running.
Versions:
OSX 10.11.6 Atom 1.22.1 Hydrogen 2.1.0
Logs:
none
Does it work in a saved file? If it does it's probably related to #1064
What command did you use to interrupt the kernel?
The file was saved with one line in it and the kernel had been instantiated prior to that one line save.
I attempted to click on the bottom left of the window where is says "Python 2: Busy". The entire window was unresponsive. I could open a new window and use that, but the original window was unsalvageable (I waited a long time to see if it would respond before killing it).
Did you have any print
statements inside the loop?
I know that if you print output fast enough, Atom will hang because it can't keep up with displaying the messages. I've never seen it happen with just computations in the loop, though.
no, it was supposed to continue the loop until a variable was defined. Like this:
some_var = None
while not some_var:
i -= 1
if i == 100:
some_var = 'some string'
It wasn't exactly that, but similar in that it was fast iteration and would never succeed
SOLVED
~~any updates on this? here's my little example:~~
@DannyDannyDanny Your example could be resolved by interupting the kernel. Try opening up your command palette and searching for "Hydrogen: Interupt Kernel"
If you moved the print statement into the while loop there might be a problem because you've asked atom to render infinitely and other commands etc can become non-responsive.
I think the issue is that while the kernel is busy processing the infinite loop, the entire window in atom freezes. You can't cmd-shift-p or anything like that. The only solution is to completely kill the program and hopefully you saved your work 😬
I can take a video of this if you can't repro
You should see Python3|busy in the bottom of the IDE. Click there and force the interruption. It should switch in Python3|idle status
You should see Python3|busy in the bottom of the IDE. Click there and force the interruption. It should switch in Python3|idle status
Interrupt is not supported in windows, but you can restart the kernel.
Will interrupt be supported for Windows eventually?
@skim2257 please see #597
Same thing happened while I was running a python code. You'll see a option under Packages, script, You can stop a running script from there.
Yes that definitely helps thanks
Same thing happened while I was running a python code. You'll see a option under Packages, script, You can stop a running script from there.
There is one way to get out of kernel in a case of infinite loop - Ctrl+Tab. Worked for me. Do let me know if it works for you!
