gpui-component icon indicating copy to clipboard operation
gpui-component copied to clipboard

linux platform crash with BorrowMutError

Open CharlesChen0823 opened this issue 1 year ago • 3 comments

warning: profile package spec `cranelift-codegen` in profile `dev` did not match any packages
   Compiling gpui-app v0.1.0 (/home/charles/programming/rust/gpui-component/crates/app)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.75s
     Running `target/debug/gpui-app`
thread 'main' panicked at /home/username/.cargo/git/checkouts/zed-23e65a6dff445450/d18b49a/crates/gpui/src/platform/linux/wayland/client.rs:681:23:
already borrowed: BorrowMutError
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

CharlesChen0823 avatar Aug 04 '24 01:08 CharlesChen0823

remove these lines https://github.com/huacnlee/gpui-component/blob/340c5fef3db53dcd4f267f0b570c33b53bf5d30f/crates/app/src/story_workspace.rs#L39-L41

of course this isn't perfect but it worked for me

qwqtoday avatar Aug 07 '24 07:08 qwqtoday

yes, that work.

CharlesChen0823 avatar Aug 07 '24 14:08 CharlesChen0823

On my other laptop running Arch Linux, this error occurs at startup and the program exits, regardless of whether I'm using a Wayland or X11 environment. However, on my desktop at work, which has the same environment setup, this issue doesn't happen. Instead, the error is triggered when I click the window close button. I still haven't figured out why this happens.

eastack avatar Aug 12 '24 08:08 eastack