emilk / egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
https://www.egui.rs/
Apache License 2.0
22.61k stars 1.62k forks source link

proxies still attached #3413

Open jcbritobr opened 1 year ago

jcbritobr commented 1 year ago

Hello, good afternoon, I'm getting this warning after closing a eframe application on desktop

❯ ./eguisamp
warning: queue 0x7f7f5c000ca0 destroyed while proxies still attached:
  wl_data_offer@4278190081 still attached
  zwp_primary_selection_device_v1@50 still attached
  zwp_primary_selection_device_manager_v1@46 still attached
  wl_data_device@49 still attached
  wl_seat@48 still attached
  wl_data_device_manager@47 still attached
  wl_registry@45 still attached
warning: queue 0x559ec10e73b0 destroyed while proxies still attached:
  wl_buffer@20 still attached
  wl_buffer@56 still attached
  wl_buffer@60 still attached
  wl_buffer@42 still attached
  wl_buffer@43 still attached
  wl_buffer@55 still attached
  wl_buffer@53 still attached
  wl_buffer@62 still attached
  wl_buffer@61 still attached
  wl_shm_pool@64 still attached
  wl_subsurface@36 still attached
  wl_surface@35 still attached
  wl_subsurface@34 still attached
  wl_surface@33 still attached
  wl_subsurface@32 still attached
  wl_surface@31 still attached
  wl_subsurface@30 still attached
  wl_surface@29 still attached
  wl_subsurface@28 still attached
  wl_surface@27 still attached
  xdg_wm_base@25 still attached
  xdg_activation_v1@14 still attached
  zwp_text_input_manager_v3@13 still attached
  zwp_pointer_constraints_v1@12 still attached
  zwp_relative_pointer_manager_v1@11 still attached
  wl_seat@10 still attached

fedora 38 x64, 6.4.15-200.fc38.x86_64 linux rust 1.72.1 egui 0.23.0

szabgab commented 10 months ago

I had a similar error in my hello world application on ubuntu using rust 1.75 and egui 0.24. Upgrading to egui 0.25 fixed it .

AvinashPrajapati commented 4 weeks ago

Can anyone guide me that how should i fix this error. I am using WSL to run the rust.

rust egui code

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
    let options = eframe::NativeOptions {
        viewport: egui::ViewportBuilder::default().with_inner_size([320.0, 240.0]),
        ..Default::default()
    };

    eframe::run_simple_native("Rust Maven egui App", options, move |ctx, _frame| {
        egui::CentralPanel::default().show(ctx, |_ui| {});
    })
}

/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.5/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(NoCompositor)) }))

emilk commented 4 weeks ago

Is this using the glow or wgpu backend? (run with RUST_LOG=debug and it will be printed)

AvinashPrajapati commented 4 weeks ago

Is this using the glow or wgpu backend? (run with RUST_LOG=debug and it will be printed)

it is solved bro. it was actually problem with the ubuntu updates as i updated to latest ubuntu in WSL2 windows but some issues was still there( i just update things accordingly).

but i am getting warning like this and i don not know what is the meaning of this (Note i am using WSL2 Ubuntu with code)

MESA: error: ZINK: failed to choose pdev glx: failed to create drisw screen

it is a warning, because the program has been execute successfully. Thanks for quick response.

ssyqq commented 1 week ago

@AvinashPrajapati can you tell me how to solve WaylandError(Connection(NoCompositor))?

AvinashPrajapati commented 1 week ago

@AvinashPrajapati can you tell me how to solve WaylandError(Connection(NoCompositor))?

If you are using WSL2 on Windows then this Wayland Error is because the WSL2 linux system can not display the render window the Egui trying to show. There is two solution

  1. Upgrade the WSL2 and also update the linux system u are using like Ubuntu22 to Ubuntu24
  2. Or, you can install the Rust using Visual Studio as the rust.org has recommended in their instructions.

it will solve the problem.

ssyqq commented 1 week ago

For option 1:

I am currently using ubuntu24

❰ls❙/mnt/d/code❱✔≻ lsb_release -a
No LSB modules are available.
Distributor ID: Free
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble

The current WSL2 is already the latest version

PS D:\code> wsl --update
Checking for updates.
The latest version of Windows Subsystem for Linux is installed.
PS D:\code> wsl -v
WSL version: 2.3.26.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2314
AvinashPrajapati commented 1 week ago

For option 1:

I am currently using ubuntu24

❰ls❙/mnt/d/code❱✔≻ lsb_release -a
No LSB modules are available.
Distributor ID: Free
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble

The current WSL2 is already the latest version

PS D:\code> wsl --update
Checking for updates.
The latest version of Windows Subsystem for Linux is installed.
PS D:\code> wsl -v
WSL version: 2.3.26.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2314

Ok just write down the very basic EGUI app that create a simple window that has label 'Hello WOrld' and reply me with the main.rs code.

ssyqq commented 1 week ago

sure. use vscode and WSL2 extension

Do I need to install Wayland?

use eframe::egui;
fn main() -> Result<(), eframe::Error> {
    let options = eframe::NativeOptions {
        viewport: egui::ViewportBuilder::default().with_inner_size([320.0, 240.0]),
        ..Default::default()
    };

    eframe::run_simple_native("Rust Maven egui App", options, move |ctx, _frame| {
        egui::CentralPanel::default().show(ctx, |_ui| {});
    })
}
❰ls❙~/code/rust/wsl2egui(git≠master)❱✔≻ cargo run
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.16s
     Running `target/debug/wsl2egui`
Error: WinitEventLoop(Os(OsError { line: 81, file: "/home/ls/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.5/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(NoCompositor)) }))
fatal: bad revision 'HEAD'
AvinashPrajapati commented 1 week ago

sure. use vscode and WSL2 extension

Do I need to install Wayland?

use eframe::egui;
fn main() -> Result<(), eframe::Error> {
    let options = eframe::NativeOptions {
        viewport: egui::ViewportBuilder::default().with_inner_size([320.0, 240.0]),
        ..Default::default()
    };

    eframe::run_simple_native("Rust Maven egui App", options, move |ctx, _frame| {
        egui::CentralPanel::default().show(ctx, |_ui| {});
    })
}
❰ls❙~/code/rust/wsl2egui(git≠master)❱✔≻ cargo run
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.16s
     Running `target/debug/wsl2egui`
Error: WinitEventLoop(Os(OsError { line: 81, file: "/home/ls/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.5/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(NoCompositor)) }))
fatal: bad revision 'HEAD'

Husss... your code is correct Man. The problem is same as from the above two. I want to know that why are you using the WSL2 even though the rust can be installed in windows system.

ssyqq commented 1 week ago

In fact, it’s just because I’m not used to using PowerShell. But there is still no problem in working normally under Windows.

Thanks for your reply, I plan to uninstall WSL2