schollz / find3-cli-scanner

The command-line scanner that supports Bluetooth and WiFi
https://www.internalpositioning.com/doc/tracking_your_computer.md
149 stars 55 forks source link

Bluetooth scanning panic on macOS #35

Open azawawi opened 5 years ago

azawawi commented 5 years ago

Same behavior is found on golang 1.9, 1.10 and 1.11 on macOS Mojave v10.14.6. It may be related to https://github.com/paypal/gatt/issues/64.

$ go/bin/find3-cli-scanner --bluetooth -d DEVICE -f FAMILY
panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 22 [running]:
github.com/schollz/gatt/xpc.XpcConnect.func2(0x5305630, 0xc4200af6b0, 0x5305630)
    ~/go/src/github.com/schollz/gatt/xpc/xpc_darwin.go:169 +0x94
github.com/schollz/gatt/xpc.XpcConnect(0x45093b2, 0xf, 0x4563a60, 0xc42010e400, 0x0)
    ~/go/src/github.com/schollz/gatt/xpc/xpc_darwin.go:169 +0xbd
github.com/schollz/gatt.NewDevice(0x0, 0x0, 0x0, 0x9, 0xc4200bbc28, 0x0, 0x0)
    ~/go/src/github.com/schollz/gatt/device_darwin.go:66 +0x19f
main.scanBluetooth(0xc4200a4360, 0x0, 0x90)
    ~/go/src/github.com/schollz/find3-cli-scanner/bluetooth.go:45 +0x2d2
created by main.basicCapture
    ~/go/src/github.com/schollz/find3-cli-scanner/main.go:302 +0x99a