JunoLab: Cannot Interrupt/Kill Julia Process Midway


#1

Hello!

I posted about this on the Atom discussion page, but I was recommended to post it here as well.

I am currently using Atom version 1.33.1 on Windows 10 to execute Julia code through the JunoLab package, and I’m using version 1.0.2 of Julia. I have noticed recently that I am unable to interrupt the code I am running in Julia before it has finished executing all the way. I used to use the keyboard shortcut “Ctrl-Shift-C” to do this, but it seems to be unresponsive. I also tried using the “Interrupt Julia” button in the toolbar, but that doesn’t seem to work either.

This is happening for all the code I run, not just a particular program. Something as simple as a for loop that prints all the numbers from 1 to 1,000,000 to the console cannot be interrupted. If anyone has any insight as to why I’m having this problem, I would be very grateful.

Thank you.


#2

Did you deactivate the Enable Powershell Wrapper option in the julia-client settings? Having that enabled is required for interrupts to work in the editor.

That said, interrupts in Juno are somewhat brittle on all OSs, but Windows is the worst. I might have something in the next release that at least makes ^C in the REPL the same as in a normal Julia REPL (although that’s not that much better – you might still get random segfaults and stuff).


#3

I’m not sure if you’re seeing this also with long programs that don’t print - but I’ve noticed that when I run programs that print a bunch to the console, the interrupt may work but the console keeps scrolling (not sure if there’s and output buffer or something?).

What if you do:

for i in 1:10  
    println(i)
    sleep(2)
end

#4

I encountered a similar problem in Jupyter. Interrupting Julia doesn’t seem to have any affect. The output keeps on scrolling. But restarting Julia does work for me.


#5

I double-checked, and the option is enabled in the julia-client settings.

Today I tried using the interrupt on the for loop again, and this time it worked, although I’m not sure what changed. However, I’m still having trouble getting the interrupt to work when the code is using another module.

For example, I’m working with several colleagues on implementing our simulation. One of them writes a module with some functions that I need for my code. I import the module into my section of code and start the code running. The simulation gets stuck in a loop somewhere while it’s evaluating one of the functions in the module, so I need to interrupt it. But for some reason it won’t allow me to interrupt it.

Do you have any idea what could be causing this? Thanks again for your help.


#6

Thanks for the suggestion. For some reason the for loop interruptions started working again today, although I don’t know why. I’m still having trouble getting the interruptions to work when the code is stuck in another module’s function. (See the previous reply if you’re interested.)