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

Fractal crashes when displaying inline video #96618

Closed
tnias opened this issue Aug 29, 2020 · 2 comments · Fixed by #96627
Closed

Fractal crashes when displaying inline video #96618

tnias opened this issue Aug 29, 2020 · 2 comments · Fixed by #96627

Comments

@tnias
Copy link
Contributor

tnias commented Aug 29, 2020

Describe the bug
Fractal crashes on opening a chat with an embedded video( or some other form of gstreamer thingy?).

To Reproduce
Steps to reproduce the behavior:

  1. Get fractal nix-shell -p fractal
  2. Start fractal fractal
  3. (optional) create account and login.
  4. Open a channel with an embedded video. (I tried the fractal channel #fractal-gtk:matrix.org)
  5. See a few messages getting rendered, right before the crash. (This last step takes about 2 seconds)

Expected behavior

The channel's contents are displayed. The application does not crash.

Screenshots Output

% nix-shell -p fractal

[nix-shell:~/src/nixpkgs]$ RUST_BACKTRACE=1 fractal 
thread 'main' panicked at 'Missing dependency: element gtksink is needed (usually, in gstreamer-plugins-good or in gst-plugin-gtk).: BoolError { message: "Failed to create element from factory name", filename: "/build/fractal-4.4.0-vendor.tar.gz/gstreamer/src/auto/element_factory.rs", function: "gstreamer::auto::element_factory", line: 184 }', fractal-gtk/src/widgets/inline_player.rs:249:20
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: std::panicking::rust_panic_with_hook
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::result::unwrap_failed
   9: fractal_gtk::widgets::inline_player::VideoPlayerWidget::new
  10: fractal_gtk::widgets::message::MessageBox::build_room_msg_body_bx
  11: fractal_gtk::widgets::message::MessageBox::widget
  12: fractal_gtk::widgets::message::MessageBox::create
  13: fractal_gtk::widgets::room_history::create_row
  14: glib::source::trampoline
  15: g_main_context_dispatch
  16: g_main_context_iterate.isra.0
  17: g_main_context_iteration
  18: g_application_run
  19: <O as gio::application::ApplicationExtManual>::run
  20: fractal_gtk::main
  21: std::rt::lang_start::{{closure}}
  22: std::rt::lang_start_internal
  23: main
  24: __libc_start_main
  25: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Aborted (core dumped)

Additional context

I tried adding gst-plugins-good as the output suggests, but had no luck.

diff --git a/pkgs/applications/networking/instant-messengers/fractal/default.nix b/pkgs/applications/networking/instant-messengers/fractal/default.nix
index 2abd733b277..f36a51a800f 100644
--- a/pkgs/applications/networking/instant-messengers/fractal/default.nix
+++ b/pkgs/applications/networking/instant-messengers/fractal/default.nix
@@ -59,6 +59,7 @@ rustPlatform.buildRustPackage rec {
     gst_all_1.gst-editing-services
     gst_all_1.gst-plugins-bad
     gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
     gst_all_1.gstreamer
     gst_all_1.gst-validate
     gtk3

Notify maintainers

@dtzWill @worldofpeace @jtojnar

Metadata

% nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.59-hardened, NixOS, 20.09.git.c59ea8b8a0eM (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.7`
 - channels(root): `"nixos-20.09pre239318.c59ea8b8a0e"`
 - channels(user): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: pkgs.fractal
# a list of nixos modules affected by the problem
module:
@jtojnar
Copy link
Contributor

jtojnar commented Aug 29, 2020

gtksink is not build by default, you would need

(gst-plugins-good.override {
  gtkSupport = true;
})

@tnias
Copy link
Contributor Author

tnias commented Aug 29, 2020

The suggested fix works for me. 🎉
I created a PR so in the future installing fractal just works out of the box.

jtojnar pushed a commit that referenced this issue Sep 6, 2020
Closes #96618

Suggested-by: Jan Tojnar <jtojnar@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants