http://gambaswiki.org/bugtracker/edit?object=BUG.1014&from=L21haW4-

Comment #7 by Antonio OREFICE:

I never experienced a crash, it is just that the answer to GetAll() is an empty 
array and i suspect some mpris clients like the kde plasmoid needs that to 
validate the player.

Anyway, there were some errors in the previous example, so i uploaded another 
here.
http://wpage.unina.it/aorefice/sharevari/mpris.tar.gz

I tried it with the last gambas revision and set DBus.Debug = True, but i'm 
experiencing the very same results.

Here is what happens:

Start the application, plasma already running:
-------------------------------------------------------------
gb.dbus: start watching connection
gb.dbus: add match: type='method_call',path='/',destination=':1.2385'
gb.dbus: add match: type='method_call',path='/org',destination=':1.2385'
gb.dbus: add match: type='method_call',path='/org/mpris',destination=':1.2385'
gb.dbus: add match: 
type='method_call',path='/org/mpris/MediaPlayer2',destination=':1.2385'
gb.dbus: warning: unhandled message: signal sender=org.freedesktop.DBus -> 
dest=:1.2385 serial=2 path=/org/freedes
ktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.2385"
gb.dbus: warning: unhandled message: signal sender=org.freedesktop.DBus -> 
dest=:1.2385 serial=3 path=/org/freedes
ktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string "org.mpris.MediaPlayer2.xt7"
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Properties Get
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Properties Get
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Properties 
GetAll
gb.dbus: GetAll("org.mpris.MediaPlayer2"): ["CanQuit": True, "CanRaise": True, 
"Identity": xt7-player, "DesktopEnt
ry": xt7-player, "HasTrackList": True, "SupportedMimeTypes": (String[] 
0x561a9f6bcce8), "SupportedUriSchemes": (St
ring[] 0x561a9f6a69e8)]
gb.dbus: error: org.freedesktop.Properties.GetAll: Not enough arguments 
DBusObject.GetAllProperties.539 DBusObject
.DBusObserver_Message.612
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Properties 
GetAll
gb.dbus: GetAll("org.mpris.MediaPlayer2.Player"): ["Rate": 0, "Volume": 10, 
"CanPlay": False, "CanSeek": False, "S
huffle": True, "CanPause": False, "Position": 0, "CanGoNext": False, 
"CanControl": False, "LoopStatus": Playlist, 
"MaximumRate": 0, "MinimumRate": 0, "CanGoPrevious": False, "PlaybackStatus": 
Playing]
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Properties Get
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Properties Get
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Properties Get
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Properties Get

################################## Then i restart plasmashell.############
In the plasmashell logs i read:
[     1.715][WW][kde.dataengine.mpris][unknown] "org.mpris.MediaPlayer2.xt7" 
does not implement org.freedesktop.DBus.Properties correctly
[     1.715][WW][kde.dataengine.mpris][unknown] Failed to find working MPRIS2 
interface for "org.mpris.MediaPlayer2.xt7"
##########################################################################


Back to the gambas logs:
------------------------------------------------------------------
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Properties 
GetAll
gb.dbus: GetAll("org.mpris.MediaPlayer2"): ["CanQuit": True, "CanRaise": True, 
"Identity": xt7-player, "DesktopEntry": xt
7-player, "HasTrackList": True, "SupportedMimeTypes": (String[] 
0x55f5ad11eb78), "SupportedUriSchemes": (String[] 0x55f5a
d11eb28)]
gb.dbus: error: org.freedesktop.Properties.GetAll: Not enough arguments 
DBusObject.GetAllProperties.539 DBusObject.DBusOb
server_Message.612
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Properties 
GetAll
gb.dbus: GetAll("org.mpris.MediaPlayer2.Player"): ["Rate": 0, "Volume": 10, 
"CanPlay": False, "CanSeek": False, "Shuffle"
: True, "CanPause": False, "Position": 0, "CanGoNext": False, "CanControl": 
False, "LoopStatus": Playlist, "MaximumRate":
 0, "MinimumRate": 0, "CanGoPrevious": False, "PlaybackStatus": Playing]



If i query now via qdbusviewer:
---------------------------------------------------------------------
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Introspectable 
Introspect
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Introspectable 
Introspect
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Introspectable 
Introspect
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Introspectable 
Introspect
gb.dbus: void signature
gb.dbus: void signature
gb.dbus: void signature
gb.dbus: void signature
gb.dbus: void signature
gb.dbus: void signature
gb.dbus: void signature
gb.dbus: void signature
gb.dbus: call: [org.mpris.MediaPlayer2.xt7] org.freedesktop.DBus.Properties 
GetAll
gb.dbus: GetAll(""): []

Still an empty array, even if in the logs now i see:
gb.dbus: GetAll("org.mpris.MediaPlayer2.Player"): ["Rate": 0, "Volume": 10, 
"CanPlay": False, "CanSeek": False, "Shuffle"
: True, "CanPause": False, "Position": 0, "CanGoNext": False, "CanControl": 
False, "LoopStatus": Playlist, "MaximumRate":
 0, "MinimumRate": 0, "CanGoPrevious": False, "PlaybackStatus": Playing]



------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to