jheinen / GR.jl

Plotting for Julia based on GR, a framework for visualisation applications
Other
357 stars 76 forks source link

GKS not in proper state #319

Open isentropic opened 4 years ago

isentropic commented 4 years ago

Dear @jheinen I know that this issue must've annoyed you a lot. But I can't seem to build GR on latest manjaro Same old

using GR
plot(1:5)
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE

on verions:

Julia Version 1.4.0
Commit b8e9a9ecc6 (2020-03-21 16:36 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Ryzen 7 1700 Eight-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, znver1)
Environment:
  JULIA_NUM_THREADS = 8

Things I tried:

ENV["GRDIR"] = ""
Pkg.build("GR")
pamac install qt5-base
pamac install mesa

I really do not know what is wrong

jheinen commented 4 years ago

One of my colleagues is using Manjaro Linux on his laptop. He can probably test it.

@IngoHeimbach : Could you check this on Monday?

IngoMeyer441 commented 4 years ago

I tested to add the GR package to Julia with and without a C-GR installation. Both works for me on Julia 1.4.2 and Manjaro 20.0.3 (Lysia). In my opinion, it is probably a problem of missing dependencies. A quick fix is to install our GR Arch package from the AUR since the Manjaro package manager will fetch all dependencies of C-GR automatically. Afterwards, adding GR to Julia should work. Could you test this, @isentropic?

isentropic commented 4 years ago

So I got the installation

pamac install gr-framework
Warning: gr-framework is only available from AUR
Build gr-framework from AUR ? [y/N] y

Preparing...
Cloning gr-framework build files...
Checking gr-framework dependencies...
Warning: gr-framework-0.50.0-1 is up to date -- skipping
Nothing to do.
Transaction successfully finished.

showing that I installed it.

Next, I did

ENV["GRDIR"] = ""
Pkg.build("GR")

in julia:

using GR

julia> plot(1:5)
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
isentropic commented 4 years ago

This is strange, as I have no problem installing GR on another machine running manjaro. But for some reason my main machine has problems. This is weird

jheinen commented 4 years ago

What's the value of ENV["GRDIR"] on your main computer (after using GR)?

isentropic commented 4 years ago
using GR
ENV["GRDIR"]

gives: "/usr/gr"

mtsch commented 4 years ago

Just to chime in, I'm on Arch and I sometimes have the same problem. Calling GR.reset() or closeall() from Plots fixes it temporarily (at least until I close the plot window). Sometimes it just works normally.

I tried installing the AUR package and it did not fix the problem.

Before installing the package:

julia> ENV["GRDIR"]
"/home/m/.julia/packages/GR/Atztx/src/../deps/gr"

After:

julia> ENV["GRDIR"]
"/usr/gr"
IngoMeyer441 commented 4 years ago

@mtsch Do you have a code example which breaks GR.jl? I did a test on a fresh Manjaro minimal Xfce installation by installing Julia, adding GR and creating a plot with plot(1:5). That works for me. It would be great if we could find a code sample which makes this error reproducible.

isentropic commented 4 years ago

My xfce Manjaro works too, my desktop kde version fails

IngoMeyer441 commented 4 years ago

So I could try Manjaro KDE or do you use another distribution with KDE?

isentropic commented 4 years ago

Right, gr does not work in Manjaro kde, but works fine in Manjaro xfce

IngoMeyer441 commented 4 years ago

Ok, I will test that.

IngoMeyer441 commented 4 years ago

No luck... Works for me on a fresh Manjaro KDE virtual machine.

IngoMeyer441 commented 4 years ago

@isentropic Could you create a list of all explicitly installed packages on your KDE system? Maybe we can reproduce the problem this way... You can create such a list with:

pacman -Qett
isentropic commented 4 years ago

Yeah sure, thanks for looking at this

pacman -Qett
acpi 1.7-3
acpid 2.0.32-1
amd-ucode 20200519.8ba6fa6-1
android-tools 30.0.0-2
android-udev 20200410-1
anki 2.1.26-1
ark 20.04.1-1
aspell-en 2019.10.06-1
autojump 22.5.3-5
automake 1.16.2-1
b43-fwcutter 019-3
bash-completion 2.10-2
bauh 0.9.4-1
biber 1:2.13-1
bison 3.6.2-1
bluedevil 1:5.18.5-1
code 1.45.1-1
cppunit 1.15.1-2
cpupower 5.7-1
crda 4.14-3
cudnn 7.6.5.32-4
cups-pdf 3.0.1-5
cups-pk-helper 0.2.6-4
dhclient 4.4.2-2
dhcpcd 9.1.1-1
discord 0.0.10-3
dmidecode 3.2-2
dnsmasq 2.81-4
dolphin-plugins 20.04.1-1
drive-bin 0.3.9-1
ebtables 2.0.10_4-8
ecryptfs-utils 111-3
efibootmgr 17-1
emacs 26.3-2
etcher 1.5.95-1
exfat-utils 1.3.0-1
f2fs-tools 1.13.0-2
fakeroot 1.24-2
fd 8.1.1-1
ffmpegthumbs 20.04.1-1
filelight 20.04.1-1
firefox 77.0.1-1
fish 3.1.2-2
flameshot 0.6.0-4
flatpak 1.7.2-1
fwupd 1.4.2-1
fzf 0.21.1-2
gconf 3.2.6+11+g07808097-7
gnome-icon-theme 3.12.0-5
gnome-themes-extra 3.28-2
gnuplot 5.2.8-2
google-chrome 83.0.4103.106-1
gr-framework 0.50.0-1
grive 0.5.1-2
grub-theme-manjaro 18.1-1
gst-libav 1.16.2-2
gst-plugins-bad 1.16.2-11
gst-plugins-ugly 1.16.2-3
gvfs-afc 1.44.1-3
gvfs-gphoto2 1.44.1-3
gvfs-mtp 1.44.1-3
gvfs-nfs 1.44.1-3
gvfs-smb 1.44.1-3
gwenview 20.04.1-1
haveged 1.9.8-2
hplip 1:3.20.5-2
htop 2.2.0-3
iftop 1.0pre4-3
imagewriter 1.10.1420800585.134a9b3-4
inkscape 1.0-4
inotify-tools 3.20.2.1-1
inxi 3.0.37-1
iputils 20190709-2
ipw2100-fw 1.3-10
ipw2200-fw 3.1-8
jfsutils 1.1.15-7
jre 14.0.1-1
kaccounts-providers 20.04.1-1
kamera 20.04.1-1
kate 20.04.1-1
kcalc 20.04.1-1
kde-gtk-config 5.18.5-1
kde-servicemenus-rootactions 2.9.1-1
kdeconnect 20.04.1-1
kdegraphics-thumbnailers 20.04.1-1
kdenetwork-filesharing 20.04.1-1
kdeplasma-addons 5.18.5-1
keditbookmarks 20.04.1-1
keepassxc 2.5.4-2
kernel-alive 0.5-1
kfind 20.04.1-1
kgamma5 5.18.5-1
kget 20.04.1-1
khelpcenter 20.04.1-1
kimageformats 5.70.0-3
kinfocenter 5.18.5-1
konversation 1.7.5-3
kscreen 5.18.5-1
ksshaskpass 5.18.5-1
ksystemlog 20.04.1-1
kvantum-qt5 0.15.3-1
kwallet-pam 5.18.5-1
kwalletmanager 20.04.1-1
kwayland-integration 5.18.5-1
kwrited 5.18.5-1
lazygit 0.20.4-1
lib32-flex 2.6.4-2
lib32-libva-intel-driver 2.4.0-1
lib32-libva-mesa-driver 20.0.7-3
lib32-libva-vdpau-driver 0.7.4-6
lib32-mesa-demos 8.4.0-2
lib32-nss-mdns 0.14.1-1
lib32-ocl-icd 2.2.12-2
libdvdcss 1.4.2-2
libktorrent 2.2.0-1
libreoffice-still 6.3.6-1
libunity 7.1.4-9.1
libva-intel-driver 2.4.1-1
libva-mesa-driver 20.0.7-3
libva-vdpau-driver 0.7.4-4
licenses 20200427-1
linux-lts-headers 1:5.4-3
linux419-nvidia-418xx 418.113-44
logrotate 3.16.0-1
lua-dkjson 2.5-3
man-db 2.9.2-1
man-pages 5.06-2
manjaro-alsa 20200126-1
manjaro-application-utility 1.3.2-2
manjaro-browser-settings 20200124-1
manjaro-documentation-en 20181009-1
manjaro-firmware 20160419-1
manjaro-hello 0.6.5-11
manjaro-hotfixes 2018.08-6
manjaro-kde-settings 20200430-1
manjaro-pulse 20200126-1
manjaro-release 20.0.3-1
manjaro-settings-manager-kcm 0.5.6-9
manjaro-settings-manager-knotifier 0.5.6-9
manjaro-system 20200427-1
manjaro-wallpapers-18.0 1.4-3
memtest86+ 5.01-4
mkinitcpio-openswap 0.1.0-3
mtpfs 1.1-3
nano 4.9.3-1
neovim 0.4.3-3
networkmanager-openconnect 1.2.6-2
networkmanager-openvpn 1.8.12-1
networkmanager-pptp 1.2.9dev+10+gb41b0d0-2
networkmanager-vpnc 1.2.7dev+20+gdca3aea-2
nfs-utils 2.4.3-2
nmap 7.80-2
noto-fonts-cjk 20190409-2
noto-fonts-emoji 20191016-6
npm 6.14.5-1
nss-mdns 0.14.1-3
ntfs-3g 2017.3.23-4
ntp 4.2.8.p14-1
numlockx 1.2-5
nvidia-docker 2.3.0-1
ocl-icd 2.2.12-4
ocs-url 3.1.0-7
okular 20.04.1-1
openbsd-netcat 1.206_1-1
openresolv 3.10.0-1
os-prober 1.77-1
oxygen 5.18.5-1
oxygen-icons 1:5.70.0-1
p7zip 16.02-6
pamac-snap-plugin 9.5.5-1
pamac-tray-appindicator 9.5.5-1
partitionmanager3 3.3.1-1
patchutils 0.3.4-3
perl-file-mimeinfo 0.29-3
plasma-desktop 5.18.5-2
plasma-nm 5.18.5-1
plasma-pa 5.18.5-1
plasma-workspace-wallpapers 5.18.5-1
plasma5-themes-breath 0.4.0-2
poppler-data 0.4.9-2
powerdevil 5.18.5-1
powertop 2.12-1
print-manager 20.04.1-1
pulseaudio-bluetooth 13.0-3
pulseaudio-ctl 1.67-1
python-pysmbc 1.0.20-1
python-reportlab 3.5.42-1
qbittorrent 4.2.5-1
qemu 5.0.0-7
qt4 4.8.7-29.1
qt5-virtualkeyboard 5.15.0-1
rclone 1.52.0-1
reiserfsprogs 3.6.27-3
s-nail 14.9.19-1
samba 4.12.3-2
screenfetch 3.9.1-1
sddm-breath-theme 0.4.0-2
sddm-kcm 5.18.5-1
skanlite 2.1.0.1-2
slack-desktop 4.4.3-1
spectacle 20.04.1-1
spectre-meltdown-checker 0.43-1
splix 2.0.0-14
sshfs 3.7.0-1
steam-manjaro 1.0.0.62-2
subversion 1.14.0-1
sudo 1.9.0-1
system-config-printer 1.5.12+33+g23b454ef-1
systemd-fsck-silent 239-1
systemd-kcm 1.2.1-5
systemd-sysvcompat 245.6-3
teamviewer-latest 15.0.8397-1
telegram-desktop 2.1.10-0.1
terminus-font 4.48-1
texlab-git r1210.c37e116-1
texlive-bibtexextra 2019.52577-1
texlive-fontsextra 2019.52580-1
texlive-formatsextra 2019.51280-1
texlive-games 2019.52525-1
texlive-humanities 2019.52574-1
texlive-langchinese 2019.52237-1
texlive-langcyrillic 2019.52494-1
texlive-langextra 2019.52581-1
texlive-langgreek 2019.51628-1
texlive-langjapanese 2019.52531-1
texlive-langkorean 2019.51035-1
texlive-music 2019.52275-1
texlive-pictures 2019.52499-1
texlive-pstricks 2019.52550-1
texlive-publishers 2019.52538-1
texlive-science 2019.52582-1
thunderbird 68.9.0-1
tigervnc 1.10.1-2
timeshift 20.03.r8.gad3c01c-1
tldr 1.0.0-1
tlp 1.3.1-2
tmux 3.1_b-1
ttf-inconsolata 1:3.000-2
ttf-indic-otf 0.2-9
ttf-wps-fonts 1.0-3
udiskie 2.2.0-1
uefitool-git r217.f9b174f-1
unarchiver 1.10.1-10
usb_modeswitch 2.6.0-2
user-manager 5.18.5-1
vi 1:070224-4
vim 8.2.0914-0
virt-manager 2.2.1-2
virtualbox-ext-oracle 6.1.10-1
virtualbox-guest-utils 6.1.8-2
vlc 3.0.10-2
vmware-keymaps 1.0-1
wallpapers-2018 1.2-1
wallpapers-juhraya 1.1-2
wget 1.20.3-3
winetricks 20200412-1
wps-office 11.1.0.9522-1
xclip 0.13-3
xdg-su 1.2.3-1
xdg-user-dirs 0.17-3
xf86-input-elographics 1.4.2-2
xf86-input-evdev 2.10.6-2
xf86-input-keyboard 1.9.0-3
xf86-input-mouse 1.9.3-1
xf86-input-void 1.4.1-5
xorg-twm 1.0.10-2
xorg-xinit 1.4.1-2
xorg-xkill 1.0.5-2
yadm 2.4.0-1
yakuake 20.04.1-1
zathura-pdf-mupdf 0.3.5-3
zotero 5.0.87-2
zsh-completions 0.32.0-1
zsh-syntax-highlighting 0.7.1-1
zulip-desktop 5.2.0-1
mtsch commented 4 years ago

@IngoHeimbach I think it breaks if I close the plot window too many times, but it seems to be random, so I can't really create a MWE. I do tend to create lots of pretty busy plots, often in 3d, so it might have something to do with that. Installing the AUR package also seems to have helped. It happened only a few times since I have installed but it. If it's of any help, I use xfce with xmonad (which has a tendency to sometimes break things). I can also post a list of packages if it helps. I should add that this is not a very big deal for me, since I can always reset GR and it goes back to normal, but I'd be happy to help if I can. I actually came across this issue randomly when looking for something else.

IngoMeyer441 commented 4 years ago

@isentropic I applied your package list to a fresh Manjaro KDE and GR.jl still works for me. Sorry, currently I have no idea how to break it. @mtsch Thanks for your additional information. Maybe we need more debug output in GR to get the right clue here...

isentropic commented 4 years ago

I realized that gr works in IJulia, so I get the issue is about creating the standalone window. I also get,


(.:3115229): Gtk-WARNING **: 11:05:25.032: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version

(.:3115229): Gtk-WARNING **: 11:05:25.032: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version

(.:3115229): Gtk-WARNING **: 11:05:25.032: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
jheinen commented 4 years ago

i do not think that the Gtk messages are caused by GR.

isentropic commented 4 years ago

Yeah, maybe Plots causes it. It is funny that I got GR to finally work, but it only works in IJulia not REPL

jheinen commented 4 years ago

What's the output of the following commands:

using GR
so = joinpath(ENV["GRDIR"], "lib", "qt5plugin.so")
run(`ldd $so`)
gksqt = joinpath(ENV["GRDIR"], "bin", "gksqt")
run(`ldd $gksqt`)
readdir(joinpath(dirname(pathof(GR)), "..", "deps"))
isentropic commented 4 years ago
julia> using GR
julia> so = joinpath(ENV["GRDIR"], "lib", "qt5plugin.so")
"/usr/gr/lib/qt5plugin.so"

julia> run(`ldd $so`)
        linux-vdso.so.1 (0x00007ffd52d7e000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f6372d37000)
        libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0x00007f6372664000)
        libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0x00007f6372113000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f6371f36000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f6371df1000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f6371dd7000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f6371c0e000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007f6372dfc000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f6371b88000)
        libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f6371b4e000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f6371b34000)
        libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f6371a4d000)
        libmd4c.so.0 => /usr/lib/libmd4c.so.0 (0x00007f6371a37000)
        libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f637198a000)
        libdouble-conversion.so.3 => /usr/lib/libdouble-conversion.so.3 (0x00007f6371973000)
        libicui18n.so.67 => /usr/lib/libicui18n.so.67 (0x00007f6371673000)
        libicuuc.so.67 => /usr/lib/libicuuc.so.67 (0x00007f637148c000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f6371486000)
        libpcre2-16.so.0 => /usr/lib/libpcre2-16.so.0 (0x00007f63713fb000)
        libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007f6371327000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f63711fe000)
        libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x00007f6371147000)
        libGLX.so.0 => /usr/lib/libGLX.so.0 (0x00007f6371114000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f6371040000)
        libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f6371019000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007f637100e000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f6370fe6000)
        liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f6370fc4000)
        libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f6370ea6000)
        libicudata.so.67 => /usr/lib/libicudata.so.67 (0x00007f636f38f000)
        libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f636f31b000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f636f1da000)
        libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f636f1c7000)
        libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f636f1a0000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f636f176000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f636f16f000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f636f167000)
Process(`ldd /usr/gr/lib/qt5plugin.so`, ProcessExited(0))

julia> gksqt = joinpath(ENV["GRDIR"], "bin", "gksqt")
"/usr/gr/bin/gksqt"

julia> run(`ldd $gksqt`)
        linux-vdso.so.1 (0x00007fff58bd4000)
        libQt5Widgets.so.5 => /usr/lib/libQt5Widgets.so.5 (0x00007f2917e39000)
        libQt5Network.so.5 => /usr/lib/libQt5Network.so.5 (0x00007f2917cb8000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f2917c96000)
        libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0x00007f29175c3000)
        libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0x00007f2917072000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f2916e95000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f2916d4e000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f2916d34000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f2916b6d000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f2916b53000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f2916b4d000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007f2916af8000)
        libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x00007f2916a66000)
        libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007f2916789000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f29185cb000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f2916703000)
        libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f29166c9000)
        libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f29165e2000)
        libmd4c.so.0 => /usr/lib/libmd4c.so.0 (0x00007f29165cc000)
        libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f291651f000)
        libdouble-conversion.so.3 => /usr/lib/libdouble-conversion.so.3 (0x00007f2916508000)
        libicui18n.so.67 => /usr/lib/libicui18n.so.67 (0x00007f2916208000)
        libicuuc.so.67 => /usr/lib/libicuuc.so.67 (0x00007f2916021000)
        libpcre2-16.so.0 => /usr/lib/libpcre2-16.so.0 (0x00007f2915f96000)
        libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007f2915ec4000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f2915d99000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007f2915cb3000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007f2915c82000)
        libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x00007f2915c7c000)
        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007f2915c6d000)
        libkeyutils.so.1 => /usr/lib/libkeyutils.so.1 (0x00007f2915c64000)
        libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f2915c4a000)
        libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x00007f2915b93000)
        libGLX.so.0 => /usr/lib/libGLX.so.0 (0x00007f2915b60000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f2915a8c000)
        libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f2915a67000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007f2915a5a000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f2915a32000)
        liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f2915a10000)
        libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f29158f2000)
        libicudata.so.67 => /usr/lib/libicudata.so.67 (0x00007f2913ddb000)
        libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f2913d67000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f2913c26000)
        libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f2913c13000)
        libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f2913bec000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f2913bc2000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f2913bbb000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f2913bb3000)
Process(`ldd /usr/gr/bin/gksqt`, ProcessExited(0))

julia> readdir(joinpath(dirname(pathof(GR)), "..", "deps"))
4-element Array{String,1}:
 "build.jl"
 "build.log"
 "downloads"
 "gr"
jheinen commented 4 years ago

The downloads and gr folders in joinpath(dirname(pathof(GR)), "..", "deps") shouldn't exist if you installed the GR Arch package from the AUR.

The build.log file should contain [ Info: Found existing GR run-time in /usr/gr. Something went wrong ...

jheinen commented 4 years ago

BTW: Can you "manually" start gksqt in your shell? % /usr/gr/bin/gksqt

isentropic commented 4 years ago

this just hangs

 /usr/gr/bin/gksqt

without output

jheinen commented 4 years ago

It doesn't hang - it waits for connections ...

Just wanted to know, whether there is an error message.

So, the build.log is ok? => [ Info: Found existing GR run-time in /usr/gr.

isentropic commented 4 years ago
 cat ~/.julia/packages/GR/Atztx/deps/build.log
[ Info: Found existing GR run-time in /home/zhanibek/.julia/packages/GR/Atztx/src/../deps/gr
jheinen commented 4 years ago

Please try to remove this folder (as mentioned before) /home/zhanibek/.julia/packages/GR/Atztx/deps/gr ... and ] build GR

isentropic commented 4 years ago

Oh thank you so much. It worked. I hope this helped you to figure out the issue, as I had no idea that I need to delete something

mtsch commented 4 years ago

I think I realized how I manage to crash GR. With GR loaded, I run an unrelated expensive computation that takes up all my RAM, to the point of making my computer completely unresponsive. I kill Julia with kill -9. After restarting Julia and reloading GR, I get these errors. GR.reset() fixes it.

I would guess in my case, the problem is not with GR, but with the fact that I kill Julia in the worst possible way. Something probably goes wrong then.

jheinen commented 4 years ago

If you stop Julia with kill -9 the GR exit handlers are bypassed which has the consequence that the GR graphics subsystem cannot be terminated correctly. Using kill -HUP might work better ...

koehlerson commented 3 years ago

I have this problem on two arch machines whenever I use tmux. Julia REPLs in tmux cannot plot, while a terminal outside of tmux plots as expected

IngoMeyer441 commented 3 years ago

@koehlerson I suspect that the environment variables are different in your tmux session. Could you create a file of your environment variables in each session, for example with

printenv | sort > output_tmux.txt

and create a diff?

koehlerson commented 3 years ago

Sure:

➜ diff ~/Desktop/output_tmux.txt ~/Desktop/output_terminal.txt 
0a1
> COLORTERM=truecolor
1a3
> DESKTOP_SESSION=i3
3a6,9
> GDMSESSION=i3
> GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/0b626a15_b995_4c13_b8ae_b7d4f74cdae9
> GNOME_TERMINAL_SERVICE=:1.35
> GTK_MODULES=canberra-gtk-module
5c11,12
< INFOPATH=/opt/texlive/2019/texmf-dist/doc/info:/opt/texlive/2019/texmf-dist/doc/info:
---
> I3SOCK=/run/user/1001/i3/ipc-socket.10015
> INFOPATH=/opt/texlive/2019/texmf-dist/doc/info:
9d15
< LANGUAGE=en_US
18,19c24,25
< OLDPWD=/home/mkoehler/Repos/convexified-damage
< P9K_SSH=1
---
> OLDPWD=/home/mkoehler
> P9K_SSH=0
22,23c28,29
< PATH=/home/mkoehler/bin/:/home/mkoehler/.local/bin:/opt/texlive/2019/bin/x86_64-linux:/home/mkoehler/.local/bin/:/home/mkoehler/bin/:/home/mkoehler/.local/bin:/opt/texlive/2019/bin/x86_64-linux:/home/mkoehler/tools/spack/opt/spack/linux-archrolling-x86_64/gcc-9.2.0/environment-modules-4.3.1-ugmms6p4vpk2xbyecfigsuu2ete4v2t3/bin:/home/mkoehler/tools/spack/bin:/home/mkoehler/.local/bin/:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
< PWD=/home/mkoehler/Repos/convexified-damage
---
> PATH=/home/mkoehler/bin/:/home/mkoehler/.local/bin:/opt/texlive/2019/bin/x86_64-linux:/home/mkoehler/tools/spack/opt/spack/linux-archrolling-x86_64/gcc-9.2.0/environment-modules-4.3.1-ugmms6p4vpk2xbyecfigsuu2ete4v2t3/bin:/home/mkoehler/tools/spack/bin:/home/mkoehler/.local/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
> PWD=/home/mkoehler
25c31
< SHLVL=2
---
> SHLVL=1
27,28d32
< SSH_CLIENT=134.147.37.81 42480 22
< SSH_TTY=/dev/pts/0
31,53d34
< TMUX_COLUMNS_0=270
< TMUX_COLUMNS_1=135
< TMUX_COLUMNS_2=272
< TMUX_COLUMNS_3=135
< TMUX_COLUMNS_4=135
< TMUX_COLUMNS_5=153
< TMUX_COLUMNS_6=319
< TMUX_COLUMNS_7=319
< TMUX_COLUMNS_8=319
< TMUX_COLUMNS_9=153
< TMUX_PANE=%10
< TMUX_PLUGIN_MANAGER_PATH=/home/mkoehler/.tmux/plugins/
< TMUX_PWD_0=/home/mkoehler/Repos/convexified-damage
< TMUX_PWD_1=/home/mkoehler/Repos/convexified-damage
< TMUX_PWD_2=/home/mkoehler/Repos/convexified-damage
< TMUX_PWD_3=/home/mkoehler/Repos/convexified-damage
< TMUX_PWD_4=/home/mkoehler/Repos/convexified-damage
< TMUX_PWD_5=/home/mkoehler/Repos/convexified-damage
< TMUX_PWD_6=/home/mkoehler
< TMUX_PWD_7=/home/mkoehler
< TMUX_PWD_8=/home/mkoehler/Repos/convexified-damage
< TMUX_PWD_9=/home/mkoehler/Repos/convexified-damage
< TMUX=/tmp/tmux-1001/default,1008,0
55a37
> VTE_VERSION=6201
56a39
> XDG_CURRENT_DESKTOP=i3
57a41
> XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/mkoehler
58a43,44
> XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
> XDG_SEAT=seat0
60,61c46,50
< XDG_SESSION_ID=4
< XDG_SESSION_TYPE=tty
---
> XDG_SESSION_DESKTOP=i3
> XDG_SESSION_ID=8
> XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
> XDG_SESSION_TYPE=x11
> XDG_VTNR=7
IngoMeyer441 commented 3 years ago

There are SSH_CLIENT and SSH_TTY variables in your tmux output. Do you try to plot over an ssh connection? If yes, make sure that X forwarding is enabled with -X or -Y.

koehlerson commented 3 years ago

fair point, but no I'm talking about the case when I sit in front of the machine and I want the plot to open on the mentioned machine. There is still a ssh session because I occasionally connect with my laptop to the tmux server. X forwarding never failed for me :+1:

IngoMeyer441 commented 3 years ago

@koehlerson Does the problem with GR plots in tmux still persist?