3 ms·
This seems to be a case of Apple doing the right thing in a weird way. The docs say not to call this function from the main thread, but from a background thread
by Mithaldu 12y ago
This seems to be a case of Apple doing the right thing in a weird way. The docs say not to call this function from the main thread, but from a background thread:
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/index.html#//apple_ref/occ/instm/NSFileManager/URLForUbiquityContainerIdentifier:
(Url quoted because the : is part of it and hn-auto-linking won't include it.)
From that first screenshot however he is calling it from the main thread, and their test system likely is built to trap that with a crash.
- jarin 12y agoIt also may be because it returns nil if the user hasn't set up iCloud and the app may not have handled that case properly.
- electrum 12y agoThe screenshot shows it crashing on a method named "semaphore_wait_trap", so that does indeed seem to be an intentional trap for calls that can block the main thread.
- daniel02216 12y agoThat's just the syscall for waiting for a semaphore to be signaled. Most likely the crash is due to the main thread waiting for too long on that semaphore - it's likely stuck waiting for a network request to complete, and the watchdog kicked in and killed it.