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

Fixed runtime error at GL context creation #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aumouvantsillage
Copy link

When running in Fedora 39, GUI initialization failed with the backtrace below.
This pull request fixes the issue by providing a valid Interface instead of None in DirectContext::new_gl(...).

This solution is based on an example from the rust-skia repository.

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', loopers-gui/src/skia.rs:90:60
stack backtrace:
   0: rust_begin_unwind
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:67:14
   2: core::panicking::panic
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:117:5
   3: core::option::Option<T>::unwrap
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/option.rs:935:21
   4: loopers_gui::skia::skia_main
             at ./loopers-gui/src/skia.rs:90:26
   5: loopers_gui::Gui::start
             at ./loopers-gui/src/lib.rs:208:9
   6: loopers::loopers_jack::jack_main
             at ./loopers/src/loopers_jack.rs:314:9
   7: loopers::main
             at ./loopers/src/main.rs:139:13
   8: core::ops::function::FnOnce::call_once
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ops/function.rs:250:5

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

Successfully merging this pull request may close these issues.

1 participant