JuliaDebug / Debugger.jl

Julia debugger
MIT License
470 stars 43 forks source link

MethodError: no method matching +(::Nothing, ::Int64) when digging with `@enter display(10)` #317

Open acsofie opened 2 years ago

acsofie commented 2 years ago

Environment:

Julia Version 1.8.0-beta3 (2022-03-29)
[31a5f54b] Debugger v0.7.6

log:

In #43(io) at /home/user/usr/local/julia/julia-1.8.0-beta3/share/julia/stdlib/v1.8/REPL/src/REPL.jl:261
 257
 258  function display(d::REPLDisplay, mime::MIME"text/plain", x)
 259      x = Ref{Any}(x)
 260      with_repl_linfo(d.repl) do io
>261          io = IOContext(io, :limit => true, :module => Main::Module)
 262          get(io, :color, false) && write(io, answer_color(d.repl))
 263          if isdefined(d.repl, :options) && isdefined(d.repl.options, :iocontext)
 264              # this can override the :limit property set initially
 265              io = foldl(IOContext, d.repl.options.iocontext, init=io)

About to run: (IOContext)(IOContext(Base.TTY(RawFD(13) open, 0 bytes waiting)), :limit => true, :module => Main)
1|debug> s
ERROR: MethodError: no method matching +(::Nothing, ::Int64)
Closest candidates are:
  +(::Any, ::Any, ::Any, ::Any...) at operators.jl:591
  +(::T, ::T) where T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8} at int.jl:87
  +(::Base.TwicePrecision, ::Number) at twiceprecision.jl:290
  ...
Stacktrace:
  [1] definition(#unused#::Type{String}, method::Method)
    @ CodeTracking ~/.julia/packages/CodeTracking/9m7tM/src/CodeTracking.jl:230
  [2] locinfo(frame::JuliaInterpreter.Frame)
    @ Debugger ~/.julia/packages/Debugger/APRPi/src/locationinfo.jl:10
  [3] print_status(io::Base.TTY, frame::JuliaInterpreter.Frame; force_lowered::Bool)
    @ Debugger ~/.julia/packages/Debugger/APRPi/src/printing.jl:134
  [4] (::Debugger.var"#10#19"{REPL.LineEdit.Prompt, Debugger.DebuggerState})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Debugger ~/.julia/packages/Debugger/APRPi/src/repl.jl:90
  [5] #invokelatest#2
    @ ./essentials.jl:729 [inlined]
  [6] invokelatest
    @ ./essentials.jl:727 [inlined]
  [7] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit ~/usr/local/julia/julia-1.8.0-beta3/share/julia/stdlib/v1.8/REPL/src/LineEdit.jl:2509
  [8] run_interface
    @ ~/usr/local/julia/julia-1.8.0-beta3/share/julia/stdlib/v1.8/REPL/src/LineEdit.jl:2503 [inlined]
  [9] RunDebugger(frame::JuliaInterpreter.Frame, repl::Nothing, terminal::Nothing; initial_continue::Bool)
    @ Debugger ~/.julia/packages/Debugger/APRPi/src/repl.jl:167
 [10] RunDebugger (repeats 2 times)
    @ ~/.julia/packages/Debugger/APRPi/src/repl.jl:13 [inlined]
 [11] top-level scope
    @ ~/.julia/packages/Debugger/APRPi/src/Debugger.jl:127