Open e28eta opened 5 years ago
thanks @e28eta for checking this out!
@e28eta please check out the latest iOS beta, i think it's fixed, maybe, i need to test more, but so far i was able to open code.py in the files app and nothing deleted itself or crashed.
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
) asFile System Personality: FAT16
drive, vsFAT12
for Circuit Playground Express. They both show up asPartition 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, which include:
It looks like CircuitPython uses a version that'd include this problem. I'm seeing R0.12b.
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:And unaligned accesses seem very plausibly related to 12 bit data.