adafruit / adafruit/iOS13-beta-file-issue
Some investigation
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Thanks for the blog post & videos @ptorrone! TIL about FAT12, and found @dhalbert's excellent info in https://github.com/adafruit/circuitpython/issues/111
I poked at this some more this evening, since I was wondering if I could verify whether this was a FAT12-specific issue, perhaps by mucking around with the block/cluster sizes to change the number of clusters on disk (I didn't get that far).
I see the same "erase/rename drive" behavior with PyPortal, with it's 8MB of storage. It shows up on my Mac (via `diskutil info`) as `File System Personality: FAT16` drive, vs `FAT12` for Circuit Playground Express. They both show up as `Partition Type: DOS_FAT_12` 🤷♂️. So I suspect it's still a FAT12-ish drive, but I'm not positive.
I also found the [release notes for fatfs R0.13a](http://elm-chan.org/fsw/ff/updates.txt), which include:
> Fixed f_fdisk() and f_mkfs() create the partition table with wrong CHS parameters. (appeared at R0.09)
It looks like CircuitPython uses a version that'd include this problem. I'm seeing [R0.12b](https://github.com/adafruit/circuitpython/blob/master/lib/oofatfs/ff.h).
I *think* this is the fix: https://github.com/abbrev/fatfs/commit/5c7915feab986c915f2142753f6df2e1497aad30 I tried applying it & seeing if it made a difference, but I got the same "erase/rename drive" & crash iPad behavior (assuming I did it correctly).
Finally, I pulled a panic log (`"incident_id":"E764F68C-1BFA-4244-98BD-5743A32672A7"` for any Apple lurkers) from my iPad, and it included:
> panic(cpu 1 caller 0xfffffff015b6e624): Unaligned kernel data abort
And unaligned accesses seem very plausibly related to 12 bit data.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the erase/rename behavior on the Circuit Playground Express and PyPortal with iOS 13, then inspect lib/oofatfs/ff.h and the referenced FatFs R0.13a release notes. Compare the partition and filesystem details with the iPad panic log; done means identifying a reproducible FAT or iOS-specific cause and documenting the evidence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios
- Domain
- mobile-dev, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100