Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault with rust #342

Open
bWanShiTong opened this issue Sep 17, 2024 · 0 comments
Open

Segmentation fault with rust #342

bWanShiTong opened this issue Sep 17, 2024 · 0 comments

Comments

@bWanShiTong
Copy link

Sometimes when connecting to Peripheral segmentation fault happens when debugging why, stop reason is signal SIGSEGV: invalid address in function void Bindings::RustyPeripheral::link(SimpleRsBLE::Peripheral& target) in line 129:

* thread #1, name = 'ble-cron', stop reason = signal SIGSEGV: invalid address (fault address: 0x62663433)
    frame #0: 0x000055555565b2b1 ble-cron`operator(__closure=0x00007fff7400a470) at Bindings.cpp:129:56
   126      *_peripheral = ⌖  // THIS LINE IS SUPER IMPORTANT
   127 
   128      _internal->set_callback_on_connected([this]() {
-> 129          SimpleRsBLE::Peripheral* p_peripheral = *this->_peripheral;
   130          if (p_peripheral == nullptr) return;
   131 
   132          p_peripheral->on_callback_connected();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant