Skip to content

show_method_table error #49403

Closed
Closed
@vtjnash

Description

@vtjnash

#45069 seems to assume that mt[1] value is meaningful (though it seems probably never true), and crashes if is isn't

julia> @time methods(Base.Broadcast.BroadcastStyle, Tuple{Type{<:Any}})
  0.004502 seconds (2.26 k allocations: 75.891 KiB)
# 45 methods for type constructor:Error showing value of type Base.MethodList:
ERROR: "BroadcastStyle" is not defined in module RecursiveArrayTools
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] which(m::Module, s::Symbol)
    @ Base ./reflection.jl:1632
  [3] show_method_table(io::IOContext{Base.TTY}, ms::Base.MethodList, max::Int64, header::Bool)
    @ Base ./methodshow.jl:303
  [4] show_method_table
    @ ./methodshow.jl:289 [inlined]
  [5] show(io::IOContext{Base.TTY}, ::MIME{Symbol("text/plain")}, ms::Base.MethodList)
    @ Base ./methodshow.jl:349
  [6] (::REPL.var"#55#56"{REPL.REPLDisplay{REPL.LineEditREPL}, MIME{Symbol("text/plain")}, Base.RefValue{Any}})(io::Any)
    @ REPL ~/julia/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:271
  [7] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL ~/julia/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:552
  [8] display(d::REPL.REPLDisplay, mime::MIME{Symbol("text/plain")}, x::Any)
    @ REPL ~/julia/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:259
  [9] display(d::REPL.REPLDisplay, x::Any)
    @ REPL ~/julia/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:276
 [10] display(x::Any)
    @ Base.Multimedia ./multimedia.jl:340
 [11] #invokelatest#2
    @ ./essentials.jl:863 [inlined]
 [12] invokelatest
    @ ./essentials.jl:860 [inlined]
 [13] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
    @ REPL ~/julia/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:300
 [14] (::REPL.var"#57#58"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
    @ REPL ~/julia/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:282
 [15] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL ~/julia/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:552
 [16] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
    @ REPL ~/julia/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:280
 [17] (::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 ~/julia/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:894
 [18] #invokelatest#2
    @ ./essentials.jl:863 [inlined]
 [19] invokelatest
    @ ./essentials.jl:860 [inlined]
 [20] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit ~/julia/usr/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2648
 [21] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL ~/julia/usr/share/julia/stdlib/v1.10/REPL/src/REPL.jl:1295
 [22] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ./task.jl:514

Metadata

Metadata

Assignees

No one assigned

    Labels

    display and printingAesthetics and correctness of printed representations of objects.regressionRegression in behavior compared to a previous version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions