-
-
Notifications
You must be signed in to change notification settings - Fork 172
Exception in findAdvField #353
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
Comments
Got another one:
|
A user thinks the issue started in 1.3.5: |
Thanks for reporting this. I'll have a look into it. |
I've seen it even as far back as 1.3.4. Testing 1.3.3 right now. |
I'm still unable to reproduce this. I'm not sure what the error could be as that code has not been changed in a very long time. |
I've opened PR #354, it may or may not help with this. If you want to give it a test and let me know, I'd appreciate it. |
Ok, got it to work, testing now. |
|
This bit of code seems to be the root cause of it. |
Another one:
|
This one is in findAdvField:
|
|
Thanks, looks like there are a few things to deal with. Looking at your repo I see:
Any particular reason to set this to core 1? It would be better in my opinion to change the tasks that make calls into the BLE stack run on core 0 and leave this on core 0 so that the wifi and ble core tasks don't have as many sync issues.
This is a red flag, async and BLE do not work well together, known and ongoing issue. Not certain it could cause your issues but it is a factor to consider. It appears that your "BLE scan" task is overflowing it's stack in these logs, bumping that up a bit should resolve a few of these. |
Are you stopping and restarting scanning? Are you running an active scan? If so, you may be running into the issue that I had, which resulted in a similar stack trace to the heap corruption one you quoted. |
Just found a bug in the getService/characteristic/descriptor calls that can cause the stack overflow. Working on a fix for that. |
You're amazing! I was pretty sure I didn't have any recursion in my code so I'm glad you found it! But the pin to CORE 0 and getting rid of AsyncTCP has so far made everything but the stack overflow go away! (It's only been an hour though so I reserve the right to find some more GURU's) |
Well I did get one of these:
|
Here's one where the canary stack hit so you can see where the recursion is:
|
Thanks, PR #355 fixes the recursion issue, give that a try and let me know. It may fix the watchdog issue here as well. |
Should we maybe have some sanity checking on the sizes of stuff in findAdvField so at least it doesn't explode? |
The code should never have reached that point. Somehow the data vector got corrupted. I don't know why this is happening for you. |
I found Framework 3.2 + -D CONFIG_BT_NIMBLE_PINNED_TO_CORE=1 (which WASN'T actually turned on before) made 1.3.3 work perfectly so I'm sticking w/ that for now. |
Interesting, thanks for the update. I wish it were easier to pin down the issue but there are so many factors involved. Let me know if you come across any further data that may help. |
The text was updated successfully, but these errors were encountered: