Bug 161780 - Under Wayland Libreoffice Impress freezes if the presentation contains any kind of video (Arch, gtk3)
Summary: Under Wayland Libreoffice Impress freezes if the presentation contains any ki...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.6.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL: https://forum.endeavouros.com/t/solve...
Whiteboard:
Keywords:
Depends on:
Blocks: Media-Playback GTK3
  Show dependency treegraph
 
Reported: 2024-06-25 16:05 UTC by Alexander
Modified: 2024-06-27 15:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test odp file (2.40 MB, application/vnd.oasis.opendocument.presentation)
2024-06-26 12:30 UTC, Alexander
Details
A video file (2.36 MB, video/mpeg)
2024-06-26 12:32 UTC, Alexander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2024-06-25 16:05:12 UTC
Description:
Under Wayland Libreoffice Impress freezes if the presentation contains any kind of video. Under X11 it seems to be OK. I also tried it for a new created user account.

Try to add a video to a presentation. Save it. try to play the video when presenting or delete it when in edit mode. The application will freeze.

It freezes for libreoffice still 7.6.7 and foe fresh 24.2.4


Steps to Reproduce:
1. Add a video to a presentation or open one containing a video.
2. Try to play the video when presenting. Or try to remove it when editing
3.

Actual Results:
The application freezes

Expected Results:
Play the video


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Operating System: Arch Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 PRO 4650U with Radeon Graphics
Memory: 14,9 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: LENOVO
Product Name: 20UD0010GM
System Version: ThinkPad T14 Gen 1
Comment 1 Stéphane Guillou (stragu) 2024-06-26 02:18:34 UTC
Thanks for the report.

I am wondering if this is resolved by the commits in bug 145735.
Can you please:
- install a daily build from https://dev-builds.libreoffice.org/daily/master/current.html (it will install alongside your stable installation)
- see if the issue is resolved.

If the issue is resolved in a daily build, it should be good in the upcoming 24.2.5 release.
Comment 2 Alexander 2024-06-26 05:15:33 UTC
I tested the daily build but the issue is still there.
Comment 3 Stéphane Guillou (stragu) 2024-06-26 08:10:19 UTC
Thank you for testing.

Are you able to attach a sample file to this report? With the "Add an attachment" link above the comment box.
Or at least let us know which kind of file format / encoding the video uses.
Please also check that you have all the necessary codecs.

Michael, I thought you might be interested.
Comment 4 Alexander 2024-06-26 12:30:55 UTC
Created attachment 194973 [details]
Test odp file
Comment 5 Alexander 2024-06-26 12:32:05 UTC
Created attachment 194974 [details]
A video file

A video file used in the presentation. The issue happens for every video type.
Comment 6 Michael Weghorn 2024-06-26 12:37:37 UTC
(In reply to Alexander from comment #4)
> Created attachment 194973 [details]
> Test odp file

Works fine for me on Debian testing with that test file and the below-mentioned LO version.


(In reply to Alexander from comment #2)
> I tested the daily build but the issue is still there.

TDF daily builds don't build the qt6 VCL plugin (for which the tdf#145735 commits are), but only qt5/kf5.

Can you please copy the detailed version information from "Help" -> "About LibreOffice"?

Does running with environment variable QT_QPA_PLATFORM=xcb help to work around the issue?

For video playback on Wayland with qt5/kf5, a Qt-based GStreamer video sink/plugin is used, e.g. provided by package qtgstreamer-plugins-qt5 on Debian. Do you have that installed?


Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4258e408b3c5030a69fab6e3c2f9149cad0513d6
CPU threads: 32; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+wayland)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 7 Alexander 2024-06-26 13:27:00 UTC
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9c1a48f844eaefc505a5914338b6f444011bf315
CPU threads: 12; OS: Linux 6.9; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

The output:

warn:vcl.gtk3:53092:53092:vcl/unx/gtk3/gtkframe.cxx:3034: its undesirable to need the NativeWindowHandle, see tdf#139609
warn:avmedia.gstreamer:53092:53098:avmedia/source/gstreamer/gstplayer.cxx:444: error: 'Application did not provide a wayland display handle' debug: '../gstreamer/subprojects/gst-plugins-bad/ext/wayland/gstwaylandsink.c(1117): gst_wayland_sink_set_window_handle (): /GstPlayBin:playbin4/GstPlaySink:playsink/GstBin:vbin/GstWaylandSink:video-output:
waylandsink cannot use an externally-supplied surface without an externally-supplied display handle. Consider providing a display handle from your application with GstContext'

Everything gstreamer related. I cant find a packet 

gstreamer 1.24.5-2
gstreamer-vaapi 1.24.5-2
gstreamermm 1.10.0-2
phonon-qt5-gstreamer 4.10.0-4
lib32-gstreamer 1.24.5-1
gstreamer0.10 0.10.36-20
gstreamer0.10-base 0.10.36-13
gstreamer0.10-base-plugins 0.10.36-13
Comment 8 Michael Weghorn 2024-06-26 15:49:15 UTC
(In reply to Alexander from comment #7)
> Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: 9c1a48f844eaefc505a5914338b6f444011bf315
> CPU threads: 12; OS: Linux 6.9; UI render: default; VCL: gtk3
> Locale: en-US (en_US.UTF-8); UI: en-US
> Calc: threaded

That's the gtk3 VCL plugin, not one of the Qt-based ones (qt5, kf5, qt6, kf6) I mentioned above. If you're in a KDE Plasma session, one of the Q6-based ones should usually be selected by default.

For the gtk3 VCL plugin, the gtk3 GStreamer plugin is used. On Debian, that is provided by package gstreamer1.0-gtk3, which ships a file /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstgtk.so .

Can you check whether your distro also provides that somehow?

With the above-mentioned package installed, video playback works fine for me with gtk3. Without it being present, I can reproduce a freeze once I start the presentation.

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6c09c85ec384e88c89bff0817e7fe9889d7ed68e
CPU threads: 32; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 9 Michael Weghorn 2024-06-26 15:52:50 UTC
As a workaround (if the gstreamer gtk3 plugin is not available in your distro): If you're using the gtk3 VCL plugin, you can set environment variable GDK_BACKEND=x11 before starting LO to force running LO on XWayland when in a Wayland session. (The issue then isn't reproducible for me.)
Comment 10 Alexander 2024-06-27 06:04:14 UTC
Thanks you very much for your efforts to hello me. Under Archlinux gst-plugin-gtk must be installed when in Wayland.
Comment 11 Stéphane Guillou (stragu) 2024-06-27 15:50:56 UTC
Also seen on EndeavourOS: https://forum.endeavouros.com/t/solved-multimedia-within-libreoffice-impress/45754

Closing as "not a bug" as it was a missing plugin, but makes me wonder if we could fail in a more elegant way and even hint at what's missing with an error message...