Julia terminal crashes unexpectedly

Hi !
I am using Julia to run some Finite Element simulations with code that I wrote (based on the Ferrite.jl package).
Running the exact same code two times, the first time the analysis finishes with no errors, while the second time the following error appears in the VS Code notifications:

The terminal process “C:\Users\user\AppData\Local\Programs\julia-1.11.1\bin\julia.exe ‘-i’, ‘–banner=no’, ‘–project=C:\Users\user.julia\environments\v1.11’, ‘c:\Users\user.vscode\extensions\julialang.language-julia-1.127.2\scripts\terminalserver\terminalserver.jl’, ‘\.\pipe\vsc-jl-repl-f185ceeb-05e0-4c21-be36-cc16035db42a’, ‘\.\pipe\vsc-jl-repldbg-65edd950-2663-4529-8bfc-b3bec7de43b3’, ‘\.\pipe\vsc-jl-cr-90aa9c0b-2a26-4870-bda2-e8293db3f0b6’, ‘USE_REVISE=true’, ‘USE_PLOTPANE=true’, ‘USE_PROGRESS=true’, ‘ENABLE_SHELL_INTEGRATION=true’, ‘DEBUG_MODE=false’” terminated with exit code: 1.

In the above paths the actual user name is replaced by “user”.

Any idea why this happens sometimes with no apparent pattern ? One thing that I noticed is that this occurs when the analysis takes some time to run (more that 5 - 10 minutes).

Thanks a lot in advance !

It is difficult to give you any advice on this. Did you perhaps run out-of-memory?

It would be easier for us if:

  • you would run the code in a Julia terminal without using VSCode, because that would rule out the possibility that VSCode is causing the problem
  • if you would not use Revise (reduces complexity)
  • if you would share the code that you are running

Thanks for your very prompt reply.
The code is actually a big repository which will be made public in a few days.
I do not know what Revise is or how I may disable it.
I monitor resources regularly and I don’t think memory is an issue. During the analysis the consumption is at ~50Gb / 128Gb.

How would I run the code directly from the Julia REPL ? Navigate to the path and just type the name of the "main.jl: script ?

cd myproject # name of the folder containing Project.toml
julia --project 

and then in Julia:

include("src/main.jl")

assuming you are using a local environment and the main.jl file is in the src folder.

If you are not using Bash you might have to type include("src\\main.jl) instead.

If you are not using a local environment, start Julia without the parameter --project.

Make sure you are not loading any packages in ~/.julia/config/startup.jl.

And please read: Working with Julia projects | Julia programming notes

Great ! Running it in the Julia terminal right now.

I will also check out the notes.
Thank you very much!

See: GitHub - timholy/Revise.jl: Automatically update function definitions in a running Julia session

While it is useful during development because you need to restart Julia a lot less often, it can also cause bugs (in rare cases).

While running directly in the Julia terminal did allow for some longer analyses to finish, the terminal just stopped running in some cases, with no error appearing.
Is there any file where julia terminal errors/crashes are logged ?

You could try use the Windows Event Log to see if the operating system has a reason for why the process aborted, see Identifying crashes with the Windows Event Log | Software Verify.

2 Likes


Thanks for your reply.
Unfortunately I do not see anything in the Event Viewer. I know for certain that a REPL crash occured from 20:00 to 22:00, however I do not see any errors during that time interval.

Off topic: The shell will make no difference here. Programmatically generated paths can always use /. Only the Windows command line or batch files require \.