Bug 402970

Summary: D-Bus /org/mpris/MediaPlayer2 interface fails on specific paths hanging media control apps
Product: [Applications] gwenview Reporter: Alexander Meshcheryakov <alexander.s.m>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: me, nate
Priority: NOR    
Version: 22.08.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 23.04
Sentry Crash Report:

Description Alexander Meshcheryakov 2019-01-07 12:42:58 UTC
SUMMARY
Gwenview MPRIS interface fails when Gwenview opens files from specific locations.

STEPS TO REPRODUCE
mkdir /tmp/азо
cd /tmp/азо
wget https://upload.wikimedia.org/wikipedia/commons/8/8d/KDE_logo.svg # It seems any image would work on this step
gwenview *

OBSERVED RESULT
Gwenview prints on launch in console output
```
QDBusConnection: error: could not send signal to service "" path "/org/mpris/MediaPlayer2" interface "org.freedesktop.DBus.Properties" member "PropertiesChanged": Marshalling failed: Invalid object path passed in arguments
QDBusConnection: error: could not send reply message to service "": Marshalling failed: Invalid object path passed in arguments
Invalid url QUrl("")
```

And various stuff is broken:
1. Normally on gwenview window thumbnail there are media control buttons that control slideshow, but not in this case
2. https://github.com/acrisci/playerctl (CLI tool to control media players, probably present in your repository) hangs when issuing commands because does not get response from Gwenview mpris interface.

EXPECTED RESULT
Media interface should work reliably regardless of file path.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.14.4
Qt Version: 5.12.0
KDE Frameworks Version: 5.53.0
Kernel Version: 4.19.8-arch1-1-ARCH
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-4690 CPU @ 3.50GHz
Memory: 31,3 GiB of RAM


ADDITIONAL INFORMATION
Could not reproduce on Ubuntu 18.04, but on ubuntu 18.10 Live CD this is reproducible.
Comment 1 Mike Yuan 2022-09-24 12:44:05 UTC
Running into this too recently. Can't believe it has been 3 years and no progress...
I'm using sway(-git).
Comment 2 Nate Graham 2023-02-27 21:32:06 UTC
Git commit 723be2e9c9d623c9352358d530da9f6df8cdbaf5 by Nate Graham, on behalf of Joshua Goins.
Committed on 27/02/2023 at 20:41.
Pushed by ngraham into branch 'master'.

Remove "+" from slideId, which is an invalid DBus object path

M  +1    -1    lib/mpris2/mprismediaplayer2player.cpp

https://invent.kde.org/graphics/gwenview/commit/723be2e9c9d623c9352358d530da9f6df8cdbaf5