-
Notifications
You must be signed in to change notification settings - Fork 5
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
Segfault on XPeria X when stopping scan #55
Comments
I entered this information in #28 but then i was not aware, that this would mean that i loose all data everytime the daemon is stopped |
I use contrac 0.7.1 on my sony xperia xa2. I had a hard crash of the whole bluetooth system yesterday (nothing related to bluetooth worked anymore, handsfree, bt-speaker,...) and I had to reboot may phone. After the reboot the counters for sent and received beacons jumped back from over 1000 to roughly 500, which was the value several days before. It seams, contrac lost much more than one days beacon-information. |
Having looked at the logs again (thank you both for providing them; they've very helpful), it seems I made a mistake in the logic of the state machine (see #56) and possibly if this is fixed it may prevent the segfault Unfortunately my Xperia X is unusable (a cracked screen that's deteriorated), so I can't test this properly, but I'll push out the change in the next release and would be grateful for feedback on whether you still get the segfaults afterwards. Concerning the sent/received counters, as you've discovered these get saved when the daemon shuts down, so if the daemon dies badly the most recent changes to these will be lost. But the important data is the list of beacons received and the associated bloom filters, which are saved out at least daily and stored in |
This change is now in 0.7.3 on OpenRepos. @cnlpete, @triessner: could you please me know whether this fixes the segfault on shutdown you've been experiencing, and if so, whether you're happy for this bug to be closed? |
The segfault on shutdown is fixed, but the applyDiscovery filter has the same problem (and leads to an infinite loop). My guess is to move line 104 to 95, which is basically the same fix as you did in removeDiscoveryFilter. |
Thanks for the super-fast response @cnlpete and for figuring out the solution. I've pushed out a new version (0.7.4), hopefully this one will do the trick. |
Yes, starting/stopping the daemon now seems to work with 0cc539c. Thank you for the quick fix (and release) 👍 |
A segfault happens when i stop the daemon (deactivate scan and send switch).
Since the received contacts are apparently only saved upon a day switch, this means all received contacts are lost. whenever the daemon crashes..
A quick workaround would be to save the contacts every once in a while and also when closing the application. I did not find the code that saves the contacts when closing the daemon, only the dayswitch seems to do this now.
Note, the X does not seem to support the ble filter stuff, but contacts are properly received.
Second Note, i cut the log, since the line "[D] BleScanner::removeDiscoveryFilter:194 - No discovery filter to remove, moving straight to stop discovery" does not stop comming (only when the segfault is reached)
The text was updated successfully, but these errors were encountered: