! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Power manager panel plugin crashing on using brightness slider
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Simon P 2014-08-10 15:40:58 CEST
Created attachment 5601 
patch for battery-button.c

[Bug appears on Git build on both Debian/testing & Arch Linux, 32bit x86]

Clicking on, or dragging, the slider of the display brightness slider of the plugin menu causes the plugin to crash. This behaviour has been present since this feature was introduced.

I've tracked down the cause to the way the "value-changed" signal on the scale_menu_item object is handled. The signal is defined with a gdouble data item for the range value (but isn't used anywhere?) while the callback function range_value_changed_cb isn't expecting this data.

By changing to g_signal_connect_swapped for this signal in function battery_button_show_menu & swapping the parameters in the callback function, the range slider is now working for me. (patch attached)

I'm also wondering why nobody else is getting this bug, I've seen screenshots of the new menu on the forum. Due to 32bit vs 64bit, maybe?
Comment 1 Eric Koegel editbugs 2014-08-11 18:49:06 CEST
Hey, thanks for the patch! There was another similar bug report, we weren't able to reproduce it locally which made fixing harder, but a fresh pair of eyes always helps.

Pushed to master in

commit 53c6780fe4cb37659b9db618cc033b74214a871c
Author: Eric Koegel <eric.koegel@gmail.com>
Date:   Mon Aug 11 19:38:56 2014 +0300

    Plugin: Fix crash with slider on 32bit systems (Bug 11076)

http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=53c6780fe4cb37659b9db618cc033b74214a871c

Bug #11076

Reported by:
Simon P
Reported on: 2014-08-10
Last modified on: 2014-08-11

People

Assignee:
Ali Abdallah
CC List:
2 users

Version

Version:
Unspecified

Attachments

patch for battery-button.c (864 bytes, patch)
2014-08-10 15:40 CEST , Simon P
no flags

Additional information