alexmoon / bluest

Cross-platform Rust crate for working with Bluetooth Low Energy devices.
Apache License 2.0
55 stars 8 forks source link

Segmentation Fault #6

Closed maartenb80 closed 11 months ago

maartenb80 commented 11 months ago

On Mac OS X (arm) I get a segmentation during scanning: adapter.scan(&[]).await?;

Took the scan example, and this is the output:

2023-10-11T08:39:35.436624Z  INFO bluest::corebluetooth::adapter: Bluetooth authorization is allowed
2023-10-11T08:39:35.470714Z  INFO scan: starting scan
2023-10-11T08:39:35.470754Z  INFO scan: scan started
2023-10-11T08:39:36.404826Z  INFO scan: iPhone14Pro (-45dBm): []
zsh: segmentation fault  /Users/user/Downloads/bluest/target/release/examples/scan

Tested on another Mac yields the same result.

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               scan [84415]
Path:                  /Users/USER/Downloads/*/scan
Identifier:            scan
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        zsh [84098]
Responsible:           Terminal [3803]
User ID:               501

Date/Time:             2023-10-11 10:39:36.4064 +0200
OS Version:            macOS 13.6 (22G120)
Report Version:        12

System Integrity Protection: enabled

Crashed Thread:        0  main  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00009d49e05c8020 -> 0x00001d49e05c8020 (possible pointer authentication failure)
Exception Codes:       0x0000000000000001, 0x00009d49e05c8020
alexmoon commented 11 months ago

Thanks for the report! I'm seeing the same issue so I should be able to fix it quickly.

maartenb80 commented 11 months ago

Thanks Alex,

Confirmed to have solved the issue. Thanks for the quick response!