Skip to content

while printing on 1.12-rc3: ERROR: BoundsError: attempt to access 0-element Vector{JuliaSyntax.TreeNode{TypedSyntax.TypedSyntaxData}} #675

@wheeheee

Description

@wheeheee

Quite easy to hit, there are other calls that I can descend into with these same arguments that also error the same way.

julia> using FFTW, Cthulhu

julia> descend(plan_fft, (Vector{ComplexF64},))
plan_fft(X::StridedArray{<:Union{ComplexF64, ComplexF32}}; kws...) @ FFTW Q:\.julia\packages\FFTW\uNgRy\src\fft.jl:800
[ Info: This method only fills in default arguments; descend into the body method to see the full source.
800 $plan_f(X::Vector{ComplexF64}::StridedArray{<:fftwComplex}; kws...)::FFTW.cFFTWPlan{ComplexF64, -1, false, 1, Tuple{Int64}} =
801
Select a call to descend into or  to ascend. [q]uit. [b]ookmark.
Toggles: [w]arn, [h]ide type-stable statements, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native, [j]ump to source always.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
 • %2 = NamedTuple()::Core.Const(NamedTuple())
   %3 = pairs(::@NamedTuple{})::Core.Const(Base.Pairs{Symbol, Union{}, Nothing, @NamedTuple{}}())
   %4 = #plan_fft#10(::Base.Pairs{Symbol, Union{}, Nothing, @NamedTuple{}},::typeof(plan_fft),::Vector{ComplexF64})::…
   
NamedTuple() @ Core boot.jl:790
ERROR: BoundsError: attempt to access 0-element Vector{JuliaSyntax.TreeNode{TypedSyntax.TypedSyntaxData}} at index [1]
Stacktrace:
  [1] throw_boundserror(A::Vector{JuliaSyntax.TreeNode{TypedSyntax.TypedSyntaxData}}, I::Tuple{Int64})
    @ Base .\essentials.jl:15
  [2] getindex
    @ .\essentials.jl:919 [inlined]
  [3] first
    @ .\abstractarray.jl:452 [inlined]
  [4] show_src_expr(io::IOContext{…}, node::JuliaSyntax.TreeNode{…}, position::Int64, pre::String, pre2::String; type_annotations::Bool, iswarn::Bool, hide_type_stable::Bool, nd::Int64)
    @ TypedSyntax Q:\.julia\packages\TypedSyntax\mUTyj\src\show.jl:70
  [5] show_src_expr(io::IOContext{…}, node::JuliaSyntax.TreeNode{…}, position::Int64, pre::String, pre2::String; type_annotations::Bool, iswarn::Bool, hide_type_stable::Bool, nd::Int64) (repeats 2 times)
    @ TypedSyntax Q:\.julia\packages\TypedSyntax\mUTyj\src\show.jl:77
  [6] show_src_expr
    @ Q:\.julia\packages\TypedSyntax\mUTyj\src\show.jl:66 [inlined]
  [7] printstyled(io::IOContext{…}, rootnode::JuliaSyntax.TreeNode{…}; type_annotations::Bool, iswarn::Bool, hide_type_stable::Bool, with_linenumber::Bool, idxend::Int64)
    @ TypedSyntax Q:\.julia\packages\TypedSyntax\mUTyj\src\show.jl:50
  [8] printstyled
    @ Q:\.julia\packages\TypedSyntax\mUTyj\src\show.jl:32 [inlined]
  [9] cthulhu_typed(io::IOContext{…}, debuginfo::Symbol, src::Core.CodeInfo, rt::Any, exct::Any, effects::Compiler.Effects, codeinst::Core.CodeInstance; iswarn::Bool, hide_type_stable::Bool, optimize::Bool, pc2remarks::Nothing, pc2effects::Nothing, pc2excts::Nothing, inline_cost::Bool, type_annotations::Bool, annotate_source::Bool, inlay_types_vscode::Bool, diagnostics_vscode::Bool, jump_always::Bool, interp::Cthulhu.CthulhuInterpreter)
    @ Cthulhu Q:\.julia\packages\Cthulhu\zErIC\src\codeview.jl:148
 [10] cthulhu_typed(::IOContext{…}, ::Cthulhu.DInfo.DebugInfo, ::Core.CodeInfo, ::Vararg{…}; kwargs::@Kwargs{})
    @ Cthulhu Q:\.julia\packages\Cthulhu\zErIC\src\codeview.jl:99
 [11] top-level scope
    @ Q:\.julia\packages\Cthulhu\zErIC\src\codeview.jl:99
 [12] top-level scope
    @ Q:\.julia\packages\Cthulhu\zErIC\src\CthulhuBase.jl:410
 [13] top-level scope
    @ Q:\.julia\packages\Cthulhu\zErIC\src\ui.jl:103
 [14] top-level scope
    @ Q:\.julia\packages\Cthulhu\zErIC\src\CthulhuBase.jl:409
 [15] top-level scope
    @ Q:\.julia\packages\Cthulhu\zErIC\src\CthulhuBase.jl:290
 [16] _descend(term::Base.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, curs::Cthulhu.CthulhuCursor; override::Nothing, debuginfo::Symbol, optimize::Bool, interruptexc::Bool, iswarn::Bool, hide_type_stable::Bool, verbose::Nothing, remarks::Bool, with_effects::Bool, exception_type::Bool, inline_cost::Bool, type_annotations::Bool, annotate_source::Bool, inlay_types_vscode::Bool, diagnostics_vscode::Bool, jump_always::Bool, kwargs::@Kwargs{})
    @ Cthulhu Q:\.julia\packages\Cthulhu\zErIC\src\CthulhuBase.jl:529
 [17] _descend
    @ Q:\.julia\packages\Cthulhu\zErIC\src\CthulhuBase.jl:290 [inlined]
 [18] _descend
    @ Q:\.julia\packages\Cthulhu\zErIC\src\CthulhuBase.jl:676 [inlined]
 [19] #_descend#116
    @ Q:\.julia\packages\Cthulhu\zErIC\src\CthulhuBase.jl:687 [inlined]
 [20] __descend_with_error_handling(args::Any; terminal::Any, kwargs...)
    @ Cthulhu Q:\.julia\packages\Cthulhu\zErIC\src\CthulhuBase.jl:134
 [21] top-level scope
    @ Q:\.julia\packages\Cthulhu\zErIC\src\CthulhuBase.jl:123
 [22] top-level scope
    @ Q:\.julia\packages\Cthulhu\zErIC\src\CthulhuBase.jl:115
 [23] top-level scope
    @ Q:\.julia\packages\Cthulhu\zErIC\src\CthulhuBase.jl:152
 [24] top-level scope
    @ Q:\.julia\packages\Cthulhu\zErIC\src\CthulhuBase.jl:152
 [25] descend(::Any, ::Vararg{Any}; kwargs...)
    @ Cthulhu Q:\.julia\packages\Cthulhu\zErIC\src\Cthulhu.jl:113
 [26] top-level scope
    @ Q:\.julia\packages\Cthulhu\zErIC\src\Cthulhu.jl:112
 [27] top-level scope
    @ REPL[8]:1
Some type information was truncated. Use `show(err)` to see complete types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions