title: Error 133000 when using multiple contexts with core data
body: <p>I've spent days trying every possible solution I can think of to this problem, but nothing seems to be working.</p>
  
  <p>I run a background thread like this:</p>
  
  <pre><code>[MagicalRecord saveInBackgroundWithBlock:^(NSManagedObjectContext *localContext) {
  
                      Media *localMedia = [media inContext:localContext];
  
                      UIImage *image = localMedia.thumbnail;
  
  
                      dispatch_async(dispatch_get_main_queue(), ^{
  
                          [thumbnails setObject:image forKey:[NSNumber numberWithInt:i]];
                          [contentDict setObject:thumbnails forKey:@"MediaItems"];
                          [cell.entryView setNeedsDisplay];
                      });
  
                  }];
  </code></pre>
  
  <p>Or like this:</p>
  
  <pre><code>dispatch_queue_t cellSetupQueue = dispatch_queue_create("com.Journalized.SetupTimelineThumbnails", NULL);
              dispatch_async(cellSetupQueue, ^{
  
                  NSManagedObjectContext *newMoc = [[NSManagedObjectContext alloc] init];
                  NSPersistentStoreCoordinator *coordinator = [NSManagedObjectContext contextForCurrentThread].persistentStoreCoordinator;
                  [newMoc setPersistentStoreCoordinator:coordinator];
  
                  NSNotificationCenter *notify = [NSNotificationCenter defaultCenter];
                  [notify addObserver:self
                             selector:@selector(mergeChanges:)
                                 name:NSManagedObjectContextDidSaveNotification
                               object:newMoc];
  
  Media *localMedia = [media inContext:[NSManagedObjectContext contextForCurrentThread];
  
                          UIImage *image = localMedia.thumbnail;
  
  
                          dispatch_async(dispatch_get_main_queue(), ^{
  
                              [thumbnails setObject:image forKey:[NSNumber numberWithInt:i]];
                              [contentDict setObject:thumbnails forKey:@"MediaItems"];
                              [cell.entryView setNeedsDisplay];
                          });
  
                      }];
  </code></pre>
  
  <p>Both of these give me a crash with UIImage returning as nil object, and a <code>Cocoa Error 133000</code>.</p>
  
  <p>I've removed every other piece of background threading code, and have saved on the main thread directly before this just to make sure. Running the code above on the main thread also works, but freezes up my UI. Despite all of these efforts, the above code crashes every time.</p>
  
  <p>I'm not sure what to do to make this work.</p>
  
  <p>Edit:</p>
  
  <p>My question, specifically, is how do I make this work without crashing? It seems to be a problem with objects from 1 context not existing in another, but how do i make them exist in another context?</p>