UIDocument openWithCompletionHandler: crash
I'm using Core Data in my project and get a rare crash in the following code section -(void) useDocument{ AFFormsCoreDataEngine* engine = [AFFormsCoreDataEngine sharedInstance]; if (![[NSFileManager defaultManager] fileExistsAtPath: [engine.formsDatabase.fileURL path]]) { [engine.formsDatabase saveToURL: engine.formsDatabase.fileURL forSaveOperation: UIDocumentSaveForCreating completionHandler: ^(BOOL success){ // setup }]; } else if (engine.formsDatabase.documentState == UIDocumentStateClosed) { [engine.formsDatabase openWithCompletionHandler: ^(BOOL success){ // setup }]; } else if (engine