Bug 1472449

Summary: mpris dbus interface broken
Product: [Fedora] Fedora Reporter: Fabrice Bellet <fabrice>
Component: bansheeAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: chkr, claudiorodrigo, moez.roy, pokorra.mailinglists, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: banshee-2.6.2-22.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-02 16:49:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
make interfaces public
none
fix network manager connected state none

Description Fabrice Bellet 2017-07-18 18:43:04 UTC
The application crashes almost always when controlling it with the dbus mpris interface, with this error message:

Could not resolve type with token 01000007
System.TypeLoadException: Could not resolve type with token 01000007
  at (wrapper managed-to-native) Gtk.Application:gtk_main ()
  at Gtk.Application.Run () [0x00000] in <6ab7f48437694667a91f2ef0ec8a9924>:0 
  at Banshee.Gui.GtkBaseClient.Run () [0x0001e] in <5eb89a211382463bb0f8e52257c66441>:0 
  at Banshee.Gui.GtkBaseClient.Startup () [0x0000b] in <5eb89a211382463bb0f8e52257c66441>:0 
  at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.CleanRoomStartup+StartupInvocationHandler startup) [0x0004f] in <6c07a533b88a4aab96f4467bfa4befa3>:0

Comment 1 Fedora Update System 2017-07-18 19:36:00 UTC
banshee-2.6.2-21.fc26 dbus-sharp-0.8.1-2.fc26 mono-zeroconf-0.9.0-19.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-cc40ade2bd

Comment 2 Fedora Update System 2017-07-18 19:36:36 UTC
banshee-2.6.2-21.fc26 dbus-sharp-0.8.1-2.fc26 mono-zeroconf-0.9.0-19.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-cc40ade2bd

Comment 3 Fabrice Bellet 2017-07-18 20:53:22 UTC
with this version of dbus-sharp, I see many errors "System.Exception: Error 32: Broken pipe (in `dbus-sharp')". The application crashes very frequently, and various components don't work (gstreamer pipeline doesnt start, volume control unavailable, crash in media import).

Comment 4 Fabrice Bellet 2017-07-18 21:10:22 UTC
* with dbus-sharp-0.15-1.hg2030296.fc26: banshee is mostly functional and mpris related info doesn't show up in the gnome notification area. 

* with dbus-sharp-0.15-2.hg2030296.fc26: mpris info is available in the gnome notification area, but an action there causes a crash of the app with the error "could not resolve type with token 01000007"

* with dbus-sharp-0.8.1-2.fc26: banshee mostly unfunctional, comment #3.

Comment 5 Fabrice Bellet 2017-07-19 07:44:31 UTC
dbus-sharp-0.8.1-2.fc26 without patch2 (dbus-sharp-0.8.1-fix-array-writing.patch) works better for me : no System.Exception: Error 32: Broken pipe errors, and mpris works.

Comment 6 Tom "spot" Callaway 2017-07-19 17:25:59 UTC
I can't reproduce the 0.8.1 bugs you're seeing on my Fedora 26 x86_64 system, but I'm not using the dbus mpris interface.

0.15 has ... issues. Banshee will run for a while, but eventually we get the token 01000007 crash. I've abandoned that approach.

It would be helpful if you could give me something that reproduces the crashes you're seeing. The patch you propose removing came from:

https://github.com/mono/dbus-sharp/pull/58

That said, this whole pile of abandonware garbage is barely working, so I'll try taking the fix-array-writing patch out of dbus-sharp to see what happens. Please try updating to:

mono-zeroconf-0.9.0-20: https://koji.fedoraproject.org/koji/buildinfo?buildID=920451
dbus-sharp-0.8.1-3: https://koji.fedoraproject.org/koji/buildinfo?buildID=920448

(I still can't figure out why banshee can't connect to the GNOME Settings Daemon)

Comment 7 Fabrice Bellet 2017-07-19 20:10:37 UTC
(In reply to Tom "spot" Callaway from comment #6)
> I can't reproduce the 0.8.1 bugs you're seeing on my Fedora 26 x86_64
> system, but I'm not using the dbus mpris interface.
> 
> 0.15 has ... issues. Banshee will run for a while, but eventually we get the
> token 01000007 crash. I've abandoned that approach.
> 
> It would be helpful if you could give me something that reproduces the
> crashes you're seeing. The patch you propose removing came from:
> 
> https://github.com/mono/dbus-sharp/pull/58

ok. With mono-zeroconf-0.9.0-20.fc26, 
banshee-2.6.2-21.fc26, and dbus-sharp-0.8.1-2.fc26, using an empty ~/.config/banshee-1 directory. I launch banshee on a random mp3 local file, Playing it works, then I go to the Preferences, enable the mpris interface (it crashes), I restart banshee on the same mp3 file, it crashes immediately with this error message :

Error 32: Broken pipe
System.Exception: Error 32: Broken pipe

and also a bunch of other similar exceptions messages like this one:

[Warn  22:03:53.444] Caught an exception - System.Exception: Error 32: Broken pipe (in `dbus-sharp')
  at DBus.Unix.UnixSocket.Write (System.Byte* bufP, System.Int32 count) [0x0003b] in <bbcb0f928fe84c5dab3261e268423f13>:0 
  at DBus.Unix.UnixSocket.Write (System.Byte[] buf, System.Int32 offset, System.Int32 count) [0x0001e] in <bbcb0f928fe84c5dab3261e268423f13>:0 
  at DBus.Unix.UnixStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00001] in <bbcb0f928fe84c5dab3261e268423f13>:0 
  at System.IO.MemoryStream.WriteTo (System.IO.Stream stream) [0x0002b] in <373b6e083d6e45e498c9082a8eebd27f>:0 
  at DBus.Protocol.MessageWriter.ToStream (System.IO.Stream dest) [0x00001] in <bbcb0f928fe84c5dab3261e268423f13>:0 
  at DBus.Protocol.Header.GetHeaderDataToStream (System.IO.Stream stream) [0x00014] in <bbcb0f928fe84c5dab3261e268423f13>:0 
  at DBus.Transports.Transport.WriteMessage (DBus.Protocol.Message msg) [0x00019] in <bbcb0f928fe84c5dab3261e268423f13>:0 
  at DBus.Connection.Send (DBus.Protocol.Message msg) [0x00022] in <bbcb0f928fe84c5dab3261e268423f13>:0 
[...]

When I upgrade dbus-sharp to dbus-sharp-0.8.1-3.fc26, so without the fix-array-writing patch, playing works fine, and I can pause/play banshee from the gnome notification area, with the mpris interface.

Comment 8 Fabrice Bellet 2017-07-19 20:54:11 UTC
(In reply to Tom "spot" Callaway from comment #6)

> (I still can't figure out why banshee can't connect to the GNOME Settings
> Daemon)

I worked a bit on this problem a few month ago: I came to the solution that dbus interfaces should be public instead of private. But this is a bit dusty in my memory, and I cannot recall exactly the rationale behind this. Patches follow.

Comment 9 Fabrice Bellet 2017-07-19 20:56:52 UTC
Created attachment 1301386 [details]
make interfaces public

This patch makes banshee react to multimedia keys

Comment 10 Fabrice Bellet 2017-07-19 21:02:04 UTC
Created attachment 1301408 [details]
fix network manager connected state

With the previous patch added to this one, the dbus interface to the network manager works, and we don't have errors messages, when banshee tries to refresh a podcast when the network is offline (or just partially connected). (sorry if the topic of this patch is not completely related to the subject of the bug report)

Comment 11 Fedora Update System 2017-07-20 00:24:43 UTC
banshee-2.6.2-21.fc26, dbus-sharp-0.8.1-2.fc26, mono-zeroconf-0.9.0-19.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-cc40ade2bd

Comment 12 Fedora Update System 2017-07-23 16:20:46 UTC
banshee-2.6.2-22.fc26 dbus-sharp-0.8.1-3.fc26 mono-zeroconf-0.9.0-20.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-cc40ade2bd

Comment 13 Fedora Update System 2017-07-25 04:24:07 UTC
banshee-2.6.2-22.fc26, dbus-sharp-0.8.1-3.fc26, mono-zeroconf-0.9.0-20.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-cc40ade2bd

Comment 14 Fedora Update System 2017-08-02 16:49:02 UTC
banshee-2.6.2-22.fc26, dbus-sharp-0.8.1-3.fc26, mono-zeroconf-0.9.0-20.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.