! 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 !
Program received signal SIGSEGV, Segmentation fault.
Status:
RESOLVED: FIXED
Severity:
critical
Product:
Xfce4-power-manager
Component:
General

Comments

Description poma 2015-05-27 05:57:01 CEST
/tmp/1432696709_gdb_power-manager-plugin_16.log:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Detaching after fork from child process 1798.
Detaching after fork from child process 1802.
[New Thread 0x7fffe31e7700 (LWP 1797)]
[New Thread 0x7fffe39e8700 (LWP 1796)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7607416 in gtk_widget_get_realized () from /lib64/libgtk-3.so.0
#0  0x00007ffff7607416 in gtk_widget_get_realized () at /lib64/libgtk-3.so.0
#1  0x00007ffff7613dbb in gtk_widget_dispose () at /lib64/libgtk-3.so.0
#2  0x00007ffff65f809c in g_object_unref () at /lib64/libgobject-2.0.so.0
#3  0x00007fffebd4eda1 in power_manager_button_update_device_icon_and_details (battery_device=0x555555915850) at ../power-manager-button.c:506
        item = <optimized out>
        battery_device = 0x555555915850
        display_device = <optimized out>
        object_path = <optimized out>
        details = 0x555555a9de70 "<b>Uninterruptible Power Supply </b>\nFully charged (100%, 13 minutes runtime)"
        icon_name = 0x5555558b1be0 "uninterruptible-power-supply"
        pix = 0x555555978980
        __func__ = "power_manager_button_update_device_icon_and_details"
#4  0x00007fffebd4eda1 in power_manager_button_update_device_icon_and_details (button=0x555555a9e200, device=0x7fffd4013540) at ../power-manager-button.c:399
        item = <optimized out>
        battery_device = 0x555555915850
        display_device = <optimized out>
        object_path = <optimized out>
        details = 0x555555a9de70 "<b>Uninterruptible Power Supply </b>\nFully charged (100%, 13 minutes runtime)"
        icon_name = 0x5555558b1be0 "uninterruptible-power-supply"
        pix = 0x555555978980
        __func__ = "power_manager_button_update_device_icon_and_details"
#5  0x00007ffff65f3165 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#6  0x00007ffff66054b9 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#7  0x00007ffff660e140 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#8  0x00007ffff660e4ef in g_signal_emit () at /lib64/libgobject-2.0.so.0
#9  0x00007ffff65f7715 in g_object_dispatch_properties_changed () at /lib64/libgobject-2.0.so.0
#10 0x00007ffff65f9dc1 in g_object_notify () at /lib64/libgobject-2.0.so.0
#11 0x00007ffff65f3165 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#12 0x00007ffff66054b9 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#13 0x00007ffff660e140 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#14 0x00007ffff660e4ef in g_signal_emit () at /lib64/libgobject-2.0.so.0
#15 0x00007ffff65f7715 in g_object_dispatch_properties_changed () at /lib64/libgobject-2.0.so.0
#16 0x00007ffff65f9dc1 in g_object_notify () at /lib64/libgobject-2.0.so.0
#17 0x00007fffeb71197c in up_device_glue_proxy_g_properties_changed () at /lib64/libupower-glib.so.3
#18 0x00007ffff053fd40 in ffi_call_unix64 () at /lib64/libffi.so.6
#19 0x00007ffff053f79b in ffi_call () at /lib64/libffi.so.6
#20 0x00007ffff65f3989 in g_cclosure_marshal_generic () at /lib64/libgobject-2.0.so.0
#21 0x00007ffff65f3165 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#22 0x00007ffff6605cdf in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#23 0x00007ffff660e140 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#24 0x00007ffff660e4ef in g_signal_emit () at /lib64/libgobject-2.0.so.0
#25 0x00007ffff4d813c9 in on_properties_changed () at /lib64/libgio-2.0.so.0
#26 0x00007ffff4d70c84 in emit_signal_instance_in_idle_cb () at /lib64/libgio-2.0.so.0
#27 0x00007ffff5ee0b7a in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#28 0x00007ffff5ee0f10 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#29 0x00007ffff5ee1232 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#30 0x00007ffff74b67e5 in gtk_main () at /lib64/libgtk-3.so.0
#31 0x0000555555557749 in main (argc=8, argv=0x7fffffffdf08) at main.c:399
        process_name = "panel-16-power-"
        library = 0x555555777c20
        preinit_func = 0x0
        dbus_gconnection = <optimized out>
        dbus_gproxy = 0x5555557d21b0
        module = <optimized out>
        plug = 0x555555968310
        provider = 0x5555557eb220
        path = <optimized out>
        gproxy_destroy_id = 13
        error = 0x0
        filename = <optimized out>
        unique_id = 16
        socket_id = <optimized out>
        name = 0x7fffffffe2c3 "power-manager-plugin"
        display_name = <optimized out>
        comment = <optimized out>
        arguments = <optimized out>
rax            0x55555577cae0	93824994495200
rbx            0x555555a843c0	93824997671872
rcx            0x0	0
rdx            0xaaaaaaaaaaaaaaaa	-6148914691236517206
rsi            0x50	80
rdi            0x555555a843c0	93824997671872
rbp            0x555555a843c0	0x555555a843c0
rsp            0x7fffffffc990	0x7fffffffc990
r8             0x555555760b00	93824994380544
r9             0x1	1
r10            0x150	336
r11            0x4	4
r12            0x555555a843c0	93824997671872
r13            0x555555a031a0	93824997142944
r14            0x555555a9de70	93824997777008
r15            0x555555978980	93824996575616
rip            0x7ffff7607416	0x7ffff7607416 <gtk_widget_get_realized+22>
eflags         0x10286	[ PF SF IF RF ]
cs             0x33	51
ss             0x2b	43
ds             0x0	0
es             0x0	0
fs             0x0	0
gs             0x0	0


$ xfce4-power-manager --version

Xfce Power Manager 1.5.0

Part of the Xfce Goodies Project
http://goodies.xfce.org

Licensed under the GNU GPL.
Comment 2 poma 2015-05-27 07:17:25 CEST
Created attachment 6283 
xfpm - remove battery_device_remove_pix


Without battery_device_remove_pix won't crash.
Comment 3 poma 2015-05-27 07:19:17 CEST
Created attachment 6284 
xfpm ups
Comment 4 poma 2015-05-27 07:24:21 CEST
$ upower --dump
Device: /org/freedesktop/UPower/devices/ups_hiddev0
  native-path:          /sys/devices/pci0000:00/0000:00:04.0/usb2/2-1/2-1:1.0/usbmisc/hiddev0
  power supply:         yes
  updated:              Wed 27 May 2015 06:43:40 AM CEST (9 seconds ago)
  has history:          yes
  has statistics:       yes
  ups
    present:             yes
    state:               fully-charged
    warning-level:       none
    time to empty:       12.7 minutes
    percentage:          100%
    icon-name:          'battery-full-charged-symbolic'

Device: /org/freedesktop/UPower/devices/DisplayDevice
  power supply:         yes
  updated:              Wed 27 May 2015 06:43:40 AM CEST (9 seconds ago)
  has history:          no
  has statistics:       no
  ups
    present:             yes
    state:               fully-charged
    warning-level:       none
    time to empty:       12.7 minutes
    percentage:          100%
    icon-name:          'battery-full-charged-symbolic'

Daemon:
  daemon-version:  0.99.2
  on-battery:      no
  lid-is-closed:   no
  lid-is-present:  no
  critical-action: HybridSleep
Comment 5 poma 2015-05-27 14:11:06 CEST
Related:

plugin: Fix crash when devices (dis)connect
http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=2e0de98

"There are a couple conditions where the plguin would crash or
 emit runtime warnings due a device being connected or
 disconnected. Those should be fixed now."


Then this is yet another case.
Comment 6 poma 2015-05-27 14:16:37 CEST
It is noteworthy the device -is- connected all the time.
Comment 7 Eric Koegel editbugs 2015-05-27 18:31:25 CEST
Created attachment 6289 
Prevent a crash on device update

Can you try out this patch? I'd rather not drop the remove code as it will case memory leaks every time the icons get an update. But your patch and bug report does point to the ref count going wrong with battery_device->img so it was really helpful, thanks.
Comment 8 poma 2015-05-27 20:23:50 CEST
$ xfce4-power-manager --version

Xfce Power Manager 1.5.0git-20150527
&
0001-Prevent-a-crash-on-device-update-Bug-11932.patch

good to go.
Comment 9 poma 2015-05-27 20:24:54 CEST
Created attachment 6290 
xfpm ups v2
Comment 10 poma 2015-05-28 05:47:17 CEST
Prevent a crash on device update (Bug #11932)
http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=4927e6c

Thanks.

Bug #11932

Reported by:
poma
Reported on: 2015-05-27
Last modified on: 2015-05-28

People

Assignee:
Ali Abdallah
CC List:
4 users

Version

Attachments

xfpm - remove battery_device_remove_pix (2.30 KB, patch)
2015-05-27 07:17 CEST , poma
no flags
xfpm ups (368.15 KB, image/png)
2015-05-27 07:19 CEST , poma
no flags
Prevent a crash on device update (1017 bytes, patch)
2015-05-27 18:31 CEST , Eric Koegel
no flags
xfpm ups v2 (70.16 KB, image/png)
2015-05-27 20:24 CEST , poma
no flags

Additional information