title: Crashlytics Crash with NSOperationQueue (QOS: UNSPECIFIED)
body: <p>I'm getting a crash, reported in Crashlytics, and I have no idea how to reproduce the error, It happens randomly so it's hard to debug it with Xcode. Any ideas?</p>
  
  <pre><code>Crashed: NSOperationQueue 0x280419200 (QOS: UNSPECIFIED)
  0 libobjc.A.dylib 0x22c471430 objc_retain + 16
  1 CoreFoundation 0x22d2b5888 __CFBasicHashAddValue + 1480
  2 CoreFoundation 0x22d1e64ac CFDictionarySetValue + 260
  3 Foundation 0x22dd04888 _encodeObject + 732
  4 myAPI 0x1062b44b0 -[DataCore encodeWithCoder:] (DataCore.m:236)
  5 myAPI 0x1062909c4 -[DataHandle encodeWithCoder:] (DataHandle.m:53)
  6 Foundation 0x22dd04aa8 _encodeObject + 1276
  7 Foundation 0x22dc69c6c +[NSKeyedArchiver archivedDataWithRootObject:] + 168
  8 myAPI 0x106288a34 __77+[CachableObject addObjectToCache:withCacheName:withTTL:withCompletionBlock:]_block_invoke (CachableObject.m:162)
  9 Foundation 0x22dd198bc NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK + 16
  10 Foundation 0x22dc21ab8 -[NSBlockOperation main] + 72
  11 Foundation 0x22dc20f8c -[__NSOperationInternal _start:] + 740
  12 Foundation 0x22dd1b790 __NSOQSchedule_f + 272
  13 libdispatch.dylib 0x22ccc16c8 _dispatch_call_block_and_release + 24
  14 libdispatch.dylib 0x22ccc2484 _dispatch_client_callout + 16
  15 libdispatch.dylib 0x22cc6582c _dispatch_continuation_pop$VARIANT$mp + 412
  16 libdispatch.dylib 0x22cc64ef4 _dispatch_async_redirect_invoke + 600
  17 libdispatch.dylib 0x22cc71a18 _dispatch_root_queue_drain + 376
  18 libdispatch.dylib 0x22cc722c0 _dispatch_worker_thread2 + 128
  19 libsystem_pthread.dylib 0x22cea517c _pthread_wqthread + 472
  20 libsystem_pthread.dylib 0x22cea7cec start_wqthread + 4
  </code></pre>
  
  <p>Here is what the code in DataCore.m looks like</p>
  
  <pre><code>- (void)encodeWithCoder:(NSCoder *)coder {
      [super encodeWithCoder:coder];
      [coder encodeObject:programFormatPlayInfo forKey:@"ProgramFormatPlayInfo"];
      [coder encodeObject:bigScreenPlayInfo forKey:@"BigScreenPlayInfo"];
      [coder encodeObject:pivotHandle forKey:@"PivotHandle"];
      [coder encodeInteger:pivotDataLinkId forKey:@"PivotDataLinkId"];
      [coder encodeInteger:viewContextId forKey:@"ViewContextId"];
      [coder encodeBool:suppressImagePivot forKey:@"SuppressImagePivot"];
      [coder encodeObject:attributeIds forKey:@"AttributeIds"];
      [coder encodeObject:self.overflow forKey:@"Overflow"];
      [coder encodeObject:self.cacheNameWithUser forKey:@"CacheNameWithUser"];
      [coder encodeObject:self.metaData forKey:@"Metadata"];
  }
  </code></pre>
  
  <p>and here is where I try to add an object to the cache,
  not sure if it's failing to decode or something related to the background queue.</p>
  
  <pre><code>+ (void)addObjectToCache:(CachableObject*)object withCacheName:(NSString*)cacheName withTTL:(CacheTime)cacheTimeSeconds withCompletionBlock:(void(^)()) block {
      CachableObject* theObject = object;
      [_backgroundQueue addOperationWithBlock:^{
          @autoreleasepool {
              @try {
                  NSString * path = [CachableObject pathForCachedObject:cacheName];
                  NSDate * date = [NSDate date];
  
                  [object setCacheDate:date];
                  [object setTtlSeconds:[NSNumber numberWithInteger:cacheTimeSeconds]];
                  [object setApiVersion:APIVERSION];
  
                  // Add to NSCache
                  [[CachableObject objectCache] setObject:theObject forKey:cacheName];
  
                  // Add to file system
                  NSError* err = nil;
                  NSData * data = [NSKeyedArchiver archivedDataWithRootObject:theObject];
                  if (data) {
                      [data writeToFile:path options:NSDataWritingAtomic error:&amp;err];
                  }
  
                  // Add to dynamic cache
                  unwrapObjectAndComplyWithClass(object, [DataHandle class], ^(id unwrappedObject) {
                      DataHandle *objectUnwrapped = unwrappedObject;
                      DataFrame *objectFrame = objectUnwrapped.frame;
                      for (NSString *eachDependencyName in objectFrame.dependencies) {
                          [[VVIDynamicCacheManager sharedManager]addDependencyToStore:eachDependencyName withCacheName:cacheName];
                      }
                  }, ^{
                     /*Not a data handle*/
                  });
  
              } @catch (NSException* ex) {
                  NSLog(@"CachableObject: got an exception %@", ex);
              } @finally {
                  if (block) {
                      block();
                  }
              }
          }
      }];
  }
  </code></pre>