khvzak / bluez-tools

A set of tools to manage bluetooth devices for linux
GNU General Public License v2.0
176 stars 51 forks source link

Segfault when trying to get info about the device with bt-device #35

Open realszopen opened 4 years ago

realszopen commented 4 years ago

When I'm trying to get info about devices I get the following:

(bt-device:26340): GLib-GIO-CRITICAL *: 14:25:58.566: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || error == NULL' failed Class: 0x0

(bt-device:26340): GLib-GIO-CRITICAL *: 14:25:58.566: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || error == NULL' failed Paired: 0

(bt-device:26340): GLib-GIO-CRITICAL *: 14:25:58.566: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || error == NULL' failed Trusted: 0 [rw]

(bt-device:26340): GLib-GIO-CRITICAL *: 14:25:58.566: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || error == NULL' failed Blocked: 0 [rw]

(bt-device:26340): GLib-GIO-CRITICAL *: 14:25:58.566: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || error == NULL' failed Connected: 0 UUIDs: [ (bt-device:26340): GLib-GIO-CRITICAL *: 14:25:58.566: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || error == NULL' failed Segmentation fault (core dumped)

It happens on openSUSE Tumbleweed.

presslab-us commented 4 years ago

I'm seeing the same problem on Rasbian Buster.

Package: bluez-tools
Version: 2.0~20170911.0.7cb788c-2
Priority: optional
Section: utils
Maintainer: Debian Bluetooth Maintainers <team+pkg-bluetooth@tracker.debian.org>
Installed-Size: 800 kB
Depends: libc6 (>= 2.7), libglib2.0-0 (>= 2.37.3), libreadline7 (>= 6.0)
Recommends: bluez-obexd
Homepage: https://github.com/khvzak/bluez-tools
rickyphewitt commented 4 years ago

I'm also seeing this on Ubuntu 18.04. It only appears to happen on some Bluetooth devices. As I have a pair of headphones that I can get the device info about the command does not SegFault

radeklat commented 4 years ago

I started observing this error in the last couple of weeks for my Sony WH-1000XM2 Wireless Bluetooth headphones. Strangely, there has not been any update to the headphones not bluez-tools that I'm aware of.

bt-device -i ${DEVICE_MAC}
[<DEVICE_MAC>]
  Name: LE_WH-1000XM2
  Alias: LE_WH-1000XM2 [rw]
  Address: <DEVICE_MAC>
  Icon: (null)

(bt-device:3603): GLib-GIO-CRITICAL **: 11:42:01.352: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || *error == NULL' failed
  Class: 0x0

(bt-device:3603): GLib-GIO-CRITICAL **: 11:42:01.352: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || *error == NULL' failed
  Paired: 0

(bt-device:3603): GLib-GIO-CRITICAL **: 11:42:01.352: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || *error == NULL' failed
  Trusted: 0 [rw]

(bt-device:3603): GLib-GIO-CRITICAL **: 11:42:01.352: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || *error == NULL' failed
  Blocked: 0 [rw]

(bt-device:3603): GLib-GIO-CRITICAL **: 11:42:01.352: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || *error == NULL' failed
  Connected: 0
  UUIDs: [
(bt-device:3603): GLib-GIO-CRITICAL **: 11:42:01.352: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || *error == NULL' failed
Segmentation fault (core dumped)
jesusha123 commented 3 years ago

Same error message on Ubuntu 20.04. Some devices do return the information and some other devices make bt-device crash.

ghost commented 3 years ago

Debian 11 (sid) having the same issue using Broadcom 20702 adapter

jscott0 commented 1 year ago

The problem is that there is a NULL pointer dereference. I'll submit a pull request soon.

fgsch commented 4 months ago

I just ran into this with Debian 12.5 (bookworm) though the line numbers are different:

(bt-device:2451): GLib-GIO-CRITICAL **: 15:19:18.416: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || *error == NULL' failed
  Paired: 0

(bt-device:2451): GLib-GIO-CRITICAL **: 15:19:18.417: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || *error == NULL' failed
  Trusted: 0 [rw]

(bt-device:2451): GLib-GIO-CRITICAL **: 15:19:18.417: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || *error == NULL' failed
  Blocked: 0 [rw]

(bt-device:2451): GLib-GIO-CRITICAL **: 15:19:18.417: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || *error == NULL' failed
  Connected: 0
  UUIDs: [
(bt-device:2451): GLib-GIO-CRITICAL **: 15:19:18.417: g_dbus_proxy_call_sync_internal: assertion 'error == NULL || *error == NULL' failed
Segmentation fault