After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 664550 - Segfault in adapter_added() when BT dongle is replugged in search page
Segfault in adapter_added() when BT dongle is replugged in search page
Status: RESOLVED FIXED
Product: gnome-bluetooth
Classification: Core
Component: wizard
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-bluetooth-general-maint@gnome.bugs
gnome-bluetooth-general-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2011-11-22 10:33 UTC by Daniele Forsi
Modified: 2011-11-25 10:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Check if variant is valid and unref it only if not NULL (1.35 KB, patch)
2011-11-22 10:33 UTC, Daniele Forsi
committed Details | Review

Description Daniele Forsi 2011-11-22 10:33:26 UTC
Created attachment 201914 [details] [review]
Check if variant is valid and unref it only if not NULL

Steps to reproduce:

1. plug an USB Bluetooth dongle
2. start bluetooth-wizard and go to Device Search page
3. unplug the dongle
4. replug the dongle, segfault

backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00867184 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
(gdb) bt
  • #0 ??
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #1 g_variant_get_type
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #2 g_variant_is_of_type
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #3 g_variant_lookup_value
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #4 adapter_added
    at /home/Programmazione/gnome-bluetooth/lib/bluetooth-client.c line 773
  • #5 manager_g_signal
    at /home/Programmazione/gnome-bluetooth/lib/bluetooth-client.c line 932
  • #6 manager_g_signal
    at /home/Programmazione/gnome-bluetooth/lib/bluetooth-client.c line 918
  • #7 ffi_call_SYSV
    from /usr/lib/i386-linux-gnu/libffi.so.6
  • #8 ffi_call
    from /usr/lib/i386-linux-gnu/libffi.so.6
  • #9 g_cclosure_marshal_generic
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #10 g_closure_invoke
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #11 ??
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #13 g_signal_emit
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #14 ??
    from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
  • #15 ??
    from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
  • #16 ??
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #17 g_main_context_dispatch
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #18 ??
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #19 g_main_loop_run
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #20 gtk_main
    from /usr/lib/libgtk-3.so.0
  • #21 ??
    from /usr/lib/libgtk-3.so.0
  • #22 g_application_run
    from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
  • #23 main
    at /home/Programmazione/gnome-bluetooth/wizard/main.c line 960

After fixing this segfault the following message would appear:
(bluetooth-wizard:10493): GLib-CRITICAL **: g_variant_unref: assertion `value != NULL' failed
Comment 1 Bastien Nocera 2011-11-22 10:43:02 UTC
Review of attachment 201914 [details] [review]:

Looks good.