iced icon indicating copy to clipboard operation
iced copied to clipboard

White screen in the clock example inside a VM with X forwarding

Open DevAlone opened this issue 3 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

Is this issue related to iced?

  • [X] My hardware is compatible and my graphics drivers are up-to-date.

What happened?

I don't trust developers (including myself), so on my personal PC I do programming inside a VM. As a benefit, I get a clean system without tons of library pollution, as a drawback, things sometimes just don't work, the same happens to iced inside a vagrant box with GUI forwarded through ssh. The window appears, but the whole canvas is just white.

Unfortunately, I can't provide viable steps, I tried to make them up, but probably I need to install more libraries or something, cuz now it's even worse, the screen is black and the app terminates immediately with a message Segmentation fault (core dumped).

Steps to (try to) reproduce:

  1. Create a box
vagrant init ubuntu/focal64
  1. Enable X forwarding
vim Vagrantfile

Add these lines before the last end:

config.ssh.forward_agent = true
config.ssh.forward_x11 = true

You can also optionally uncomment the config.vm.provider "virtualbox" do |vb| and ask for more CPU and memory to make compilation faster

vb.memory = "6144"
vb.cpus = "12"
  1. Start the VM
vagrant up
vagrant ssh
  1. Inside the VM, install necessary software and run the example
sudo apt update && sudo apt upgrade && sudo apt install -y build-essential x11-apps mesa-utils libxrandr2 libxi6
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
1<Enter>
source $HOME/.cargo/env
git clone --depth 1 https://github.com/iced-rs/iced.git
cd iced/
cargo run --package clock
  1. Observe the white screen and these errors in the logs (or the seg fault)
libEGL warning: DRI3: failed to query the version
libEGL warning: DRI2: failed to authenticate

The host system is Ubuntu

> lsb_release -a                                                                                                                                                                                                                       1 ms  
No LSB modules are available.
Distributor ID: Neon
Description:    KDE neon User - 5.24
Release:        20.04
Codename:       focal

Running everything in Gnome with X11. Feel free to ask for more info/logs/anything.

What is the expected behavior?

Clock

Version

master

Operative System

Linux

Do you have any log output?

libEGL warning: DRI3: failed to query the version
libEGL warning: DRI2: failed to authenticate

DevAlone avatar May 15 '22 23:05 DevAlone

@DevAlone What does your Cargo.toml file look like?

xTekC avatar Jun 19 '22 05:06 xTekC

Using X11 forwarding with my machines works (contents of the canvas get drawn) as simply as

ssh -X remote
cargo run

The warnings appear as well, but it didn't cause any issues.

My Cargo.toml:

[dependencies.iced]
version = "0.4.2"
default-features = false
features = ["wgpu", "canvas", "tokio", "debug"]

torkleyy avatar Jun 23 '22 04:06 torkleyy