Skip to content

Ocasional errors when yeeting text into Julia REPL #12

@aris-mav

Description

@aris-mav

Hey there!

I've been noticing for quite a while that the Julia REPL throws some weird error every now and then when yeeting text into it:

julia> K = Diagonal(ones(2))
2×2 Diagonal{Float64, Vector{Float64}}:
 1.0   ⋅
  ⋅   1.0

julia> K = Diagonal(ones(2))
2×2 Diagonal{Float64Unhandled Task ERROR: BoundsError: attempt to access 0-element Memory{UInt8} at index [5:8]
Stacktrace:
 [1] throw_boundserror(A::Memory{UInt8}, I::Tuple{UnitRange{Int64}})
   @ Base ./essentials.jl:15
 [2] checkbounds
   @ ./abstractarray.jl:699 [inlined]
 [3] getindex
   @ ./genericmemory.jl:235 [inlined]
 [4] content(s::Union{REPL.LineEdit.MIState, REPL.LineEdit.ModeState, IOBuffer}, reg::Pair{Int64, Int64})
   @ REPL.LineEdit ~/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/LineEdit.jl:154
 [5] (::REPL.LineEdit.var"#check_show_hint##2#check_show_hint##3"{REPL.LineEdit.MIState, REPL.LineEdit.var"#lock_clear_hint#check_show_hint##1"{REPL.LineEdit.MIState, REPL.LineEdit.var"#next_key_pressed#check_show_hint##0"{REPL.LineEdit.MIState, Int64}, REPL.LineEdit.PromptState}, REPL.LineEdit.var"#next_key_pressed#check_show_hint##0"{REPL.LineEdit.MIState, Int64}, REPL.LineEdit.PromptState})()
   @ REPL.LineEdit ~/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/LineEdit.jl:465
, Vector{Float64}}:
 1.0   ⋅
  ⋅   1.0

julia> K = Diagonal(ones(2))
2×2 Diagonal{Float64, Vector{Float64}}:
 1.0   ⋅
  ⋅   1.0

julia> K = Diagonal(ones(2))
2×2 Diagonal{Float64, Vector{Float64}}:
 1.0   ⋅
  ⋅   1.0

As shown above, I just yote K = Diagonal(ones(2)) several times into it, but once I got this BoundsError.
I've only ever seen that while using yeet.

The command is still evaluated whether the error appears or not.

Pretty sure this started happening in one of the relatively recent versions of Julia, but I do not know which one exactly.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions