JunoLab / uber-juno

Installer package for the Juno IDE
MIT License
201 stars 39 forks source link

ERROR: ArgumentError: stream is closed or unusable #38

Closed AndiMD closed 6 years ago

AndiMD commented 6 years ago

Disclaimer, I am not sure whether this problem is caused by the Juno package. I can only reproduce it in Juno, not in the standalone Julia REPL.

The call to function get_sol causes a stacktrace if:

I am on Kubuntu 17.04, Julia 0.6.2, Atom 1.23.2 x64 with Juno 0.1.2

The script I am trying to run is a modified version of this example http://www.juliafem.org/examples/2017-09-16-convection-diffusion-equation/index ConvectionDiffusionBug.txt

 [1] check_open(::Base.PipeEndpoint) at ./stream.jl:251
 [2] uv_write(::Base.PipeEndpoint, ::Ptr{UInt8}, ::UInt64) at ./stream.jl:795
 [3] unsafe_write(::Base.PipeEndpoint, ::Ptr{UInt8}, ::UInt64) at ./stream.jl:832
 [4] print at ./strings/io.jl:122 [inlined]
 [5] write_log at /home/andi/.julia/v0.6/Logging/src/Logging.jl:85 [inlined]
 [6] log(::Base.PipeEndpoint, ::Logging.LogLevel, ::Symbol, ::String, ::String, ::Vararg{String,N} where N) at /home/andi/.julia/v0.6/Logging/src/Logging.jl:98
 [7] warn(::Logging.Logger, ::String) at /home/andi/.julia/v0.6/Logging/src/Logging.jl:110
 [8] assemble! at /home/andi/.julia/v0.6/FEMBase/src/assembly.jl:93 [inlined]
 [9] get_sol(::Int64, ::Float64) at /home/andi/projects/juliaModules/JuliaFEM/ConvectionDiffusion2.jl:48
 [10] eval(::Module, ::Any) at ./boot.jl:235
 [11] eval(::Any) at ./boot.jl:234
 [12] (::##7#8)(::Atom.Progress.ProgressBar) at /home/andi/.julia/v0.6/Atom/src/repl.jl:193
 [13] #progress#2(::String, ::String, ::Function, ::##7#8) at /home/andi/.julia/v0.6/Atom/src/progress.jl:65
 [14] (::Atom.Progress.#kw##progress)(::Array{Any,1}, ::Atom.Progress.#progress, ::Function) at ./<missing>:0

Thanks a lot! Andy

pfitzseb commented 6 years ago

Are you using the new REPL-based console when the error happens? Can you try switching to the Legacy console in the settings, restart Atom, and try running the code again?

AndiMD commented 6 years ago

Spot on, thanks! The legacy console works fine. I can use this as a workaround until this is fixed.

ianfiske commented 6 years ago

Just want to add that I just encountered this same error as well with the new console. I use Memento.jl for logging. It works fine with the legacy console but the new REPL causes the same ERROR: ArgumentError: stream is closed or unusable error from within my package. Reverting to legacy for now.

pfitzseb commented 6 years ago

MWE: Evaluate the following lines separately:

foo = STDOUT
print(foo, "hi")

Not sure how to best solve this, sadly.

pfitzseb commented 6 years ago

Should be "fixed" by https://github.com/JunoLab/Atom.jl/commit/4907f6e92209c3493f4decc12477b156aa5b34ab.