Reputation: 4396
I was using Gadfly
in Julia, then I added the packages StatsModels
and GLM
and got this error at the line using Gadfly
:
INFO: Precompiling module Gadfly.
ERROR: LoadError: LoadError:
Stacktrace:
[1] AssertionError(::String) at ./coreimg.jl:14
[2] update_valid_age!(::UInt64, ::UInt64, ::Core.Inference.InferenceState) at ./inference.jl:2353
[3] add_backedge!(::Core.MethodInstance, ::Core.Inference.InferenceState) at ./inference.jl:2366
[4] abstract_call_gf_by_type(::Any, ::Any, ::Core.Inference.InferenceState) at ./inference.jl:1421
...
[217] include(::String) at ./sysimg.jl:14
[218] include_from_node1(::String) at ./loading.jl:576
[219] include(::String) at ./sysimg.jl:14
[220] anonymous at ./<missing>:2fatal: error thrown and no exception handler available.
Base.MethodError(f=typeof(Core.Inference.convert)(), args=(Base.AssertionError, "invalid age range update"), world=0x0000000000000ac5)
rec_backtrace at /Users/osx/buildbot/slave/package_osx64/build/src/stackwalk.c:84
record_backtrace at /Users/osx/buildbot/slave/package_osx64/build/src/task.c:245 [inlined]
jl_throw at /Users/osx/buildbot/slave/package_osx64/build/src/task.c:564
...
jlcall__start_18991 at /Applications/Julia-0.6.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
true_main at /Applications/Julia-0.6.app/Contents/Resources/julia/bin/julia (unknown line)
main at /Applications/Julia-0.6.app/Contents/Resources/julia/bin/julia (unknown line)
ERROR: LoadError: Failed to precompile Gadfly to /Users/mmorin/.julia/lib/v0.6/Gadfly.ji.
Stacktrace:
[1] compilecache(::String) at ./loading.jl:710
[2] _require(::Symbol) at ./loading.jl:497
[3] require(::Symbol) at ./loading.jl:405
[4] include_from_node1(::String) at ./loading.jl:576
[5] include(::String) at ./sysimg.jl:14
while loading /Users/mmorin/RED/Figure1.jl, in expression starting on line 3
The whole message has 400 lines and the stacktrace is 200 levels deep, so I pasted the most relevant bits for brevity. I restarted Julia, removed StatsModels
and GLM
with Pkg.rm()
, then also removed and added Gadfly
, and got exactly the same error. How can I fix it?
Upvotes: 0
Views: 2727
Reputation: 4396
After hours of searching and trying, I talked to a Julia expert. This looks like a compiler error. Although it's undesirable to reset all Julia packages, the only solution was to move ~/.julia
to a backup:
mv ~/.julia ~/.julia_backup
Then restart Julia and run
Pkg.add.(["Gadfly", "StatsModels", "GLM"])
using Gadfly, StatsModels, GLM
Upvotes: 1