title: SIGTRAP error for Core Data iOS
body: <p>I am continuously getting a SIGTRAP error from this function</p>
  
  <pre><code>- (void)saveShindyToDatabase
  {
  
      NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
      // url = [url URLByAppendingPathComponent:@"Default Shindy Database"];
      self.shindyDatabase = [[UIManagedDocument alloc] initWithFileURL:url];
  
      [self.shindyDatabase setValue:self.detailView.text forKey:@"details"];
  
      if (FBSession.activeSession.isOpen) {
          [[FBRequest requestForMe] startWithCompletionHandler:
           ^(FBRequestConnection *connection, NSDictionary&lt;FBGraphUser&gt; *user, NSError *error) {
               if (!error) {
                   self.name = user.name;
                   self.photo.profileID = user.id;
                   self.username = user.username;
               }
           }];
      }
  
      // [Guest guestWithName:self.name username:self.username photo:self.photo inManagedObjectContext:self.shindyDatabase.managedObjectContext];
      [self.shindyDatabase setValue:self.locationManager.location forKey:@"location"];
      [self.shindyDatabase setValue:self.dateAndTimePicker.date forKey:@"dateAndTime"];
  }
  </code></pre>
  
  <p>I'm trying to execute the function when the user taps a button, or in the background. Either one returns the same error. </p>
  
  <p>What am I doing wrong?</p>