Error when trying to showerror: TypeError: in specializations, expected DataType, got Type{Union{}}
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện kịch bản @run lồng nhau đã được báo cáo và kiểm tra các stack trace trong JuliaInterpreter/src/utils.jl và src/construct.jl. Sau đó, lần theo các đường dẫn của debugger trong Debugger/src/repl.jl và src/commands.jl. Được xem là hoàn tất khi việc hiển thị lỗi ban đầu và xóa các bộ nhớ đệm của interpreter không còn tạo ra TypeErrors thứ cấp hoặc lỗi _deleteend!.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I got the following error. It looks like it's an error with the debugger itself, that happened when it was trying to show an error with my program.
ERROR: TypeError: in specializations, expected DataType, got Type{Union{}}
Stacktrace:
[1] #specialize_method#317
@ ./compiler/utilities.jl:224 [inlined]
[2] specialize_method
@ ./compiler/utilities.jl:212 [inlined]
[3] Base.StackTraces.StackFrame(frame::JuliaInterpreter.Frame)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ZNccU/src/utils.jl:773
[4] show_backtrace(io::IOContext{IOBuffer}, frame::JuliaInterpreter.Frame)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ZNccU/src/utils.jl:792
[5] showerror(io::IOContext{IOBuffer}, ex::TypeError, bt::JuliaInterpreter.Frame; backtrace::Bool)
@ Base ./errorshow.jl:99
[6] showerror
@ ./errorshow.jl:95 [inlined]
[7] display_error(io::IOContext{IOBuffer}, er::TypeError, frame::JuliaInterpreter.Frame)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ZNccU/src/utils.jl:808
[8] (::Debugger.var"#10#19"{REPL.LineEdit.Prompt, Debugger.DebuggerState})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
@ Debugger ~/.julia/packages/Debugger/wueAn/src/repl.jl:72
[9] #invokelatest#2
@ ./essentials.jl:1055 [inlined]
[10] invokelatest
@ ./essentials.jl:1052 [inlined]
[11] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
@ REPL.LineEdit ~/.julia/juliaup/julia-1.11.5+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2755
[12] run_interface
@ ~/.julia/juliaup/julia-1.11.5+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2749 [inlined]
[13] RunDebugger(frame::JuliaInterpreter.Frame, repl::Nothing, terminal::Nothing; initial_continue::Bool)
@ Debugger ~/.julia/packages/Debugger/wueAn/src/repl.jl:167
[14] RunDebugger
@ ~/.julia/packages/Debugger/wueAn/src/repl.jl:12 [inlined]
[15] RunDebugger(frame::JuliaInterpreter.Frame)
@ Debugger ~/.julia/packages/Debugger/wueAn/src/repl.jl:12
[16] macro expansion
@ ~/.julia/packages/Debugger/wueAn/src/Debugger.jl:127 [inlined]
[17] top-level scope
@ REPL[3]:1
caused by: TypeError: in specializations, expected DataType, got Type{Union{}}
Stacktrace:
[1] #specialize_method#317
@ ./compiler/utilities.jl:224 [inlined]
[2] specialize_method
@ ./compiler/utilities.jl:212 [inlined]
[3] Base.StackTraces.StackFrame(frame::JuliaInterpreter.Frame)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ZNccU/src/utils.jl:773
[4] show_backtrace(io::IOContext{IOBuffer}, frame::JuliaInterpreter.Frame)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ZNccU/src/utils.jl:792
[5] showerror(io::IOContext{IOBuffer}, ex::BoundsError, bt::JuliaInterpreter.Frame; backtrace::Bool)
@ Base ./errorshow.jl:99
[6] showerror
@ ./errorshow.jl:95 [inlined]
[7] display_error(io::IOContext{IOBuffer}, er::BoundsError, frame::JuliaInterpreter.Frame)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ZNccU/src/utils.jl:808
[8] show_breakpoint(io::Base.TTY, bp::JuliaInterpreter.BreakpointRef, state::Debugger.DebuggerState)
@ Debugger ~/.julia/packages/Debugger/wueAn/src/commands.jl:22
[9] execute_command(state::Debugger.DebuggerState, v::Val{:c}, cmd::SubString{String})
@ Debugger ~/.julia/packages/Debugger/wueAn/src/commands.jl:56
[10] (::Debugger.var"#10#19"{REPL.LineEdit.Prompt, Debugger.DebuggerState})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
@ Debugger ~/.julia/packages/Debugger/wueAn/src/repl.jl:64
[11] #invokelatest#2
@ ./essentials.jl:1055 [inlined]
[12] invokelatest
@ ./essentials.jl:1052 [inlined]
[13] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
@ REPL.LineEdit ~/.julia/juliaup/julia-1.11.5+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2755
[14] run_interface
@ ~/.julia/juliaup/julia-1.11.5+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2749 [inlined]
[15] RunDebugger(frame::JuliaInterpreter.Frame, repl::Nothing, terminal::Nothing; initial_continue::Bool)
@ Debugger ~/.julia/packages/Debugger/wueAn/src/repl.jl:167
[16] RunDebugger
@ ~/.julia/packages/Debugger/wueAn/src/repl.jl:12 [inlined]
[17] RunDebugger(frame::JuliaInterpreter.Frame)
@ Debugger ~/.julia/packages/Debugger/wueAn/src/repl.jl:12
[18] macro expansion
@ ~/.julia/packages/Debugger/wueAn/src/Debugger.jl:127 [inlined]
[19] top-level scope
@ REPL[3]:1
I tried to debug the debugger with @run @run ... but it just gave me a different error:
Breaking for error:
ERROR: ArgumentError: _deleteend! requires delta in 0:length(a)
Stacktrace:
[1] _deleteend!(a::Vector{JuliaInterpreter.FrameData}, delta::Int64)
@ Base array.jl:1204
[2] empty!(a::Vector{JuliaInterpreter.FrameData})
@ Base array.jl:2029
[3] clear_caches()
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ZNccU/src/construct.jl:59
[4] enter_call_expr(expr::Expr; enter_generated::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ZNccU/src/construct.jl:630
[5] enter_call_expr(expr::Expr)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ZNccU/src/construct.jl:629
[6] var"##thunk#270"()
@ Main ~/.julia/packages/Debugger/wueAn/src/Debugger.jl:91
In _deleteend!(a, delta) at array.jl:1201
1201 function _deleteend!(a::Vector, delta::Integer)
1202 delta = Int(delta)
1203 len = length(a)
>1204 0 <= delta <= len || throw(ArgumentError("_deleteend! requires delta in 0:length(a)"))
1205 newlen = len - delta
1206 for i in newlen+1:len
1207 @inbounds _unsetindex!(a, i)
1208 end
About to run: throw(ArgumentError("_deleteend! requires delta in 0:length(a)"))
1|debug> bt
[1] _deleteend!(a, delta) at array.jl:1204
| a::Vector{JuliaInterpreter.FrameData} = <JuliaInterpreter.FrameData[JuliaInterpreter.FrameData(Union{Nothing, Some{Any}}[Some(Core.toInt64), S...>
| delta::Int64 = 29
| len::Int64 = 28
| ::Bool = false
[2] empty!(a) at array.jl:2029
| a::Vector{JuliaInterpreter.FrameData} = <JuliaInterpreter.FrameData[JuliaInterpreter.FrameData(Union{Nothing, Some{Any}}[Some(Core.toInt64), S...>
[3] clear_caches() at /Users/akriegma/.julia/packages/JuliaInterpreter/ZNccU/src/construct.jl:59
[4] #enter_call_expr#46(enter_generated, , expr) at /Users/akriegma/.julia/packages/JuliaInterpreter/ZNccU/src/construct.jl:630
| enter_generated::Bool = false
| ::typeof(JuliaInterpreter.enter_call_expr) = JuliaInterpreter.enter_call_expr
| expr::Expr = <:((VM(Float32[-0.06815089 0.027055124 0.046305846 -0.02320608 0.0076302057 -0.035288677 0.073490456 -...>
[5] enter_call_expr(expr) at /Users/akriegma/.julia/packages/JuliaInterpreter/ZNccU/src/construct.jl:629
| expr::Expr = <:((VM(Float32[-0.06815089 0.027055124 0.046305846 -0.02320608 0.0076302057 -0.035288677 0.073490456 -...>
[6] ##thunk#270() at REPL[4]:91
| theargs::Tuple{VM, Matrix{Float64}} = <(VM(Float32[-0.06815089 0.027055124 0.046305846 -0.02320608 0.0076302057 -0.035288677 0.073490456 -0....>
So with that being the state of things I'm not sure how to gather more information about this error.
- Ngôn ngữ chính
- Julia
- Star
- 515
- Fork
- 50
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của JuliaDebug/Debugger.jl
-
tagbot-manual
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
JuliaDebug/Debugger.jl#410 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
JuliaDebug/Debugger.jl#423 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
JuliaDebug/Debugger.jl#422 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
JuliaDebug/Debugger.jl#418 · 1 bình luận ·
-
Syntax highlighting warningĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
JuliaDebug/Debugger.jl#417 · 1 bình luận ·
Tất cả issue của JuliaDebug/Debugger.jl
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
JuliaDebug/Cthulhu.jl#716 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Review dependenciesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
rafaqz/DimensionalData.jl#1253 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
osrep/Runes2P.jl#283 ·
Maintainer thường phản hồi trong vòng 1 ngày