Closed jpsim closed 4 years ago
We also have trouble opening Realms on USB devices, and I suspect in both cases it has to do with poor support for mmap()
on these devices. Does anything about the error confirm this suspicion?
Uh-oh. Yeah, quite potentially.
The original user posted a stack trace that seemed to mention an issue with a mapped file in there.
I tried digging up some information from OSXFUSE, but their mentions of mmap()
are precious few. I did find a note in their Changelog from 2004 about removing shared-writable mmap()
support because it was causing issues, which would explain this. Still, that's 12 years ago -- does someone perhaps want to get in touch with the OSXFUSE developers and get their input?
Yep, I just did some digging on the FUSE GitHub repo and found the same thing. There's also been a few issues opened in the FUSE for OS X repo regarding memory mapping, but most of them have gone un-replied.
Yeah! It sounds like directly contacting the developers about their current position on shared-writable mmap
would be a good idea. Apparently they still have a mailing list for FUSE-level issues. Shall I sign up for the mailing list and ask them? Is it just the lack of shared-writable mmap
that's causing these issues for us?
Tim, I wouldn't go too far down that path. FUSE file system support isn't critical to anyone as far as I can't tell. Let's keep the issue open, but I think it's very low priority to pursue this at this point.
Would be great to post these findings on the issue in realm-cocoa, though, in case anyone comes asking for it. :-)
➤ Finn Andersen commented:
If we are to support this, it will come out of building more generic support for devices which does not support memory mapping.
Cross posting from realm/realm-cocoa#3310, created by @TimOliver:
SimPholders has introduced a feature where if FUSE for OS X is installed on the system, the sandboxed folders for iOS apps in the Simulator will be exposed via a mounted virtual file system volume that shows the folders in a properly organised structure, as opposed to simply opening the folder normally.
Unfortunately, as reported in the Realm Browser repo it appears that Realm Objective-C is unable to open Realm files if they are exposed via this virtual file system. When I attempted to open a Realm file this way, Realm reported an
NSError
simply stating"Inappropriate file type or format"
.Goals
Mounting the contents of an iOS Simulator app via SimPholders + FUSE for OS X, and then opening a Realm file exposed in this virtual file system.
Expected Results
The Realm file opens as normal.
Actual Results
Realm returns an error with the message:
"Inappropriate file type or format"
Steps to Reproduce
Version of Realm and Tooling
Realm Objective-C 0.98.3