MWE:
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.3 (2018-12-18)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Plots
julia> plot()
julia> savefig("foo.png")
julia> plot()
/opt/misc/julia/julia-1.0.3/bin/julia: symbol lookup error: /home/XXX/.julia/packages/GR/shnUy/src/../deps/gr/lib/./x11plugin.so: undefined symbol: FT_Init_FreeType
julia> versioninfo()
Julia Version 1.0.3
Commit 099e826241 (2018-12-18 01:34 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, haswell)
What are you expecting this code to do? plot() is not valid syntax.
change it to plot(1:10) (any plotting, same thing happens).
Hm, I cannot reproduce with GR on Windows 10.
https://github.com/jheinen/GR.jl/issues/181 seems related.
jheinen/GR.jl#181 seems related.
Tried the fix mentioned there. Did not fix my problem. GR is version 0.37.0
I use Ubuntu 18.04
I have the exact same issue on Arch Linux. Happens both on 1.0.3 and 1.1-rc and the suggested fix (export GKSwstype=gksqt) does not fix it. Also, this only occurs when attempting to open the GUI, as,
julia> plot(1:10);
does not result in an error (and Julia crashing).
Does it also occur when using plain GR?
using GR
plot(1:10)
@mkborregaard : there is still this x11 thing in src/backends/gr.jl:
const _gr_wstype_default = @static if Sys.islinux()
"x11"
# "cairox11"
elseif Sys.isapple()
"quartz"
else
"use_default"
end
Is gr_set_output(wstype::String) used anywhere?
no clue 😕
With plain GR, the plot window doesn't close after doing savefig and the crash doesn't happen. Also doesn't happen if I manually close the window in GR, and then plot again. It seems to be related to re–launching the GUI in Plots.
When using only GR (no Plots) there is no crash for me.
I get the same error in Atom/Juno, but works fine if run from a terminal.
Code structured as below seemed to work fine last Thursday for me.
Hope this helps
using Plots
function guiplotter()
for i in 1:5
plot(rand(5))
gui()
sleep(0.5)
end
end
# without this gks qt window doesn't open so no plotting happens
ENV["GKSwstype"]="gksqt"
gr(reuse=true)
# works fine, updates plot in gks qt window
guiplotter()
# plots in the Juno window, closes gks qt window
plot(rand(5))
# crashes, doesn't crash if plot(rand(5)) is not called/gks qt window is not closed manually
guiplotter()
crash output
/usr/local/bin/julia-1.0: symbol lookup error: ~/.julia/packages/GR/shnUy/src/../deps/gr/lib/./x11plugin.so: undefined symbol: FT_Init_FreeType
Atom 0.7.12
Julia Version 1.0.1
GR 0.37.0
Plots 0.22.5
The above problem is fixed in GR master. We will tag a new version soon ...
In loop sometime i have problem with GKS, SOMETIME - no corelation with somethink :/ New system Win7 64 home profesional, EasyFix instaled, MS.NETFramework 4.7.2 and .MS.NETFramework 4.7.2 , (polish).... (System automaticly instaled, ) . System updated SP1 and all next . Is there any hope? Migrate on wines 10? ;/
julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, sandybridge)
(v1.1) pkg> st
Status C:\Users\PC\.julia\environments\v1.1\Project.toml
[159f3aea] Cairo v0.5.6
[31c24e10] Distributions v0.16.4
[c04bee98] ExcelReaders v0.10.2
[28b8d3ca] GR v0.37.0
[c91e804a] Gadfly v1.0.1
[f67ccb44] HDF5 v0.11.0
[429524aa] Optim v0.17.2
[91a5bcdd] Plots v0.23.0
[d330b81b] PyPlot v2.7.0
[69024149] StringEncodings v0.3.1
[c17dfb99] WinRPM v0.4.2
[bd07be1c] Winston v0.14.1
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
Could you provide a MWE?
MWE ? code ?
julia> p1=plot(map(Date,czastemp),dane,label=string("dane"),title=etykiety[j],linecolor = :blue,ylims = (minimum
(dane),maximum(dane)));
julia> p2=plot(map(Date,czas)[end-11:end],dane[end-11:end],linecolor = :blue,legend = false,xticks=map(Date,czas
)[end-prognoza.*2+1:end][1:12:end],ylims = (minimum(dane),maximum(dane)));
julia> display(Plots.plot(p1,p2,layout=(2,1)))
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
Importand info :
k not defined ... but no "k" there ...
julia> Pkg.test("Gtk")
Testing Gtk
Status `C:\Users\PC\AppData\Local\Temp\jl_3BC7.tmp\Manifest.toml`
[9e28174c] BinDeps v0.8.10
[b99e7846] BinaryProvider v0.5.3
[e1450e63] BufferedStreams v1.0.0
[159f3aea] Cairo v0.5.6+ #master (https://github.com/JuliaGraphics/Cairo.jl)
[3da002f7] ColorTypes v0.7.5
[5ae59095] Colors v0.9.5
[34da2185] Compat v1.5.1
[53c48c17] FixedPointNumbers v0.5.3
[a2bd30eb] Graphics v0.4.0
[4c0ca9eb] Gtk v0.16.4
[0862f596] HTTPClient v0.2.1
[d9be37ee] Homebrew v0.7.1
[682c06a0] JSON v0.20.0
[b27032c2] LibCURL v0.4.1
[522f3ed2] LibExpat v0.5.0
[2ec943e9] Libz v1.0.0
[77ba4419] NaNMath v0.3.2
[189a3867] Reexport v0.2.0
[30578b45] URIParser v0.4.0
[c17dfb99] WinRPM v0.4.2
[2a0f44e3] Base64 [`@stdlib/Base64`]
[ade2ca70] Dates [`@stdlib/Dates`]
[8bb1440f] DelimitedFiles [`@stdlib/DelimitedFiles`]
[8ba89e20] Distributed [`@stdlib/Distributed`]
[b77e0a4c] InteractiveUtils [`@stdlib/InteractiveUtils`]
[76f85450] LibGit2 [`@stdlib/LibGit2`]
[8f399da3] Libdl [`@stdlib/Libdl`]
[37e2e46d] LinearAlgebra [`@stdlib/LinearAlgebra`]
[56ddb016] Logging [`@stdlib/Logging`]
[d6f4376e] Markdown [`@stdlib/Markdown`]
[a63ad114] Mmap [`@stdlib/Mmap`]
[44cfe95a] Pkg [`@stdlib/Pkg`]
[de0858da] Printf [`@stdlib/Printf`]
[3fa0cd96] REPL [`@stdlib/REPL`]
[9a3f8284] Random [`@stdlib/Random`]
[ea8e919c] SHA [`@stdlib/SHA`]
[9e88b42a] Serialization [`@stdlib/Serialization`]
[1a1011a3] SharedArrays [`@stdlib/SharedArrays`]
[6462fe0b] Sockets [`@stdlib/Sockets`]
[2f01184e] SparseArrays [`@stdlib/SparseArrays`]
[10745b16] Statistics [`@stdlib/Statistics`]
[8dfed614] Test [`@stdlib/Test`]
[cf7118a7] UUIDs [`@stdlib/UUIDs`]
[4ec0a83e] Unicode [`@stdlib/Unicode`]
file info contains: 13
Test Summary: | Pass Total
gui | 78 78
Test Summary: | Pass Total
glib | 8 8
The following messages:
WARNING: Error in @guarded callback
are expected and a sign of normal operation.
┌ Warning: Error in @guarded callback
└ @ Main.GtkTestModule C:\Users\PC\.julia\packages\Gtk\ADDrn\src\base.jl:92
ERROR: UndefVarError: k not defined
Stacktrace:
[1] (::getfield(Main.GtkTestModule, Symbol("##39#42")))(::Int64, ::Int64) at C:\Users\PC\.julia\packages\Gtk\AD
Drn\src\base.jl:90
[2] top-level scope at C:\Users\PC\.julia\packages\Gtk\ADDrn\test\misc.jl:28
[3] top-level scope at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\
v1.1\Test\src\Test.jl:1083
[4] top-level scope at C:\Users\PC\.julia\packages\Gtk\ADDrn\test\misc.jl:5
[5] include at .\boot.jl:326 [inlined]
[6] include_relative(::Module, ::String) at .\loading.jl:1038
[7] include at .\sysimg.jl:29 [inlined]
[8] include(::String) at C:\Users\PC\.julia\packages\Gtk\ADDrn\test\runtests.jl:1
[9] top-level scope at none:0
[10] include at .\boot.jl:326 [inlined]
[11] include_relative(::Module, ::String) at .\loading.jl:1038
[12] include(::Module, ::String) at .\sysimg.jl:29
[13] include(::String) at .\client.jl:403
[14] top-level scope at none:0
┌ Warning: Error in @guarded callback
└ @ Main.GtkTestModule C:\Users\PC\.julia\packages\Gtk\ADDrn\src\base.jl:92
ERROR: UndefVarError: k not defined
Stacktrace:
[1] (::getfield(Main.GtkTestModule, Symbol("#bar2#44")))(::Int64, ::Int64) at C:\Users\PC\.julia\packages\Gtk\A
DDrn\src\base.jl:90
[2] top-level scope at C:\Users\PC\.julia\packages\Gtk\ADDrn\test\misc.jl:30
[3] top-level scope at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\
v1.1\Test\src\Test.jl:1083
[4] top-level scope at C:\Users\PC\.julia\packages\Gtk\ADDrn\test\misc.jl:5
[5] include at .\boot.jl:326 [inlined]
[6] include_relative(::Module, ::String) at .\loading.jl:1038
[7] include at .\sysimg.jl:29 [inlined]
[8] include(::String) at C:\Users\PC\.julia\packages\Gtk\ADDrn\test\runtests.jl:1
[9] top-level scope at none:0
[10] include at .\boot.jl:326 [inlined]
[11] include_relative(::Module, ::String) at .\loading.jl:1038
[12] include(::Module, ::String) at .\sysimg.jl:29
[13] include(::String) at .\client.jl:403
[14] top-level scope at none:0
┌ Warning: Error in @guarded callback
└ @ Main.GtkTestModule C:\Users\PC\.julia\packages\Gtk\ADDrn\src\base.jl:92
ERROR: UndefVarError: k not defined
Stacktrace:
[1] (::getfield(Main.GtkTestModule, Symbol("#bar3#46")))(::Int64, ::Int64) at C:\Users\PC\.julia\packages\Gtk\A
DDrn\src\base.jl:90
[2] top-level scope at C:\Users\PC\.julia\packages\Gtk\ADDrn\test\misc.jl:32
[3] top-level scope at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\
v1.1\Test\src\Test.jl:1083
[4] top-level scope at C:\Users\PC\.julia\packages\Gtk\ADDrn\test\misc.jl:5
[5] include at .\boot.jl:326 [inlined]
[6] include_relative(::Module, ::String) at .\loading.jl:1038
[7] include at .\sysimg.jl:29 [inlined]
[8] include(::String) at C:\Users\PC\.julia\packages\Gtk\ADDrn\test\runtests.jl:1
[9] top-level scope at none:0
[10] include at .\boot.jl:326 [inlined]
[11] include_relative(::Module, ::String) at .\loading.jl:1038
[12] include(::Module, ::String) at .\sysimg.jl:29
[13] include(::String) at .\client.jl:403
[14] top-level scope at none:0
┌ Warning: Error in @guarded callback
└ @ Main.GtkTestModule C:\Users\PC\.julia\packages\Gtk\ADDrn\src\base.jl:92
ERROR: UndefVarError: k not defined
Stacktrace:
[1] (::getfield(Main.GtkTestModule, Symbol("#bar4#47")){Int32})(::Int64, ::Int64) at C:\Users\PC\.julia\package
s\Gtk\ADDrn\src\base.jl:90
[2] top-level scope at C:\Users\PC\.julia\packages\Gtk\ADDrn\test\misc.jl:33
[3] top-level scope at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\
v1.1\Test\src\Test.jl:1083
[4] top-level scope at C:\Users\PC\.julia\packages\Gtk\ADDrn\test\misc.jl:5
[5] include at .\boot.jl:326 [inlined]
[6] include_relative(::Module, ::String) at .\loading.jl:1038
[7] include at .\sysimg.jl:29 [inlined]
[8] include(::String) at C:\Users\PC\.julia\packages\Gtk\ADDrn\test\runtests.jl:1
[9] top-level scope at none:0
[10] include at .\boot.jl:326 [inlined]
[11] include_relative(::Module, ::String) at .\loading.jl:1038
[12] include(::Module, ::String) at .\sysimg.jl:29
[13] include(::String) at .\client.jl:403
[14] top-level scope at none:0
Test Summary: | Pass Total
misc | 9 9
Testing Gtk tests passed
and more : is line with :
[3] top-level scope at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\Test\src\Test.jl:1083
on my machine no dir
C:\cygwin\home\
my file is :
C:Users\PC\AppData\Local\Julia-1.1.0\share\julia\stdlib\v1.1\Test\src\Test.jl
What next ? Paul
and... When I runed gksqt.exe manualy and later runed my code in window (DOS) of gksqt.exe is :
GKS: file open error (./\FONTS\GKSFONT.DAT)
open: No such file or directory
File is in :
C:\Users\PC\.julia\packages\GR\shnUy\deps\gr\fonts\gksfont.dat
We need a MWE that we can reproduce.
The Gtk or stdlib errors are not related to GR. gksqt.exe is started on demand with the correct paths (e.g. for the above mentioned font file) set.
what is this MWE ?
minimal working example (which produces the issue)
Some time only this :
using Plots ; gr()
for i=1:20
display(plot(rand(5)))
end
My code for plots in this project:
j=0
for i=1:l
global j+=1
for i=1:20
p1=plot(map(Date,czastemp),dane,label=string("dane"),title=etykiety[j],linecolor = :blue,ylims = (minimum(dane),maximum(dane)));
p2=plot(map(Date,czas)[end-11:end],dane[end-11:end],linecolor = :blue,legend = false,xticks=map(Date,czas)[end-prognoza.*2+1:end][1:12:end],ylims = (minimum(dane),maximum(dane)));
display(plot(p1,p2,layout=(2,1)))
julia> dane
51-element Array{Float64,1}:
julia> etykiety
1102-element Array{Any,1}:
...
"ŻEL AŁY 6"
....
julia> czastemp
36-element Array{Date,1}:
2015-01-01
...
ulia> czas
1-element Array{Date,1}:
2015-01-01
...
National fonts maybe are prblems ? , but simply case do this error too:
using Plots ; gr()
for i=1:20
display(plot(rand(5)))
end
I tried the following script and it works fine on all platforms:
using Plots
for i=1:20000
display(plot(plot(rand(5),title=string(i)),plot(rand(10),layout=(1,1))))
end
But I only could test on Windows 10.
First run: error ... like below:
Version 1.1.0 (2019-01-21)
julia> using Plots
julia> for i=1:20000
display(plot(plot(rand(5),title=string(i)),plot(rand(10),layout=(1,1))))
end
connect: No error
GKS: can't connect to GKS socket application
Did you start 'gksqt'?
GKS: Open failed in routine OPEN_WS
GKS: GKS not in proper state. GKS must be either in the state WSOP or WSAC in routine ACTIVATE_WS
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
Restart and run ok, it is random sytuation :/
Hi, is this problem solved?
Works fine on macOS Catalina with gksqt as output device (although it's 12 times faster with plain GR):
time julia -o gksqt -e 'using Plots; for i=1:20000 display(plot(plot(rand(5),title=string(i)),plot(rand(10),layout=(1,1)))) end'
507.68s user 2.61s system 99% cpu 8:32.77 total
I'm on Plots and GR master.
I still got the same issue as @programistawpf mentioned. But the issue is not random, it shows up every time I call the gui() function when using GR as back end .
GKS: Open failed in routine OPEN_WS
GKS: GKS not in proper state. GKS must be either in the state WSOP or WSAC in routine ACTIVATE_WS
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE

If I before manualy runed gksqt.exe look normal.
Win 7/64 Julia 0.7; Julia 1.0.5
But i have two dirs with gksqt.exe . Is it OK ?
Paul
There should be only one run-time. I'd remove the complete GR folder and reinstall GR ...
Most helpful comment
The above problem is fixed in GR master. We will tag a new version soon ...