-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jl_uv_writecb() ERROR: broken pipe EPIPE on windows() #14
Comments
using PimpMyRepl gives the error rc3 julia windows 64bit |
Standard windows console? |
cmd.exe that is? |
So I get the error using conemu and calling julia through the powershell. |
In any case for both versions pasting is extremely slow |
Yes, it is a problem with some windows terminals that they don't support bracket paste and that their write calls are slow. Base Julia also has the problem, but to a lesser extent after I did JuliaLang/julia#17868. However, the same trick can't be used here because we might have to update the whole line even after a single keypress due to the syntax highlighting. Use proper terminals like Mintty and it will be instant :) |
Since it works on cmd and I am not doing anything weird with the pipe writing I don't think the issue is here. If you have the desire you could step through with Gallium.jl and see exactly where the error happens. |
I can confirm this behavior on Windows 10 64 bits: _
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.0-dev.62 (2016-08-07 02:31 UTC)
_/ |\__'_|_|_|\__'_| | Commit d3df8e7 (18 days old master)
|__/ | x86_64-w64-mingw32
julia> jl_uv_writecb() ERROR: broken pipe EPIPE
jl_uv_writecb() ERROR: broken pipe EPIPE
jl_uv_writecb() ERROR: broken pipe EPIPE
⋮
jl_uv_writecb() ERROR: broken pipe EPIPE
jl_uv_writecb() ERROR: broken pipe EPIPE # ENTER
julia> Cmder: Cmd: Mingw: |
Interesting. I will check stuff on my windows machine tonight. If you want to help could you check if removing all the |
Indeed that seems to be related, if I comment those lines: if VERSION > v"0.5-"
prev_stdout = STDERR
# redirect_stderr()
include("ErrorMessages.jl")
# redirect_stderr(prev_stdout)
end I get the
But not the error from this issue. On a simillar issue, I have tried to do this macro, but I it has never worked as expected, and I remember seing once this error of broken pipe if I remember correctly: macro supress_err(block)
quote
orig = STDERR
redirect_stderr()
val = $block
redirect_stderr(orig)
val
end
end |
In WSL (Windows subsystem for Linux) I don't have real native linux here: julia> macro errnull(block)
quote
orig = STDERR
redirect_stderr()
val = $block
redirect_stderr(orig)
val
end
end
@errnull (macro with 1 method)
julia> @errnull warn()
[1] 17 abort (core dumped) julia
julia 7.69s user 2.36s system 106% cpu 9.441 total In windows: julia> macro errnull(block)
quote
orig = STDERR
redirect_stderr()
val = $block
redirect_stderr(orig)
val
end
end
julia> @errnull warn()
julia> @errnull error()
ERROR:
in error at error.jl:22 |
Seema |
I will ask in stack overflow, maybe even Jeff gets to answer it, if that fails I'll raise an issue. |
Here is the question at SO: |
@KristofferC using Suppressor
if VERSION > v"0.5-" && !haskey(ENV, "LEGACY_ERRORS")
@suppress_err include("ErrorMessages.jl")
end The trick was to keep alive the return value of macro suppress_err(block)
quote
if ccall(:jl_generating_output, Cint, ()) == 0
ORIGINAL_STDERR = STDERR
err_rd, err_wr = redirect_stderr()
value = $(esc(block))
REDIRECTED_STDERR = STDERR
# need to keep the return value live
err_stream = redirect_stderr(ORIGINAL_STDERR)
return value
end
end
end |
Should be fixed now. Thanks for the report @musm and sorry for closing the issue when it actually was a problem with the package. Also thanks @Ismael-VC for looking into the problem more carefully. |
Thanks. How do I use mintty with julia? It looks like I have to install the whole cygwin or mysys just to use Julia with mintty? |
I believe so, yes. |
No description provided.
The text was updated successfully, but these errors were encountered: