# Failing to precompile external packages after upgrading to 1.6.0, but only when using an IDE

**URL:** <https://discourse.julialang.org/t/failing-to-precompile-external-packages-after-upgrading-to-1-6-0-but-only-when-using-an-ide/59638>\
**Category:** VS Code\
**Created:** [April 20, 2021, 5:44am UTC](https://discourse.julialang.org/t/failing-to-precompile-external-packages-after-upgrading-to-1-6-0-but-only-when-using-an-ide/59638 "2021-04-20T05:44:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxkapur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maxkapur/32/21208_2.png) [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Post date:** [April 20, 2021, 5:44am UTC](https://discourse.julialang.org/t/failing-to-precompile-external-packages-after-upgrading-to-1-6-0-but-only-when-using-an-ide/59638/1 "2021-04-20T05:44:13Z")

</div>

I recently upgraded to Julia 1.6.0, and everything is working fine when calling Julia _from the command line._ However, when using Julia within an IDE–whether VSCode, Atom/Juno, or Jupyter Lab–I get an `EXCEPTION_ACCESS_VIOLATION` error whenever I attempt to import a non-core package.

I am using Windows 10 Home version 20H2.

Steps to reproduce in VSCode:

1. Install Julia 1.6.0, VSCode, and the Julia language extension.
2. Install a Julia package, like `ForwardDiff` .
3. Create or open a new Julia project in VSCode. In the example below, I ran Julia with the `--project` flag, but this doesn’t make a difference.
4. Create a blank `.jl` file, type `using ForwardDiff` , and run it.

The error shown below appears.

```julia
julia> using ForwardDiff
[Info: Precompiling ForwardDiff [f6369f11-7733-5829-9624-2563aa707210]

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 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 -- unknown function (ip: 0000000000000000)
in expression starting at C:\Users\Max\.julia\packages\ChainRulesCore\7d1hl\src\ChainRulesCore.jl:5
in expression starting at C:\Users\Max\.in expression starting at C:\Users\Max\.julia\packages\ChainRulesCore\7d1hl\src\ChainRulesCore.jl:5
ERROR: LoadError: Failed to precompile ChainRulesCore [d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4] to C:\Users\Max\.julia\compiled\v1.6\ChainRulesCore\jl_E773.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\SpecialFunctions\mFAQ4\src\SpecialFunctions.jl:1
ERROR: LoadError: Failed to precompile SpecialFunctions [276daf66-3868-5448-9aa4-cd146d93841b] to C:\Users\Max\.julia\compiled\v1.6\SpecialFunctions\jl_E476.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\ForwardDiff\sqhTO\src\ForwardDiff.jl:1
ERROR: Failed to precompile ForwardDiff [f6369f11-7733-5829-9624-2563aa707210] to C:\Users\Max\.julia\compiled\v1.6\ForwardDiff\jl_C295.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

```

I use VSCode version 1.55.2 and Julia VSCode version 1.1.38.

I submitted a [bug report](https://github.com/julia-vscode/julia-vscode/issues/2111#issuecomment-822350575) to Julia VSCode, but I am not sure if the problem is VSCode specific or not, because I have similar issues in Atom/Juno as I posted [previously](https://discourse.julialang.org/t/precompiling-most-packages-fails-in-atom-juno-with-1-6-0/59308/10) and in Jupyter Lab.

Has anyone else encountered this issue? What other details can I provide about my environment that might shed some light?

* * *

I have also tried calling `Pkg.instantiate()` as suggested here with no luck:

> [@Package precompilation fails after updating to 1.6.0](https://discourse.julialang.org/t/package-precompilation-fails-after-updating-to-1-6-0/58004/3):
>
> Hi Kristoffer, when I run import Pkg Pkg.activate(".") using WavesAndEigenvalues.jl while my working directory is the local development version of the WavesAndEigenvalues repo. I get this: Thank you G

---

<div class="post-metadata">

**Author:** ![maxkapur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maxkapur/32/21208_2.png) [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Post date:** [April 26, 2021, 12:04am UTC](https://discourse.julialang.org/t/failing-to-precompile-external-packages-after-upgrading-to-1-6-0-but-only-when-using-an-ide/59638/2 "2021-04-26T00:04:13Z")

</div>

This issue has persisted for me after upgrading to 1.6.1.

Is there anything else I can try? I’m completely baffled. Julia 1.5.4 works just fine.

---

<div class="post-metadata">

**Author:** ![junder873](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@junder873](https://discourse.julialang.org/u/junder873)\
**Post date:** [May 19, 2021, 8:22pm UTC](https://discourse.julialang.org/t/failing-to-precompile-external-packages-after-upgrading-to-1-6-0-but-only-when-using-an-ide/59638/3 "2021-05-19T20:22:16Z")

</div>

I might have run into the same issue as you, also using Windows 10. It also might be a completely different issue.

When I run into this issue, I first enter the Pkg environment (press `]`) and then type `resolve`  
This usually shows some package that I have never installed (recently `XML2_jll`) that is causing an issue. I then add that package (`add XML2_jll`) and then remove it (`remove XML2_jll`). After this, everything works for me. I am not sure why these packages are added but this fixes it for me.
