InfiniTimeOrg / InfiniTimeOrg/InfiniTime
Watch crashes when updating settings after filesystem read via BLE
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Verification
- I searched for similar bug reports and found none was relevant.
What happened?
Running ReadDir via BLE followed by any setting update causes a crash
What should happen instead?
It should save the settings and not crash
Reproduction steps
Simplest way is using itd.
- Connect to the Pinetime via itd and look at the filesystem via itgui
- Disconnect the Pinetime from Bluetooth
- Open Settings, change something and press the Pinetime button
- It will hang for a while and then crash
More details?
By closer inspection we found that the issue is unrelated to itd. It can be triggered by issuing an "ls" command directly using the Adafruit protocol (for example with a Python script), and that the crash occurs when there is an attempt to write to the filesystem.
We believe that some data structure of LittleFS becomes corrupted when FS operations are triggered via BLE.
Version
1.11.0
Companion app
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the crash with a filesystem read through the Adafruit protocol, then a settings update, using the listed itd and Python-script scenarios. Trace the BLE-triggered filesystem read through the subsequent filesystem write; done means settings save successfully without a hang or crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100