GNOME Bugzilla – Bug 659205
power: possible sigfpe
Last modified: 2011-09-16 08:17:34 UTC
reading the code of engine_update_composite_device, I can't help the feeling that energy_full_total can still be zero by the time we reach percentage = 100.0 * energy_total / energy_full_total; That could happen if the array has zero devices, or if all devices hit the continue statement in the body of the loop.
(In reply to comment #0) > That could happen if the array has zero devices, or if all devices hit the > continue statement in the body of the loop. Each call to engine_update_composite_device() is only done if there is at least one battery, which also means that the continue will not be hit every time -- BUT if all the batteries are broken, then this does indeed mean *bang*. commit d06b9cae10d4a482f76b32394334ebec6073751f Author: Richard Hughes <richard@hughsie.com> Date: Fri Sep 16 09:15:35 2011 +0100 power: Protect against a potential SIGFE This can only happen if all laptop batteries have zero energy_full. Resolves https://bugzilla.gnome.org/show_bug.cgi?id=659205