Bug 473648 - kasts resets playing position when paused using an interface other than its GUI
Summary: kasts resets playing position when paused using an interface other than its GUI
Status: RESOLVED WORKSFORME
Alias: None
Product: kasts
Classification: Applications
Component: general (show other bugs)
Version: 23.04.3
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: bart
URL:
Keywords:
: 480518 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-08-22 17:55 UTC by Marco Mattiolo
Modified: 2024-01-30 13:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
packaging log of kasts 23.08.0 (before installing the vlc package, just libvlc-dev installed) (485.43 KB, text/plain)
2023-08-25 11:50 UTC, Marco Mattiolo
Details
Audio backend selection interface under Settings in kasts_23.08.0 for Debian testing (169.14 KB, image/png)
2023-09-05 20:18 UTC, Marco Mattiolo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Mattiolo 2023-08-22 17:55:45 UTC
SUMMARY
Hi and thank you for developing Kasts!

I've compiled and installed it on my OG PP with Mobian bookworm (based on Debian stable), DE Phosh.
I've noticed that when podcast is paused through something else than kasts' UI itself, playing position resets to where it was before it was played. Examples of "something else than kasts' UI" is the widget on lockscreen (both Plasma mobile and Phosh) or the play/pause button on the Bluetooth speaker (in my case, car's audio system).


STEPS TO REPRODUCE
1. open Kasts, current episode is at 05:00 advancement, start playing it
2. after 30', pause reproduction from lockscreen's widget
3. unlock lockscreen and check kasts

OBSERVED RESULT
episode's advancement is at 05:00

EXPECTED RESULT
episode's advancement is at 35:00

SOFTWARE/OS VERSIONS
Linux: 6.1.37+sunxi64
KDE Plasma Version: none (using Phosh)
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
I'd like to capture some logs, if that can be useful: what can be most useful? Journalctl? Dbus? Running kasts from console and capturing output?
Comment 1 bart 2023-08-23 08:57:15 UTC
Thanks for reporting.  Can you check which audio backend Kasts is using?  You can check in the general settings.

I have a sneaking suspicion that it's `qt multimedia`.  It (and the underlying gstreamer lib) has multiple critical/annoying bugs on linux, including one which has similar symptoms to what you are describing.  That backend is actually only still there to have an audio backend on Android.  If by any means possible, Kasts should be using the VLC backend on linux.
Comment 2 Marco Mattiolo 2023-08-24 16:47:39 UTC
(In reply to bart from comment #1)
> Thanks for reporting.  Can you check which audio backend Kasts is using? 
> You can check in the general settings.
> 
> I have a sneaking suspicion that it's `qt multimedia`.  It (and the
> underlying gstreamer lib) has multiple critical/annoying bugs on linux,
> including one which has similar symptoms to what you are describing.  That
> backend is actually only still there to have an audio backend on Android. 
> If by any means possible, Kasts should be using the VLC backend on linux.

Right on spot! Audio backend is actually "Qt Multimedia".

I guess I will have to re-compile kasts including libvlc-dev in the Build-Deps. I was anyway going to compile 23.08... will keep you updated.
Comment 3 Marco Mattiolo 2023-08-25 11:48:54 UTC
I have to correct myself: libvlc-dev was already inside the list of Build-Deps, then there's maybe an issue with compilation.

During kasts-23.08.0 packaging, I've seen the following

-- Found KF5: success (found suitable version "5.107.0", minimum required is "5.102.0") found components: CoreAddons I18n 
-- Checking for module 'libvlc'
--   Found libvlc, version 3.0.18
-- Checking for module 'gstreamer-1.0'
--   Package 'gstreamer-1.0', required by 'virtual:world', not found
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY

but

-- The following RECOMMENDED packages have not been found:

 * LIBVLC, Allows to play audio using libVLC as backend, <https://www.videolan.org/vlc/libvlc.html>

-- Configuring done (18.4s)
-- Generating done (0.3s)

and later

[ 24%] Building CXX object src/kmediasession/CMakeFiles/KMediaSession.dir/metadatalogging.cpp.o
cd /home/debian/build/build_kasts/kasts-23.08.0/obj-aarch64-linux-gnu/src/kmediasession && /usr/bin/c++ -DKCOREADDONS_LIB -DKF_DEPRECATED_WARNINGS_SINCE=0x60000 -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x56600 -DKMediaSession_EXPORTS -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DEPRECATED_WARNINGS_SINCE=0x60000 -DQT_DISABLE_DEPRECATED_BEFORE=0x50f02 -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_KEYWORDS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_URL_CAST_FROM_STRING -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/home/debian/build/build_kasts/kasts-23.08.0/obj-aarch64-linux-gnu/src/kmediasession -I/home/debian/build/build_kasts/kasts-23.08.0/src/kmediasession -I/home/debian/build/build_kasts/kasts-23.08.0/obj-aarch64-linux-gnu/src/kmediasession/KMediaSession_autogen/include -I/home/debian/build/build_kasts/kasts-23.08.0/obj-aarch64-linux-gnu -isystem /usr/include/aarch64-linux-gnu/qt5 -isystem /usr/include/aarch64-linux-gnu/qt5/QtCore -isystem /usr/lib/aarch64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/aarch64-linux-gnu/qt5/QtMultimedia -isystem /usr/include/aarch64-linux-gnu/qt5/QtNetwork -isystem /usr/include/aarch64-linux-gnu/qt5/QtGui -isystem /usr/include/KF5/KCoreAddons -isystem /usr/include/KF5 -isystem /usr/include/KF5/KI18n -isystem /usr/include/aarch64-linux-gnu/qt5/QtDBus -g -O2 -ffile-prefix-map=/home/debian/build/build_kasts/kasts-23.08.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Werror=undef -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -pedantic -Wzero-as-null-pointer-constant -Wmissing-include-dirs -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -MD -MT src/kmediasession/CMakeFiles/KMediaSession.dir/metadatalogging.cpp.o -MF CMakeFiles/KMediaSession.dir/metadatalogging.cpp.o.d -o CMakeFiles/KMediaSession.dir/metadatalogging.cpp.o -c /home/debian/build/build_kasts/kasts-23.08.0/obj-aarch64-linux-gnu/src/kmediasession/metadatalogging.cpp
/home/debian/build/build_kasts/kasts-23.08.0/src/kmediasession/kmediasession.cpp: In member function 'void KMediaSession::setCurrentBackend(MediaBackends)':
/home/debian/build/build_kasts/kasts-23.08.0/src/kmediasession/kmediasession.cpp:299:12: warning: enumeration value 'Vlc' not handled in switch [-Wswitch]
  299 |     switch (backend) {
      |            ^
/home/debian/build/build_kasts/kasts-23.08.0/src/kmediasession/kmediasession.cpp:299:12: warning: enumeration value 'Gst' not handled in switch [-Wswitch]
[ 24%] Building CXX object src/kmediasession/CMakeFiles/KMediaSession.dir/mpris2/mediaplayer2.cpp.o

No idea why the libvlc module is found, while libvlc package is not. And I guess that libvlc package not being found causes [1] to fail and consequently HAVE_LIBVLC not to be set in [2], that restricts the MediaBackends list only to QtMultimedia...

I've also tried installing `vlc` itself into the building container, that of course brought a lot of dependencies, but `libvlc` package still not found...

[1] https://invent.kde.org/multimedia/kasts/-/blob/master/src/kmediasession/CMakeLists.txt#L15
[2] https://invent.kde.org/multimedia/kasts/-/blob/master/src/kmediasession/CMakeLists.txt#L105
Comment 4 Marco Mattiolo 2023-08-25 11:50:44 UTC
Created attachment 161172 [details]
packaging log of kasts 23.08.0 (before installing the vlc package, just libvlc-dev installed)
Comment 5 bart 2023-08-25 12:15:04 UTC
Mmm, something's going wrong with the VLC package detection in FindLIBVLC.cmake file.  It does find the package using the pkg_check_modules command (which is the command that prints the line saying that libvlc has been found), but then doesn't find the correct paths in the rest of the cmake file for some reason...

This is what it's supposed to show:

-- Checking for module 'libvlc'
--   Found libvlc, version 3.0.18
-- Found LibVLC include-dir path: /usr/include
-- Found LibVLC library path:/usr/lib/libvlc.so
-- Found LibVLCcore library path:/usr/lib/libvlccore.so
-- Found LibVLC version: 3.0.18 (searched for: 0.0)
-- Checking for module 'gstreamer-1.0'
--   Found gstreamer-1.0, version 1.22.5

Notice the extra lines where it mentions the paths...

The strange thing is that this cmake file is used in several other KDE projects since more than 10 years.  I was assuming that it would just work on all the major distributions.
Unfortunately I don't have any debian bases system on which to test this right now.
Comment 6 bart 2023-08-25 12:20:41 UTC
Just to sure, do you also have libvlccore-dev installed?
Comment 7 Marco Mattiolo 2023-08-25 12:26:04 UTC
That's actually a great hint, as

/usr/lib/libvlc.so is in libvlc-dev [1]
/usr/lib/libvlccore.so is in libvlccore-dev [2]

and the latter is not included in the Build-Deps, as the former depends on libvlccore9, not on libvlccore-dev.

And...

-- Found KF5: success (found suitable version "5.107.0", minimum required is "5.102.0") found components: CoreAddons I18n 
-- Checking for module 'libvlc'
--   Found libvlc, version 3.0.18
-- Found LibVLC include-dir path: /usr/include
-- Found LibVLC library path:/usr/lib/aarch64-linux-gnu/libvlc.so
-- Found LibVLCcore library path:/usr/lib/aarch64-linux-gnu/libvlccore.so
-- Found LibVLC version: 3.0.18 (searched for: 0.0)
-- Checking for module 'gstreamer-1.0'
--   Package 'gstreamer-1.0', required by 'virtual:world', not found
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY


[1] https://packages.debian.org/search?searchon=contents&keywords=%2Fusr%2Flib%2Flibvlc.so&mode=path&suite=unstable&arch=any
[2] https://packages.debian.org/search?mode=path&suite=sid&section=all&arch=any&searchon=contents&keywords=%2Fusr%2Flib%2Flibvlccore.so
Comment 8 bart 2023-08-25 13:25:33 UTC
Ok, great.  I'll add that build dependency to the README.md file then.

About your original issue: I'm afraid that this is a qt5-multimedia bug that I can't do anything about myself.  Since the transition to qt6 is very close, I'm not going to chase this upstream for now.  If the same bug is still there in qt6, I might do so in due time.
Comment 9 bart 2023-08-25 14:06:43 UTC
Git commit e483d6171c5b57c40dc8266f3245ab9368e85edd by Bart De Vries.
Committed on 25/08/2023 at 16:06.
Pushed by bdevries into branch 'master'.

Add missing debian build dependency to README.md

M  +1    -1    README.md

https://invent.kde.org/multimedia/kasts/-/commit/e483d6171c5b57c40dc8266f3245ab9368e85edd
Comment 10 Marco Mattiolo 2023-08-26 09:00:11 UTC
(In reply to bart from comment #8)
> About your original issue: I'm afraid that this is a qt5-multimedia bug that
> I can't do anything about myself.  Since the transition to qt6 is very
> close, I'm not going to chase this upstream for now.  If the same bug is
> still there in qt6, I might do so in due time.

Yeah, that's agreed and understood, that's why I'm trying to build kasts with libvlc support. Sadly, I'm getting a segmentation fault (both on the Pinephone and in x86_64 virtual machine on my PC): could you please take a look at the backtrace hereunder?
I guess the problem lies in libvlc.so.5 but before going down the rabbit hole, I will wait for your check that there's nothing wrong in how Kasts is handling this...


mobian@mobian:~/Downloads$ gdb /usr/bin/kasts 
GNU gdb (Debian 13.2-1) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/d--Type <RET> for more, q to quit, c to continue without paging--
ocumentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/kasts...
Reading symbols from /usr/lib/debug/.build-id/d5/8fb2d0992506026b1c6ca7a52cf18c75d85106.debug...
(gdb) run
Starting program: /usr/bin/kasts 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff16b36c0 (LWP 20852)]
[New Thread 0x7fffe8eb26c0 (LWP 20853)]
[New Thread 0x7ffff0eb26c0 (LWP 20854)]
Activating WAL mode on database: ok
Database version 0
Migrating database to version 1
Migrating database to version 2
Migrating database to version 3
Migrating database to version 4
Migrating database to version 5
Migrating database to version 6
Migrating database to version 7
Migrating database to version 8; this can take a while
[New Thread 0x7fffeba056c0 (LWP 20855)]
[New Thread 0x7fffeb2046c0 (LWP 20856)]

Thread 1 "kasts" received signal SIGSEGV, Segmentation fault.
0x00007ffff6cf50e8 in libvlc_set_user_agent ()
   from /lib/x86_64-linux-gnu/libvlc.so.5
(gdb) bt
#0  0x00007ffff6cf50e8 in libvlc_set_user_agent
    () from /lib/x86_64-linux-gnu/libvlc.so.5
#1  0x00007ffff7d8e2aa in VlcMediaBackend::VlcMediaBackend (this=this@entry=0x555555741470, 
    parent=parent@entry=0x55555573cd10)
    at ./src/kmediasession/mediabackends/vlcmediabackend.cpp:100
#2  0x00007ffff7d7726a in KMediaSession::setCurrentBackend (this=0x55555573cd10, 
    backend=KMediaSession::Vlc)
    at ./src/kmediasession/kmediasession.cpp:305
#3  0x00007ffff7d77eb8 in KMediaSession::KMediaSession (this=this@entry=0x55555573cd10, 
    playerName=..., desktopEntryName=..., 
    parent=parent@entry=0x0)
    at ./src/kmediasession/kmediasession.cpp:66
#4  0x00005555555c1d16 in AudioManagerPrivate::AudioManagerPrivate (this=0x55555573cd10)
    at ./src/audiomanager.cpp:25
#5  std::make_unique<AudioManagerPrivate> ()
    at /usr/include/c++/12/bits/unique_ptr.h:1065
#6  AudioManager::AudioManager (
    this=this@entry=0x55555567f3e0 <AudioManager::instance()::_instance>, 
    parent=parent@entry=0x0)
    at ./src/audiomanager.cpp:56
#7  0x0000555555580156 in AudioManager::instance
    () at ./src/audiomanager.h:56
--Type <RET> for more, q to quit, c to continue without paging--
#8  main (argc=<optimized out>, 
    argv=<optimized out>) at ./src/main.cpp:162
(gdb)
Comment 11 bart 2023-08-28 09:45:02 UTC
> Thread 1 "kasts" received signal SIGSEGV, Segmentation fault.
> 0x00007ffff6cf50e8 in libvlc_set_user_agent ()
>    from /lib/x86_64-linux-gnu/libvlc.so.5
> (gdb) bt
> #0  0x00007ffff6cf50e8 in libvlc_set_user_agent
>     () from /lib/x86_64-linux-gnu/libvlc.so.5
> #1  0x00007ffff7d8e2aa in VlcMediaBackend::VlcMediaBackend
> (this=this@entry=0x555555741470, 
>     parent=parent@entry=0x55555573cd10)
>     at ./src/kmediasession/mediabackends/vlcmediabackend.cpp:100
> #2  0x00007ffff7d7726a in KMediaSession::setCurrentBackend
> (this=0x55555573cd10, 
>     backend=KMediaSession::Vlc)
>     at ./src/kmediasession/kmediasession.cpp:305
> #3  0x00007ffff7d77eb8 in KMediaSession::KMediaSession
> (this=this@entry=0x55555573cd10, 
>     playerName=..., desktopEntryName=..., 
>     parent=parent@entry=0x0)
>     at ./src/kmediasession/kmediasession.cpp:66

Mmm, this means that the call to libvlc_new didn't succeed (which is the line of code above the one that causes the segmentation fault).  That means that Kasts wasn't able to start a VLC instance.  It's the very first call to the lib that already fails.
Two things:
- I would need to figure out how you can get debug output from vlc to trace the actual issue.
- Kasts need error handling for this failure, which it should already have had.
Comment 12 bart 2023-08-28 09:57:25 UTC
> - I would need to figure out how you can get debug output from vlc to trace
> the actual issue.

It seems that this can be done by starting Kasts with:
VLC_VERBOSE=3 kasts

Could you try this and see if this provides more information?
Comment 13 Marco Mattiolo 2023-09-01 17:37:06 UTC
Now it's working in the x86_64 qemu image

mobian@mobian:~$ gdb --args env VLC_VERBOSE=3 /usr/bin/kasts 
GNU gdb (Debian 13.2-1) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from env...
(No debugging symbols found in env)
(gdb) r
Starting program: /usr/bin/env VLC_VERBOSE=3 /usr/bin/kasts
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
process 1741 is executing new program: /usr/bin/kasts
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeffff6c0 (LWP 1744)]
[New Thread 0x7fffef7fe6c0 (LWP 1745)]
libEGL warning: egl: failed to create dri2 screen
[New Thread 0x7fffeebff6c0 (LWP 1746)]
[New Thread 0x7fffee3fe6c0 (LWP 1747)]
[New Thread 0x7fffedbfd6c0 (LWP 1748)]
[New Thread 0x7fffeca536c0 (LWP 1749)]
[New Thread 0x7fffd8dff6c0 (LWP 1750)]
[New Thread 0x7fffc3fff6c0 (LWP 1751)]
[New Thread 0x7fffbbfff6c0 (LWP 1752)]
[New Thread 0x7fffc37fe6c0 (LWP 1753)]
[New Thread 0x7fffc2ffd6c0 (LWP 1754)]
[New Thread 0x7fffc27fc6c0 (LWP 1755)]
[New Thread 0x7fffc1ffb6c0 (LWP 1756)]
Activating WAL mode on database: ok
Database version 0
Migrating database to version 1
Migrating database to version 2
Migrating database to version 3
Migrating database to version 4
Migrating database to version 5
Migrating database to version 6
Migrating database to version 7
Migrating database to version 8; this can take a while
[New Thread 0x7fffc17fa6c0 (LWP 1758)]
[0000555555789c60] main libvlc debug: VLC media player - 3.0.18 Vetinari
[0000555555789c60] main libvlc debug: Copyright © 1996-2022 the VideoLAN team
[0000555555789c60] main libvlc debug: revision 3.0.13-8-g41878ff4f2
[0000555555789c60] main libvlc debug: configured with ./configure  '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-option-checking' '--disable-silent-rules' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-debug' '--config-cache' '--disable-update-check' '--enable-fast-install' '--docdir=/usr/share/doc/vlc' '--with-binary-version=3.0.18-4' '--enable-a52' '--enable-aa' '--enable-aribsub' '--enable-avahi' '--enable-bluray' '--enable-caca' '--enable-chromaprint' '--enable-chromecast' '--enable-dav1d' '--enable-dbus' '--enable-dca' '--enable-dvbpsi' '--enable-dvdnav' '--enable-faad' '--enable-flac' '--enable-fluidsynth' '--enable-freetype' '--enable-fribidi' '--enable-gles2' '--enable-gnutls' '--enable-harfbuzz' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libmpeg2' '--enable-libxml2' '--enable-lirc' '--enable-mad' '--enable-matroska' '--enable-mod' '--enable-mpc' '--enable-mpg123' '--enable-mtp' '--enable-ncurses' '--enable-notify' '--enable-ogg' '--enable-opus' '--enable-pulse' '--enable-qt' '--enable-realrtsp' '--enable-samplerate' '--enable-sftp' '--enable-shine' '--enable-shout' '--enable-skins2' '--enable-soxr' '--enable-spatialaudio' '--enable-speex' '--enable-srt' '--enable-svg' '--enable-svgdec' '--enable-taglib' '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-vdpau' '--enable-vnc' '--enable-vorbis' '--enable-x264' '--enable-x265' '--enable-zvbi' '--with-kde-solid=/usr/share/solid/actions/' '--disable-aom' '--disable-crystalhd' '--disable-d3d11va' '--disable-decklink' '--disable-directx' '--disable-dsm' '--disable-dxva2' '--disable-fdkaac' '--disable-fluidlite' '--disable-freerdp' '--disable-goom' '--disable-gst-decode' '--disable-libplacebo' '--disable-libtar' '--disable-live555' '--disable-macosx' '--disable-macosx-avfoundation' '--disable-macosx-qtkit' '--disable-mfx' '--disable-microdns' '--disable-opencv' '--disable-projectm' '--disable-schroedinger' '--disable-sdl-image' '--disable-sndio' '--disable-sparkle' '--disable-telx' '--disable-vpx' '--disable-vsxu' '--disable-wasapi' '--enable-alsa' '--enable-dc1394' '--enable-dv1394' '--enable-linsys' '--enable-nfs' '--enable-udev' '--enable-v4l2' '--enable-wayland' '--enable-vcd' '--enable-smbclient' '--disable-oss' '--enable-mmx' '--enable-sse' '--disable-neon' '--disable-altivec' '--disable-omxil' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -ffile-prefix-map=/build/reproducible-path/vlc-3.0.18=. -fstack-protector-strong -Wformat -Werror=format-security ' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -ffile-prefix-map=/build/reproducible-path/vlc-3.0.18=. -fstack-protector-strong -Wformat -Werror=format-security ' 'OBJCFLAGS=-g -O2 -ffile-prefix-map=/build/reproducible-path/vlc-3.0.18=. -fstack-protector-strong -Wformat -Werror=format-security'
[0000555555789c60] main libvlc debug: searching plug-in modules
[0000555555789c60] main libvlc debug: loading plugins cache file /usr/lib/x86_64-linux-gnu/vlc/plugins/plugins.dat
[0000555555789c60] main libvlc debug: recursively browsing `/usr/lib/x86_64-linux-gnu/vlc/plugins'
[0000555555789c60] main libvlc debug: plug-ins loaded: 501 modules
[00005555556cfda0] main logger debug: looking for logger module matching "any": 4 candidates
[00005555556cfda0] main logger debug: using logger module "console"
[0000555555789c60] main libvlc debug: translation test: code is "C"
[00005555556b6640] main keystore debug: looking for keystore module matching "memory": 4 candidates
[00005555556b6640] main keystore debug: using keystore module "memory"
[0000555555789c60] main libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 FPU 
[00005555559d71b0] main generic debug: creating audio output
[00005555559c70f0] main audio output debug: looking for audio output module matching "any": 5 candidates
[00005555559c70f0] vlcpulse audio output debug: using library version 16.1.0
[00005555559c70f0] vlcpulse audio output debug:  (compiled with version 16.1.0, protocol 35)
[New Thread 0x7fffc0ff96c0 (LWP 1759)]
[00005555559c70f0] vlcpulse audio output debug: connected locally to /run/user/1000/pulse/native as client #51
[00005555559c70f0] vlcpulse audio output debug: using protocol 35, server protocol 35
[00005555559c70f0] pulse audio output debug: adding sink 35: auto_null (Dummy Output)
[00005555559c70f0] main audio output debug: using audio output module "pulse"
[00005555559d71b0] main generic debug: keeping audio output
qrc:/main.qml:418:5: QML ErrorListOverlay: Binding loop detected for property "implicitHeight"
qrc:/main.qml:418:5: QML ErrorListOverlay: Binding loop detected for property "implicitHeight"
kf.quickcharts.datasource: ModelSource: Invalid role  -1 "color"
kf.quickcharts.datasource: ModelSource: Invalid role  -1 "color"
kf.quickcharts.datasource: ModelSource: Invalid role  -1 "color"
kf.quickcharts.datasource: ModelSource: Invalid role  -1 "color"
kf.quickcharts.datasource: ModelSource: Invalid role  -1 "color"
kf.quickcharts.datasource: ModelSource: Invalid role  -1 "color"
qrc:/GenericEntryListView.qml:419:9: QML MenuItem: Binding loop detected for property "__reserveSpaceForIcon"
qrc:/GenericEntryListView.qml:419:9: QML MenuItem: Binding loop detected for property "__reserveSpaceForIcon"
kf.quickcharts.datasource: ModelSource: Invalid role  -1 "color"
kf.quickcharts.datasource: ModelSource: Invalid role  -1 "color"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/ScrollablePage.qml:200:9: QML MouseArea: Binding loop detected for property "width"
[New Thread 0x7fff96bff6c0 (LWP 1760)]
[Thread 0x7fff96bff6c0 (LWP 1760) exited]
[Thread 0x7fffc1ffb6c0 (LWP 1756) exited]
[Thread 0x7fffc17fa6c0 (LWP 1758) exited]
[Thread 0x7fffc37fe6c0 (LWP 1753) exited]
[Thread 0x7fffbbfff6c0 (LWP 1752) exited]
[Thread 0x7fffc3fff6c0 (LWP 1751) exited]
[Thread 0x7fffd8dff6c0 (LWP 1750) exited]
[Thread 0x7fffeebff6c0 (LWP 1746) exited]
[Thread 0x7fffee3fe6c0 (LWP 1747) exited]
[Thread 0x7fffedbfd6c0 (LWP 1748) exited]
[Thread 0x7fffeca536c0 (LWP 1749) exited]
[Thread 0x7fffc2ffd6c0 (LWP 1754) exited]
[Thread 0x7fffeffff6c0 (LWP 1744) exited]
[Thread 0x7fffef7fe6c0 (LWP 1745) exited]
[Thread 0x7fffc27fc6c0 (LWP 1755) exited]
[Thread 0x7ffff1b828c0 (LWP 1741) exited]
[Thread 0x7fffc0ff96c0 (LWP 1759) exited]
[New process 1741]
[Inferior 1 (process 1741) exited normally]
(gdb) quit

But still segfaulting on the Pinephone... let me analyze this deeper on the phone side
Comment 14 Marco Mattiolo 2023-09-01 17:46:51 UTC
On the Pinephone

marco@mobian:~/Scaricati$ gdb --args env VLC_VERBOSE=3 /usr/bin/kasts 
GNU gdb (Debian 13.1-3) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from env...
(No debugging symbols found in env)
(gdb) run
Starting program: /usr/bin/env VLC_VERBOSE=3 /usr/bin/kasts
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
process 2559 is executing new program: /usr/bin/kasts
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ff0adf020 (LWP 2567)]
[New Thread 0x7ff02cf020 (LWP 2568)]
[New Thread 0x7fefabf020 (LWP 2569)]
Activating WAL mode on database: ok
Database version 0
Migrating database to version 1
Migrating database to version 2
Migrating database to version 3
Migrating database to version 4
Migrating database to version 5
Migrating database to version 6
Migrating database to version 7
Migrating database to version 8; this can take a while
[New Thread 0x7fee5ff020 (LWP 2570)]
[New Thread 0x7feddef020 (LWP 2572)]

Thread 1 "kasts" received signal SIGSEGV, Segmentation fault.
0x0000007ff57e9158 in libvlc_set_user_agent ()
   from /lib/aarch64-linux-gnu/libvlc.so.5
(gdb) bt
#0  0x0000007ff57e9158 in libvlc_set_user_agent ()
   from /lib/aarch64-linux-gnu/libvlc.so.5
#1  0x0000007ff7ccda38 in VlcMediaBackend::VlcMediaBackend (
    this=this@entry=0x55557485a0, parent=parent@entry=0x5555744ab0)
    at ./src/kmediasession/mediabackends/vlcmediabackend.cpp:100
#2  0x0000007ff7cb51c4 in KMediaSession::setCurrentBackend (this=0x5555744ab0, 
    backend=KMediaSession::Vlc) at ./src/kmediasession/kmediasession.cpp:305
#3  0x0000007ff7cb574c in KMediaSession::KMediaSession (
    this=this@entry=0x5555744ab0, playerName=..., desktopEntryName=..., 
    parent=parent@entry=0x0) at ./src/kmediasession/kmediasession.cpp:66
#4  0x00000055555ba728 in AudioManagerPrivate::AudioManagerPrivate (
    this=0x5555744ab0) at ./src/audiomanager.cpp:25
#5  std::make_unique<AudioManagerPrivate> ()
    at /usr/include/c++/12/bits/unique_ptr.h:1065
#6  AudioManager::AudioManager (
    this=this@entry=0x55556803c8 <AudioManager::instance()::_instance>, 
    parent=parent@entry=0x0) at ./src/audiomanager.cpp:56
#7  0x000000555558bbd4 in AudioManager::instance () at ./src/audiomanager.h:56
#8  0x0000005555570384 in main (argc=<optimized out>, argv=<optimized out>)
    at ./src/main.cpp:162
(gdb) quit
A debugging session is active.

        Inferior 1 [process 2559] will be killed.

Quit anyway? (y or n) y

I do not see that much additional information coming from VLC, though...
Comment 15 Marco Mattiolo 2023-09-01 17:59:49 UTC
Ok, I compared the list of installed packages between the virtual machine and the phone and found these differences

ii  phonon4qt5-backend-vlc:amd64                             0.11.3-1                          amd64        Phonon4Qt5 VLC backend
ii  vlc-data                                                 3.0.18-4                          all          common data for VLC
ii  vlc-plugin-base:amd64                                    3.0.18-4                          amd64        multimedia player and streamer (base plugins)
ii  vlc-plugin-video-output:amd64                            3.0.18-4                          amd64        multimedia player and streamer (video output plugins)

Installing both phonon4qt5-backend-vlc and vlc (with all its dependencies), now kasts works also on the Pinephone. Now I will try to find out which is the needed package...
Comment 16 Marco Mattiolo 2023-09-01 18:14:01 UTC
The debian package phonon4qt5-backend-vlc (or one of its dependencies) is needed, otherwise kasts segfaults.

But, even with that package installed, there is still something wrong: "Settings" menu is not reachable and the kasts widget on Phosh's lockscreen or drop-down menu does not appear...
For the "Settings" menu, the last two lines of the following log are relevant, as they appear after I tap on the "Settings" button.

marco@mobian:~$ env QT_QUICK_CONTROLS_MOBILE=1 QT_STYLE_OVERRIDE=Breeze kasts
Database version 8
kf.kirigami: Failed to find a Kirigami platform plugin
qrc:/main.qml:418:5: QML ErrorListOverlay: Binding loop detected for property "implicitHeight"
qrc:/main.qml:418:5: QML ErrorListOverlay: Binding loop detected for property "implicitHeight"
file:///usr/lib/aarch64-linux-gnu/qt5/qml/org/kde/kirigami.2/ScrollablePage.qml:200:9: QML MouseArea: Binding loop detected for property "width"
file:///usr/lib/aarch64-linux-gnu/qt5/qml/org/kde/kirigami.2/Dialog.qml:329:9: QML ScrollView: Binding loop detected for property "calculatedImplicitHeight"
file:///usr/lib/aarch64-linux-gnu/qt5/qml/org/kde/kirigami.2/Dialog.qml:329:9: QML ScrollView: Binding loop detected for property "calculatedImplicitHeight"
qrc:/main.qml:429:5: QML ConnectionCheckAction: Binding loop detected for property "implicitHeight"
file:///usr/lib/aarch64-linux-gnu/qt5/qml/org/kde/kirigami.2/Dialog.qml:329:9: QML ScrollView: Binding loop detected for property "calculatedImplicitHeight"
file:///usr/lib/aarch64-linux-gnu/qt5/qml/org/kde/kirigami.2/Dialog.qml:329:9: QML ScrollView: Binding loop detected for property "calculatedImplicitHeight"
qrc:/main.qml:424:5: QML ConnectionCheckAction: Binding loop detected for property "implicitHeight"
QQmlComponent: Component is not ready
file:///usr/lib/aarch64-linux-gnu/qt5/qml/org/kde/kirigami.2/PageRow.qml:755:5: QML StackView: push: qrc:/SettingsPage.qml:17 Cannot assign to non-existent property "actionName"
marco@mobian:~$ 

Any chance to check the used plugin without using the graphical settings interface?
Any chance the missing widgets on lockscreen and drop-down menu are related to VLC plugin?
Comment 17 bart 2023-09-01 21:49:32 UTC
Ok, strange that you need phonon-vlc, since Kasts doesn't depend on it.  I guess that it will actually be one of the dependencies of phonon-vlc.  Debian has the habit of splitting all packages and libs into as many self-containing entities as possible, so it becomes very hard to figure out which sub-packages you actually need to install.

About the settings menu not appearing: I suspect that you don't have kirigami-addons installed (which is used by the settings menu).

I'm not too sure about the lockscreen widget though.  Kasts registers itself as MPRIS2-capable player on dbus; that should be sufficient for DEs to pick it up.  I have no clue what has changed there that it appeared before on the Phosh lockscreen but now not anymore.
Comment 18 Marco Mattiolo 2023-09-02 17:46:55 UTC
After starting reproduction of podcast episode, widget appeared. Sorry for the noise.

About the Settings menu, I have the following installed
marco@mobian:~$ dpkg -l | grep kirigami
ii  kirigami-addons-data                                     0.7.0-2                             all          data files for kirigami-addons
ii  libkf5kirigami2-5                                        5.103.0-1                           arm64        set of QtQuick components targeted for mobile use
ii  qml-module-org-kde-kirigami-addons-labs-components:arm64 0.7.0-2                             arm64        labs/components module for QML
ii  qml-module-org-kde-kirigami-addons-labs-mobileform:arm64 0.7.0-2                             arm64        labs/mobileform module for QML
ii  qml-module-org-kde-kirigami2                             5.103.0-1                           arm64        set of QtQuick components targeted for mobile use

while available are
marco@mobian:~$ apt-cache search kirigami
kaidan - client Jabber/XMPP semplice e facile da usare
kalendar - applicazione per calendario
kirigami-addons-data - file di dati per kirigami-addons
kirigami-addons-dev - file di sviluppo per kirigami-addons
kirigami-gallery - insieme di componenti QtQuick orientati all'uso mobile
kirigami2-dev - insieme di componenti QtQuick orientati all'uso mobile
libkf5kirigami2-5 - insieme di componenti QtQuick orientati all'uso mobile
libkf5kirigami2-doc - insieme di componenti QtQuick orientati all'uso mobile (documentazione)
libqqc2breezestyle-dev - file di sviluppo per lo stile QQC2 ispirato a Breeze
plasma-settings - applicazione per impostazioni per Plasma Mobile
qml-module-org-kde-kirigami-addons-datetime - modulo datetime per QML
qml-module-org-kde-kirigami-addons-labs-components - modulo labs/components per QML
qml-module-org-kde-kirigami-addons-labs-mobileform - modulo labs/mobileform per QML
qml-module-org-kde-kirigami-addons-sounds - modulo sounds per QML
qml-module-org-kde-kirigami-addons-treeview - modulo treeview per QML
qml-module-org-kde-kirigami2 - insieme di componenti QtQuick orientati all'uso mobile
qml-module-org-kde-qqc2breezestyle - stile QQC2 ispirato da Breeze
qmlkonsole - applicazione per terminale per Plasma Mobile
spacebar - applicazione per SMS/MMS per Plasma Mobile
kasts - Kirigami-based podcast player

Does kasts need a specific module, e.g. qml-module-org-kde-kirigami-addons-treeview or qml-module-org-kde-kirigami-addons-sounds?
Comment 19 Marco Mattiolo 2023-09-03 12:38:28 UTC
Just guessing, based on the error message
file:///usr/lib/aarch64-linux-gnu/qt5/qml/org/kde/kirigami.2/PageRow.qml:755:5: QML StackView: push: qrc:/SettingsPage.qml:17 Cannot assign to non-existent property "actionName"
and looking into [1] looks like "actionName" property is not intended for KF5 and I see the relevant commit [2] has been pushed after 23.04.0 tagging, i.e. it is being compiled in 23.08.0 for the first time... could it be it?

[1] https://api.kde.org/frameworks/kirigami/html/classorg_1_1kde_1_1kirigami_1_1SettingAction.html#a3870edf1914d732daf54f6be1843109e
[2] https://invent.kde.org/multimedia/kasts/-/commit/6865c8c57e49ad6f040524603732c6359437ef4b
Comment 20 bart 2023-09-03 13:17:38 UTC
Ah, oops, I should have looked closer at your original error message.  I think that this is indeed due to a fairly recent change in KF5 Kirigami.  You are probably using an older version of Kirigami (seeing that you mentioned Debian stable)?

If this is indeed the case, then at the very least I should probably bump the minimum required version of KF5 for Kasts.
Comment 21 Marco Mattiolo 2023-09-03 15:47:01 UTC
I guess you mean [1], that AFAICT was tagged in Kirigami_5.105.0 .
As you anticipated, Debian stable has Kirigami 5.103.0, while Debian testing has 5.107.0.
I tried installing the last Kasts_23.08.0 image I've built on Debian testing, on an SD card instead of the PP's eMMC. But it refuses to start:

mobian@mobian:~$ kasts
Database version 8
QQmlApplicationEngine failed to load component
qrc:/main.qml:12:1: module "Qt.labs.settings" is not installed

That Qt.labs.settings seems required by [2] but I find it described as deprecated e.g. in [3].
I understand that here we're getting far beyond the original problem and that last issues we're encountering are out-of-Kasts, mainly Kirigami and Qt6/KF6... if that's fine for you and not extremely time-consuming, I'd like to get kasts running correctly at least on Debian testing, that I can copy the hints we come up with to [4]  so that who's working on Kasts packaging in Debian can include those in the initial packaging.

[1] https://invent.kde.org/frameworks/kirigami/-/merge_requests/995
[2] https://invent.kde.org/multimedia/kasts/-/blob/master/src/qml/main.qml?ref_type=heads#L12
[3] https://invent.kde.org/plasma/plasma-sdk/-/merge_requests/77
[4] https://bugs.debian.org/1007698
Comment 22 bart 2023-09-05 08:59:40 UTC
Hi, no problem trying to help you figure out how to get all the dependencies.  I might be slow to react though...

It doesn't help that Debian splits up common libraries into dozens of new packages, one for each subcomponent.  Makes it nearly impossible to figure out the runtime dependencies without digging into the Debian packaging (or running a Debian system and doing it through trial-by-error).  Especially the qml runtime is a huge mess.

Anyway, I think the "Core" thing only applies to Qt6, so that should not be relevant here.
Looking through the Debian package list, I would assume that you need to install qml-module-qt-labs-settings ?
Comment 23 Marco Mattiolo 2023-09-05 20:18:54 UTC
Created attachment 161422 [details]
Audio backend selection interface under Settings in kasts_23.08.0 for Debian testing

Yep, qml-module-qt-labs-settings did the trick!

Ok so the situation seems to be:
- as far as I remain on Debian stable, I will not have access to Kasts' Settings due to the old Kirigami (not a big issue).
  I could try to build kasts again applying a patch to revert 6865c8c5.
  Looking at the this bug's symptoms, I'd say Kasts is now using VLC backend instead of QtMultimedia, even if I do not have the UI feedback.
  Debian package vlc-plugin-base is needed to avoid Kasts segfaulting (it was previously installed as dependency of phonon4qt5-backend-vlc).

- on Debian testing, just vlc-plugin-base and qml-module-qt-labs-settings are needed to get Kasts working correctly: these should be added to list of dependencies by Debian packager

- for the Debian packager, libvlccore-dev is needed as a Build-Dep to get support for VLC backend, as you've added to README.md

Now closing, thank you a lot for the support!
Comment 24 bart 2023-09-06 08:02:04 UTC
Git commit c1a45ed49b9f151d6b35699a177cc2cc5e797347 by Bart De Vries, on behalf of Marco Mattiolo.
Committed on 06/09/2023 at 10:02.
Pushed by bdevries into branch 'master'.

Bump KF minimum version to 5.105.0

M  +1    -1    CMakeLists.txt

https://invent.kde.org/multimedia/kasts/-/commit/c1a45ed49b9f151d6b35699a177cc2cc5e797347
Comment 25 bart 2023-09-06 08:57:27 UTC
Git commit b9fc8915a7e15caa0316e92dfbb55433ed7d78c5 by Bart De Vries, on behalf of Marco Mattiolo.
Committed on 06/09/2023 at 10:57.
Pushed by bdevries into branch 'release/23.08'.

Bump KF minimum version to 5.105.0

M  +1    -1    CMakeLists.txt

https://invent.kde.org/multimedia/kasts/-/commit/b9fc8915a7e15caa0316e92dfbb55433ed7d78c5
Comment 26 bart 2024-01-30 13:24:11 UTC
*** Bug 480518 has been marked as a duplicate of this bug. ***