Encountering a weird issue with Julia that seems to be something to do with some internal state as it persists between session restarts. This issue suddenly cropped up during a long running session, where states that were usually show
-ing or display
-ing no problem started throwing this weird REPL issue (included below).
Restarting Julia doesn’t help; the error persists. No clue as to what triggered this issue as previously my project’s structs were displaying just fine, and tests with simple structs have no issue being displayed in the REPL. Not only does this persist between sessions, I switched from 1.8.5 to 1.9 and the problem is still there!
The only thing I can think of is constant use of Revise.jl caused something in ~/.julia to be modified in an unhappy way, with this compounding error stream being the result, however I’m not sure what I should clear out from ~/.julia to get back to a clean slate (would prefer not to nuke everything).
Any advice would be appreciated!
julia> cam0
Error showing value of type ERROR: TypeError: in isdefined, expected Symbol, got a value of type Core.Compiler.IdDict{Core.Compiler.InferenceState, Nothing}
Stacktrace:
[1] make_typealias(x::Type)
@ Base ./show.jl:610
[2] show_typealias(io::IOContext{Base.TTY}, x::Type)
@ Base ./show.jl:790
[3] _show_type(io::IOContext{Base.TTY}, x::Type)
@ Base ./show.jl:955
[4] show(io::IOContext{Base.TTY}, x::Type)
@ Base ./show.jl:950
[5] print(io::IOContext{Base.TTY}, x::Type)
@ Base ./strings/io.jl:35
[6] print(::IOContext{Base.TTY}, ::String, ::Type, ::Vararg{Any})
@ Base ./strings/io.jl:46
[7] println(::IOContext{Base.TTY}, ::String, ::Type, ::Vararg{Any})
@ Base ./strings/io.jl:75
[8] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
@ REPL ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:310
[9] (::REPL.var"#57#58"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
@ REPL ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:287
[10] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
@ REPL ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:557
[11] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
@ REPL ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:285
[12] (::REPL.var"#do_respond#80"{Bool, Bool, REPL.var"#93#103"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
@ REPL ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:899
[13] #invokelatest#2
@ ./essentials.jl:816 [inlined]
[14] invokelatest
@ ./essentials.jl:813 [inlined]
[15] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
@ REPL.LineEdit ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/LineEdit.jl:2647
[16] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
@ REPL ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:1300
[17] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
@ REPL ./task.jl:514
caused by: TypeError: in isdefined, expected Symbol, got a value of type Core.Compiler.IdDict{Core.Compiler.InferenceState, Nothing}
Stacktrace:
[1] make_typealias(x::Type)
@ Base ./show.jl:610
[2] show_typealias(io::IOContext{Base.TTY}, x::Type)
@ Base ./show.jl:790
[3] _show_type(io::IOContext{Base.TTY}, x::Type)
@ Base ./show.jl:955
[4] show(io::IOContext{Base.TTY}, x::Type)
@ Base ./show.jl:950
[5] _show_default(io::IOContext{Base.TTY}, x::Any)
@ Base ./show.jl:463
[6] show_default
@ ./show.jl:459 [inlined]
[7] show
@ ./show.jl:454 [inlined]
[8] show(io::IOContext{Base.TTY}, #unused#::MIME{Symbol("text/plain")}, x::
SYSTEM (REPL): showing an error caused an error
ERROR: TypeError: in isdefined, expected Symbol, got a value of type Core.Compiler.IdDict{Core.Compiler.InferenceState, Nothing}
Stacktrace:
[1] make_typealias(x::Type)
@ Base ./show.jl:610
[2] show_typealias(io::IOContext{IOBuffer}, x::Type)
@ Base ./show.jl:790
[3] _show_type(io::IOContext{IOBuffer}, x::Type)
@ Base ./show.jl:955
[4] show(io::IOContext{IOBuffer}, x::Type)
@ Base ./show.jl:950
[5] sprint(f::Function, args::Type; context::IOContext{Base.TTY}, sizehint::Int64)
@ Base ./strings/io.jl:112
[6] sprint
@ ./strings/io.jl:107 [inlined]
[7] #print_type_bicolor#540
@ ./show.jl:2491 [inlined]
[8] show_tuple_as_call(io::IOContext{Base.TTY}, name::Symbol, sig::Type; demangle::Bool, kwargs::Nothing, argnames::Vector{Symbol}, qualified::Bool, hasfirst::Bool)
@ Base ./show.jl:2472
[9] show_tuple_as_call
@ ./show.jl:2441 [inlined]
[10] show_spec_linfo(io::IOContext{Base.TTY}, frame::Base.StackTraces.StackFrame)
@ Base.StackTraces ./stacktraces.jl:244
[11] print_stackframe(io::IOContext{Base.TTY}, i::Int64, frame::Base.StackTraces.StackFrame, n::Int64, ndigits_max::Int64, modulecolor::Symbol)
@ Base ./errorshow.jl:730
[12] print_stackframe(io::IOContext{Base.TTY}, i::Int64, frame::Base.StackTraces.StackFrame, n::Int64, ndigits_max::Int64, modulecolordict::IdDict{Module, Symbol}, modulecolorcycler::Base.Iterators.Stateful{Base.Iterators.Cycle{Vector{Symbol}}, Union{Nothing, Tuple{Symbol, Int64}}, Int64})
@ Base ./errorshow.jl:695
[13] show_full_backtrace(io::IOContext{Base.TTY}, trace::Vector{Any}; print_linebreaks::Bool)
@ Base ./errorshow.jl:594
[14] show_full_backtrace
@ ./errorshow.jl:587 [inlined]
[15] show_backtrace(io::IOContext{Base.TTY}, t::Vector{Base.StackTraces.StackFrame})
@ Base ./errorshow.jl:791
[16] showerror(io::IOContext{Base.TTY}, ex::TypeError, bt::Vector{Base.StackTraces.StackFrame}; backtrace::Bool)
@ Base ./errorshow.jl:90
[17] show_exception_stack(io::IOContext{Base.TTY}, stack::Base.ExceptionStack)
@ Base ./errorshow.jl:895
[18] display_error(io::IOContext{Base.TTY}, stack::Base.ExceptionStack)
@ Base ./client.jl:111
[19] #invokelatest#2
@ ./essentials.jl:816 [inlined]
[20] invokelatest
@ ./essentials.jl:813 [inlined]
[21] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
@ REPL ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:300
[22] (::REPL.var"#57#58"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
@ REPL ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:287
[23] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
@ REPL ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:557
[24] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
@ REPL ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:285
[25] (::REPL.var"#do_respond#80"{Bool, Bool, REPL.var"#93#103"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
@ REPL ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:899
[26] #invokelatest#2
@ ./essentials.jl:816 [inlined]
[27] invokelatest
@ ./essentials.jl:813 [inlined]
[28] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
@ REPL.LineEdit ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/LineEdit.jl:2647
[29] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
@ REPL ~/Downloads/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:1300
[30] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
@ REPL ./task.jl:514