Keno / Keno/TerminalExtensions.jl

Occasional assertion failure when interrupting REPL output

Open
#5 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
42
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Sometimes, when interrupting the REPL output, I hit an assertion failure. It doesn't happen all the time, but with the following test case I can typically trigger it within 3-4 interruptions, on both the 0.3 release branch and today's master (10f9289).

``` julia
julia> s = "a really long string"^10000
"a really long stringa really long stringa really long stringa really long strin

ga re^ClError showing value of type ASCIIString:
ERROR: interrupt

ERROR: assertion failed
in test_success at ./process.jl:483
in readbytes at ./process.jl:461
in prompt_prefix at /Users/mbauman/.julia/v0.4/TerminalExtensions/src/TerminalExtensions.jl:127
in anonymous at /Users/mbauman/.julia/v0.4/TerminalExtensions/src/TerminalExtensions.jl:214
in write_prompt at LineEdit.jl:644
in refresh_multi_line at LineEdit.jl:203
in activate at ./LineEdit.jl:1251
in activate at /Users/mbauman/Code/julia-0.4/usr/lib/julia/sys.dylib
in transition at ./LineEdit.jl:1273
in anonymous at REPL.jl:597
in anonymous at /Users/mbauman/.julia/v0.4/TerminalExtensions/src/TerminalExtensions.jl:225
in run_interface at ./LineEdit.jl:1329
in run_interface at /Users/mbauman/Code/julia-0.4/usr/lib/julia/sys.dylib
in run_frontend at ./REPL.jl:825
in run_repl at ./REPL.jl:170
in _start at ./client.jl:427
in _start at /Users/mbauman/Code/julia-0.4/usr/lib/julia/sys.dylib
```

I think this might actually be a Julia bug, but I've not managed to track it down yet.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure by interrupting the long-string REPL output several times, then trace the stack from process.jl:test_success and readbytes through TerminalExtensions.jl:prompt_prefix and LineEdit.jl. Compare behavior on the 0.3 branch and master at commit 10f9289. Done means the interruption sequence no longer produces the assertion failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.