BatteryMonitor uses deprecated ACPI event support, causing crashes when plugging or unplugging AC adapter

Bug #617293 reported by Benn Snyder
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Docky
Fix Released
Low
Robert Dyer

Bug Description

http://cateee.net/lkddb/web-lkddb/ACPI_PROC_EVENT.html

/proc/acpi/battery is being deprecated in favor of /sys/class/power_supply. For users who have kernels with CONFIG_ACPI_PROC_EVENT disabled, Docky crashes when
1) The BatteryMonitor Docklet is enabled
and
2) An AC adapter is plugged/unplugged
because /proc/acpi/battery does not exist.

Distro: Gentoo (but could be any distro with such a kernel)
Xorg 1.7.7
NVIDIA GeForce G 105M
Mono 2.6.4

Revision history for this message
Benn Snyder (benn.snyder) wrote :
description: updated
Revision history for this message
Chris S. (cszikszoy) wrote :

Thanks for the report, and for working on a fix, Benn. When you are done please propose a merge so we can review it.

Changed in docky:
assignee: nobody → Benn Snyder (benn.snyder)
Changed in docky:
status: New → In Progress
Robert Dyer (psybers)
Changed in docky:
importance: Undecided → Low
Changed in docky:
milestone: none → 2.0.6
Changed in docky:
milestone: 2.0.6 → 2.0.7
Changed in docky:
assignee: Benn Snyder (benn.snyder) → nobody
Robert Dyer (psybers)
Changed in docky:
assignee: nobody → Robert Dyer (psybers)
Changed in docky:
milestone: 2.0.7 → none
Revision history for this message
Robert Dyer (psybers) wrote :

Rev 1690 keeps it from crashing (I think). The final fix is of course the branch which adds /sys support.

Revision history for this message
Sarim Khan (sarim2005) wrote :

I am also suffering from this problem, even i dont have the battery plugin enable, but still docky crushes when AC power on/off.

Revision history for this message
Benn Snyder (benn.snyder) wrote :

Yeah, that branch doesn't crash for me.

Changed in docky:
milestone: none → 2.0.8
Revision history for this message
Robert Dyer (psybers) wrote :

Fixed in rev 1704.

Changed in docky:
status: In Progress → Fix Committed
Changed in docky:
status: Fix Committed → Fix Released
Revision history for this message
Jamie Warner (jamiesonwarner) wrote :

Docky still crashes on power change for me. Ubuntu 14.04, Docky 2.2.0.

See error log here:
http://pastebin.com/2tFUsbbY

Revision history for this message
Amit Yadav (yadav-amitsingh) wrote :
Download full text (3.8 KiB)

Same problem on my system.. Same config as jamiesonwarner
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) <0x00137>
at System.Reflection.MethodBase.Invoke (object,object[]) <0x00032>
at System.Delegate.DynamicInvokeImpl (object[]) <0x00203>
at System.MulticastDelegate.DynamicInvokeImpl (object[]) <0x0003b>
at System.MulticastDelegate.DynamicInvokeImpl (object[]) <0x0002e>
at System.Delegate.DynamicInvoke (object[]) <0x00020>
at DBus.Connection.HandleSignal (DBus.Protocol.Message) <0x0031f>
at DBus.Connection.DispatchSignals () <0x00067>
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>

[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) <0x00137>
at System.Reflection.MethodBase.Invoke (object,object[]) <0x00032>
at System.Delegate.DynamicInvokeImpl (object[]) <0x00203>
at System.MulticastDelegate.DynamicInvokeI...

Read more...

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

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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