Docky crashes - System.Exception: org.freedesktop.DBus.Error.UnknownMethod: Method "Get" with signature "ss" on interface "org.freedesktop.UPower" doesn't exist

Bug #1271131 reported by Prem Anand
182
This bug affects 36 people
Affects Status Importance Assigned to Milestone
Docky
Confirmed
Undecided
Unassigned

Bug Description

[ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: org.freedesktop.DBus.Error.UnknownMethod: Method "Get" with signature "ss" on interface "org.freedesktop.UPower" doesn't exist

  at Docky.Services.SystemService+IUPowerProxy.Get (System.String interface, System.String propname) [0x00000] in <filename unknown>:0
  at Docky.Services.SystemService.HandleUPowerChanged () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x0012f>
at System.Reflection.MethodBase.Invoke (object,object[]) <0x0002a>
at System.Delegate.DynamicInvokeImpl (object[]) <0x00203>
at System.MulticastDelegate.DynamicInvokeImpl (object[]) <0x0003b>
at System.Delegate.DynamicInvoke (object[]) <0x00018>
at DBus.Connection.HandleSignal (DBus.Protocol.Message) <0x0031f>
at DBus.Connection.DispatchSignals () <0x0005f>
at DBus.Connection.Iterate () <0x0002f>
at DBus.BusG/<Init>c__AnonStorey0.<>m__0 (intptr,DBus.GLib.IOCondition,intptr) <0x0003b>
at (wrapper native-to-managed) DBus.BusG/<Init>c__AnonStorey0.<>m__0 (intptr,DBus.GLib.IOCondition,intptr) <0x0008a>
at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00054>
at Gtk.Application.Run () <0x0000b>
at Docky.Docky.Main (string[]) <0x005cb>

Revision history for this message
Prem Anand (h.prem.anand) wrote :

Version:
[Info 11:08:56.533] Docky version: 2.2.0 Release
[Info 11:08:56.547] Kernel version: 3.13.0.4
[Info 11:08:56.548] CLR version: 4.0.30319.17020

Revision history for this message
Prem Anand (h.prem.anand) wrote :

By the way, the crash happens only when I plug in or plug out my power card

Revision history for this message
aivan (ivan-arandjelovic) wrote :

Yup, exactly the same question in my case too.

Revision history for this message
owen rumney (o-owen) wrote :

I have this same issue with essentially the same stack. The issue also only occurs when I toggle to powercord

Revision history for this message
Adi S. (adizere) wrote :

Version information. Also notice the error upon initialization.

$ docky --version
[Info 15:03:39.435] Docky version: 2.2.1 bzr docky r1845 ppa
[Info 15:03:39.462] Kernel version: 3.2.0.58
[Info 15:03:39.463] CLR version: 4.0.30319.1
[Debug 15:03:39.667] [UserArgs] BufferTime = 0
[Debug 15:03:39.667] [UserArgs] MaxSize = 2147483647
[Debug 15:03:39.667] [UserArgs] NetbookMode = False
[Debug 15:03:39.667] [UserArgs] NoPollCursor = False
[Error 15:03:39.681] [SystemService] Could not initialize power manager dbus: 'org.freedesktop.DBus.Error.UnknownMethod: Method "Get" with signature "ss" on interface "org.freedesktop.UPower" doesn't exist
'
[Info 15:03:39.682] [SystemService] at Docky.Services.SystemService+IUPowerProxy.Get (System.String interface, System.String propname) [0x00000] in <filename unknown>:0
  at Docky.Services.SystemService.HandleUPowerChanged () [0x00000] in <filename unknown>:0
  at Docky.Services.SystemService.InitializeBattery () [0x00000] in <filename unknown>:0
[Info 15:03:39.707] [ThemeService] Setting theme: Matte

Revision history for this message
Weston Bustraan (wbustraan) wrote :
Revision history for this message
Minium (minium) wrote :

Indeed, Docky crashes each time my laptop goes into suspend and whenever I plug-in/plug-out the power cord.

Revision history for this message
Minium (minium) wrote :

For everybody that is still annoyed with this problem, you can give my use my personal repository a shot.
I've adopted in it the fix pointed out in comment #6.

Minium (minium)
Changed in docky:
status: New → Confirmed
Revision history for this message
WHK (yan-uniko-102) wrote :

will be celebrating the birthday of this bug?

Revision history for this message
ニコラス (nrlemo) wrote :

Hello
I was able to fix this by doing what Weston Bustraan (wbustraan) says on Bug #1309706:
You must download the source code, modify the SystemService.cs file..
hope that helps!

QUOTE

Weston Bustraan (wbustraan) wrote on 2014-04-30: #2

I was able to fix it without commenting out the code.

In Docky.Services/Docky.Services/SystemService.cs, I changed:

[Interface(UPowerName)]
interface IUPower : org.freedesktop.DBus.Properties

to

[Interface("org.freedesktop.DBus.Properties")]
interface IUPower : org.freedesktop.DBus.Properties

I'm not a .NET programmer (Java), but I would hazard a guess that the proxy object that dbus-sharp is generating will only respond to the interface described by the Interface attribute. The 'Get' method is a part of org.freedesktop.DBus.Properties D-Bus interface, not org.freedesktop.UPower.

The other thing I did was to add a try/catch block around the code in HandleUPowerChanged() similar to the one in InitializeBattery(), so that even if the the D-Bus call fails, it doesn't crash all of Docky.
UQUOTE

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.