Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangs when $DISPLAY not reachable #230

Open
peacememories opened this issue Jul 2, 2021 · 0 comments
Open

Hangs when $DISPLAY not reachable #230

peacememories opened this issue Jul 2, 2021 · 0 comments

Comments

@peacememories
Copy link

First of all thanks for developing this great vim alternative! :)

This problem might need some explaining, so here goes.

I've been using amp happily on Ubuntu for Windows for the past few weeks, but recently I couldn't start it anymore. when I opened amp the terminal would freeze. Now it so happens that in the same time I installed X410, an X-server for Windows, and added a script which would set $DISPLAY to the correct value (which is an ip address, since wsl2 needs to connect externally to x410).
When X410 is not running, amp tries to connect to the ip (see stacktrace below), but obviously does not manage to make a connection. The timeout for this seems to be around 30 seconds, so it seems like amp just completely hangs for that time.

I'm not sure what the best way to "fix" this would be. maybe shorten the timeout, or try the connection in the background, or allow me to specify that I do not want to connect to X. Also what I've noticed is that not even ctrl-z or ctrl-c would be able to kill amp in this situation.

Stacktrace
#0  0x00007f0be3dad53b in __libc_connect (fd=8, addr=..., len=16) at ../sysdeps/unix/sysv/linux/connect.c:26
#1  0x00007f0be3e0259d in ?? () from /lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f0be3e02bd2 in xcb_connect_to_display_with_auth_info () from /lib/x86_64-linux-gnu/libxcb.so.1
#3  0x000055fc007265da in xcb::base::Connection::connect ()
#4  0x000055fc0071f66f in x11_clipboard::Context::new ()
#5  0x000055fc0071fc3e in x11_clipboard::Clipboard::new ()
#6  0x000055fc006c025a in amp::models::application::clipboard::Clipboard::new ()
#7  0x000055fc006a0d68 in amp::models::application::Application::new ()
#8  0x000055fc0067efd8 in amp::main ()
#9  0x000055fc0067fee3 in std::sys_common::backtrace::__rust_begin_short_backtrace ()
#10 0x000055fc0067d759 in std::rt::lang_start::{{closure}} ()
#11 0x000055fc008cbf0a in core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once ()
    at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/ops/function.rs:259
#12 std::panicking::try::do_call () at library/std/src/panicking.rs:379
#13 std::panicking::try () at library/std/src/panicking.rs:343
#14 std::panic::catch_unwind () at library/std/src/panic.rs:431
#15 std::rt::lang_start_internal () at library/std/src/rt.rs:51
#16 0x000055fc0067f352 in main () at library/std/src/panicking.rs:519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant