alacritty: Alacritty doesn't work in VirtualBox

Alcracitty running on Fedora 25 (on VirtualBox) crashes at startup:

$ RUST_BACKTRACE=1 target/release/alacritty 
OpenGL Warning: glXChooseVisual: ignoring attribute 0x22
device_pixel_ratio: 1
width: 1024, height: 768
thread 'main' panicked at 'gl function was not loaded', /home/ldanko/work/alacritty/target/release/build/alacritty-d032f55a418cfed4/out/gl_bindings.rs:20591
stack backtrace:
   1:     0x55d3d2b4752a - std::sys::imp::backtrace::tracing::imp::write::h9c41d2f69e5caabf
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:     0x55d3d2b469b1 - std::panicking::default_hook::{{closure}}::h1f61f3c769fffe7a
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:351
   3:     0x55d3d2b45b77 - std::panicking::rust_panic_with_hook::hffbc74969c7b5d87
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:367
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:555
   4:     0x55d3d2a48711 - _ZN3std9panicking11begin_panic17h0a82ee08bc6f08bcE.641
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:517
   5:     0x55d3d2a486cb - alacritty::gl::missing_fn_panic::he1a3e5d8d51883fb
                        at /home/ldanko/work/alacritty/src/lib.rs:85
   6:     0x55d3d2a75df9 - alacritty::display::Display::new::h05668100d7c3e445
                        at /home/ldanko/work/alacritty/src/lib.rs:85
                        at /home/ldanko/work/alacritty/src/renderer/mod.rs:471
                        at /home/ldanko/work/alacritty/src/display.rs:154
   7:     0x55d3d2a3c8bb - alacritty::run::he9434698bec6f695
                        at /home/ldanko/work/alacritty/src/main.rs:75
   8:     0x55d3d2a3be89 - alacritty::main::h3744b8d6b60d0e63
                        at /home/ldanko/work/alacritty/src/main.rs:59
   9:     0x55d3d2a482d0 - main
  10:     0x7faa9a6eb400 - __libc_start_main
  11:     0x55d3d2a0e6e9 - _start
  12:                0x0 - <unknown>

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 18 (5 by maintainers)

Most upvoted comments

Thank you for including the stack trace. It appears you are missing glGenVertexArrays (it is used here). That function is only available on OpenGL version 3.0 and newer. Your glxinfo report indicates only OpenGL 2.1 support.

I have to apologize as I won’t really be contributing to helping solve this problem as I don’t understand half of the comments. However, I just tried this with

  • VirtualBox 5.2.0
  • Ubuntu 18.04.1 LTS
  • virtualbox-guest-x11 / VBox_GAs_5.2.20

And with the additions installed (tried each separately) alacritty would not open with the same message as @miikkas

Error creating GL context; Couldn’t find any pixel format that matches the criteria.

I removed the additions and both times alacritty would start properly. Unfortunately, copy/paste then obviously breaks.

Also, I have Enable 3D Acceleration enabled in VirtualBox. Without this, the VM is painfully slow but everything (both alacritty + guest additions) works.