Precompiling most packages fails in Atom/Juno with 1.6.0

I wish I could narrow down the problem more precisely than this, but since updating to 1.6.0, I have begun to encounter very strange behavior when calling using Polyhedra (and various other packages) from the REPL embedded in Atom with Juno. Julia itself starts just fine, but as soon as I try to import a package, the screen blanks out and I get all these strange blank lines:

It just hangs like this. I don’t think it is a compatibility issue with a specific package, because this happens for most of the external packages that I have installed (although built-in packages like Random work just fine).

I am using Atom 1.55.0, Juno 0.12.6, and Windows 10 Home build 19042.928.

Any ideas?

To start, please read PSA: make it easier to help you, particularly point 1.

It’s not clear how you generated a bunch of blank lines, and an image of blank lines can’t really help us to provide you with additional advice.

Point 1 in the PSA asks to provide a code sample.

Unfortunately, there really isn’t much more to this than what’s in the OP. The steps to replicate this behavior on my machine are

  1. Install Julia 1.6.0 and a third-party package, such as Polyhedra.
  2. Open a new Julia 1.6.0 project in Atom.
  3. Run Julia, then type using Polyhedra (this is my full code sample) into the REPL in Atom.

This results in the output shown in the screenshot.

Clearly, not everyone is having this issue, so I assume the problem is with my environment. But that consists of thousands of things: my Windows build, my localization settings, my hardware. I have no idea which of these is causing the issue, so I am posting here on the hope that someone has experienced the same phenomenon and was able to trace it to a specific element of their Julia stack.

2 Likes

Atom probably evaluates into Julia this initialization script. I made some modifications so that it can run stand-alone

(@v1.6) pkg> activate --temp
  Activating new environment at `/var/folders/nn/79j5ndb55cncryrm2csgc0w80000gp/T/jl_M8MMfK/Project.toml`

julia> include("atom-boot-repl.jl")

(jl_M8MMfK) pkg> add Polyhedra
   Resolving package versions...
    Updating `/private/var/folders/nn/79j5ndb55cncryrm2csgc0w80000gp/T/jl_M8MMfK/Project.toml`
  [67491407] + Polyhedra v0.6.13
    Updating `/private/var/folders/nn/79j5ndb55cncryrm2csgc0w80000gp/T/jl_M8MMfK/Manifest.toml`
  [79e6a3ab] + Adapt v3.3.0

[...]

julia> using Polyhedra

julia>

That the terminal interface is seemingly failing may be related to the underlying issue, but perhaps you can try to run the steps above in a non-Atom terminal to see what you get.

I wasn’t able to get that far:

(@v1.6) pkg> activate --temp
  Activating new environment at `C:\Users\Max\AppData\Local\Temp\jl_JQaXhS\Project.toml`

julia> include("atom-boot-repl".jl)
ERROR: type String has no field jl
Stacktrace:
 [1] getproperty(x::String, f::Symbol)
   @ Base .\Base.jl:33
 [2] top-level scope
   @ REPL[3]:1

julia> include("atom-boot-repl.jl")
ERROR: SystemError: opening file "C:\\Users\\Max\\atom-boot-repl.jl": No such file or directory
Stacktrace:
  [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
    @ Base .\error.jl:168
  [2] #systemerror#62
    @ .\error.jl:167 [inlined]
  [3] systemerror
    @ .\error.jl:167 [inlined]
  [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)
    @ Base .\iostream.jl:293
  [5] open
    @ .\iostream.jl:282 [inlined]
  [6] open(f::Base.var"#326#327"{String}, args::String; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base .\io.jl:328
  [7] open
    @ .\io.jl:328 [inlined]
  [8] read
    @ .\io.jl:434 [inlined]
  [9] _include(mapexpr::Function, mod::Module, _path::String)
    @ Base .\loading.jl:1144
 [10] include(fname::String)
    @ Base.MainInclude .\client.jl:444
 [11] top-level scope
    @ REPL[4]:1

FWIW, I have already tried reinstalling Atom, and reinstalling Juno from within Atom.

Sounds like you figured out how to fix one of the errors I made! Sorry about that. I’ve edited the post.

You should download the file pointed to by the link, save it to e.g. the path "C:\\Users\\Max\\atom-boot-repl.jl". You can do this however you’d like. Here’s one way within Julia:

julia> using Downloads

julia> Downloads.download("https://gist.githubusercontent.com/goretkin/f34e48e873dc4d63c856778bbfbe6601/raw/0214bdbbca80b8a914b2264ce20ce02396ec98e1/atom-boot-repl.jl", "./atom-boot-repl.jl")

Aha, I get it now.

Oddly, the process you have described works just fine in an isolated terminal, although I get somewhat different output:

(jl_JQaXhS) pkg> activate --temp
  Activating new environment at `C:\Users\Max\AppData\Local\Temp\jl_mtdGmY\Project.toml`

julia> include("atom-boot-repl.jl")
Starting Julia...
[ Info: Precompiling Atom [c52e3926-4ff0-5f6e-af25-54175e0327b1]
would connect

(jl_mtdGmY) pkg> add Polyhedra
    Updating registry at `C:\Users\Max\.julia\registries\General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
    Updating `C:\Users\Max\AppData\Local\Temp\jl_mtdGmY\Project.toml`
  [67491407] + Polyhedra v0.6.13
    Updating `C:\Users\Max\AppData\Local\Temp\jl_mtdGmY\Manifest.toml`
  [79e6a3ab] + Adapt v3.3.0
  [6e4b80f9] + BenchmarkTools v0.5.0
  [49dc2e85] + Calculus v0.5.1
[...]

julia> using Polyhedra

julia>

Is that “would connect” line significant?

That’s just something I put in because I commented out the part where it actually tries to connect to Atom.

Can you use GitHub - julia-vscode/julia-vscode: Julia extension for Visual Studio Code instead of Juno / Atom? I’d recommend that.

1 Like

Can you use GitHub - julia-vscode/julia-vscode: Julia extension for Visual Studio Code instead of Juno / Atom?

I mean, for certain values of can, I can. But I really like the Atom interface, and since it works fine on my other machines, I’d prefer not to switch to an unfamiliar tool.

Is there a reason, beyond this apparently rare bug, to use VS Code instead of Atom in general? When I started with Julia, I read that Atom was the definitive development studio of choice.

Take a look at GitHub - JunoLab/atom-julia-client: Juno a good IDE?

Attention : We have decided to join forces with the Julia extension for VSCode. As such, this Atom-based plugin is effectively in “maintenance-only mode” and we expect to only work on bug fixes in the future.

1 Like

Huh, thank you. What’s the history behind the decision to abandon Juno?

There is a thread or two about it, but short the Atom ~lost~ to VS Code generally.

I installed VSCode now and am still having a similar issue.

julia> using Polyhedra
[ Info: Precompiling Polyhedra [67491407-f73d-577b-9b50-8179a7c68029]

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x0 --  at 0x0 -- CESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x0 --  at 0x0 -- CESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x0 --  at 0x0 -- CESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x0 --  at 0x0 -- CESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x0 --  at 0x0 -- CESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x0 --  at 0x0 -- CESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x0 --  at 0x0 -- CESS_VIOLATION at 0x0 -- unknown function (ip: 0000000000000000)
in expression starting at none:0
0000)
in expression starting at none:0
0000)
in expression starting at none:0
in expression starting at none:0
0000)
ERROR: LoadError: LoadError: LoadError: Failed to precompile JSONSchema [7d188eb4-7ad8-530c-ae41-71a32a6d4692] to C:\Users\Max\.julia\compiled\v1.6\JSONSchema\jl_2FC.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
    @ Base .\loading.jl:1360
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1306
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1021
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:914
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:901
  [7] include(mod::Module, _path::String)
    @ Base .\Base.jl:386
  [8] include(x::String)
    @ MathOptInterface.FileFormats ~\.julia\packages\MathOptInterface\5WwpK\src\FileFormats\FileFormats.jl:1
  [9] top-level scope
    @ ~\.julia\packages\MathOptInterface\5WwpK\src\FileFormats\FileFormats.jl:13
 [10] include(mod::Module, _path::String)
    @ Base .\Base.jl:386
 [11] include(x::String)
    @ MathOptInterface ~\.julia\packages\MathOptInterface\5WwpK\src\MathOptInterface.jl:1
 [12] top-level scope
    @ ~\.julia\packages\MathOptInterface\5WwpK\src\MathOptInterface.jl:148
 [13] include
    @ .\Base.jl:386 [inlined]
 [14] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base .\loading.jl:1213
 [15] top-level scope
    @ none:1
 [16] eval
    @ .\boot.jl:360 [inlined]
 [17] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [18] top-level scope
    @ none:1
in expression starting at C:\Users\Max\.julia\packages\MathOptInterface\5WwpK\src\FileFormats\MOF\MOF.jl:1
in expression starting at C:\Users\Max\.julia\packages\MathOptInterface\5WwpK\src\FileFormats\FileFormats.jl:1
in expression starting at C:\Users\Max\.julia\packages\MathOptInterface\5WwpK\src\MathOptInterface.jl:1
ERROR: LoadError: Failed to precompile MathOptInterface [b8f27783-ece8-5eb3-8dc8-9495eed66fee] to C:\Users\Max\.julia\compiled\v1.6\MathOptInterface\jl_C036.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
    @ Base .\loading.jl:1360
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1306
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1021
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:914
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:901
  [7] include
    @ .\Base.jl:386 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base .\loading.jl:1213
  [9] top-level scope
    @ none:1
 [10] eval
    @ .\boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at C:\Users\Max\.julia\packages\JuMP\y5vgk\src\JuMP.jl:11
ERROR: LoadError: Failed to precompile JuMP [4076af6c-e467-56ae-b986-b466b2749572] to C:\Users\Max\.julia\compiled\v1.6\JuMP\jl_BBD1.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
    @ Base .\loading.jl:1360
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1306
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1021
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:914
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:901
  [7] include
    @ .\Base.jl:386 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base .\loading.jl:1213
  [9] top-level scope
    @ none:1
 [10] eval
    @ .\boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at C:\Users\Max\.julia\packages\Polyhedra\22Lq1\src\Polyhedra.jl:1
ERROR: Failed to precompile Polyhedra [67491407-f73d-577b-9b50-8179a7c68029] to C:\Users\Max\.julia\compiled\v1.6\Polyhedra\jl_B684.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
    @ Base .\loading.jl:1360
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1306
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1021
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:914
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:901
  [7] eval
    @ .\boot.jl:360 [inlined]
  [8] eval
    @ .\Base.jl:39 [inlined]
  [9] repleval(m::Module, code::Expr, #unused#::String)
    @ VSCodeServer ~\.vscode\extensions\julialang.language-julia-1.1.38\scripts\packages\VSCodeServer\src\repl.jl:124
 [10] (::VSCodeServer.var"#47#49"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~\.vscode\extensions\julialang.language-julia-1.1.38\scripts\packages\VSCodeServer\src\repl.jl:99
 [11] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging .\logging.jl:491
 [12] with_logger
    @ .\logging.jl:603 [inlined]
 [13] (::VSCodeServer.var"#46#48"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~\.vscode\extensions\julialang.language-julia-1.1.38\scripts\packages\VSCodeServer\src\repl.jl:100
 [14] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [15] invokelatest(::Any)
    @ Base .\essentials.jl:706
 [16] macro expansion
    @ ~\.vscode\extensions\julialang.language-julia-1.1.38\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined]
 [17] (::VSCodeServer.var"#60#61")()
    @ VSCodeServer .\task.jl:406

julia>