Skip to content
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

gnuplot crashes when creating basic plot #161

Open
fbanning opened this issue Mar 29, 2021 · 5 comments
Open

gnuplot crashes when creating basic plot #161

fbanning opened this issue Mar 29, 2021 · 5 comments
Assignees

Comments

@fbanning
Copy link

In response to a Zulip conversation

julia> using Gaston

julia> a = 1:0.1:10
1.0:0.1:10.0

julia> plot(a)
Error showing value of type Gaston.Figure:
ERROR: Gnuplot crashed
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] llplot(F::Gaston.Figure; printstring::Nothing)
    @ Gaston ~\.julia\packages\Gaston\ctAQy\src\gaston_llplot.jl:174
  [3] llplot
    @ ~\.julia\packages\Gaston\ctAQy\src\gaston_llplot.jl:107 [inlined]
  [4] display(x::Gaston.Figure)
    @ Gaston ~\.julia\packages\Gaston\ctAQy\src\gaston_aux.jl:87
  [5] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
  [6] invokelatest
    @ .\essentials.jl:706 [inlined]
  [7] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Uni
on{Nothing, AbstractDisplay})
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:247
  [8] (::REPL.var"#40#41"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:231
  [9] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:462
 [10] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:229
 [11] (::REPL.var"#do_respond#61"{Bool, Bool, REPL.var"#72#82"{REPL.LineEditREPL, REPL.REPLHistoryProv
ider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:798
 [12] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [13] invokelatest
    @ .\essentials.jl:706 [inlined]
 [14] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.Li
neEdit.MIState)
    @ REPL.LineEdit C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\LineEd
it.jl:2441
 [15] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:1126
 [16] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL .\task.jl:406

Using gnuplot and creating a demo plot with it works perfectly fine though.

Specs: Win10, Julia 1.6.0, gnuplot 5.4.1
Gaston.config:

Dict{Symbol, Any} with 8 entries:
  :mode     => "normal"
  :termopts => ""
  :showable => "png"
  :debug    => false
  :saveopts => ""
  :preamble => ""
  :timeout  => 20
  :term     => "windows"
@mbaz
Copy link
Owner

mbaz commented Mar 29, 2021

Thanks for the report.

Gaston interacts with gnuplot uisng the stdin/stdout/stderr streams. The problem is likely that these are broken in Windows for Julia 1.6.0.

I will try to reproduce this and figure out the cause. It may take some time, though, since I don't work much on Windows.

@mbaz mbaz self-assigned this Mar 29, 2021
@mbaz mbaz added the bug label Mar 29, 2021
@mbaz
Copy link
Owner

mbaz commented Apr 13, 2021

Initial tests on Windows 10 seem to indicate that gnuplot 5.4.1 crashes when using the Windows terminal.

@mbaz
Copy link
Owner

mbaz commented Apr 13, 2021

If you have a chance, could you please try:

using Gaston
set(term = "qt")
plot(1:10)

@fbanning
Copy link
Author

Yes, qt terminal seems to work and a plot window opens.

However, I also get the following warning:

┌ Warning: Gnuplot returned an error message:
│
│ Warning: slow font initializationqt_processTermEvent received a GE_fontprops event. This should not
have happened
└ @ Gaston C:\Users\Frederik Banning\.julia\packages\Gaston\ctAQy\src\gaston_llplot.jl:182

@mbaz
Copy link
Owner

mbaz commented Apr 14, 2021

This is a known problem; see the Gnuplot FAQ here: http://www.gnuplot.info/faq/

One option is to start gnuplot with -slow in Windows and Mac, and see if that helps. A second option is to fall back to the wxt terminal. Could you try plotting in a fresh session, but with set(term="wxt")?

@mbaz mbaz added the windows label Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants