title: setObject:ForKey: crash?
body: <p>I am getting this crash in the console:</p>
  
  <pre><code>2011-08-27 23:26:45.041 App[1672:3117] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary setObject:forKey:]: attempt to insert nil key'
  *** First throw call stack:
  (0x3231c8c3 0x362ee1e5 0x3231c7bd 0x3231c7df 0x32289679 0x3052e865 0x3220fd55 0x3221b7a3 0x3345e4b7 0x3345e38c)
  terminate called throwing an exception[Switching to process 10243 thread 0x2803]
  [Switching to process 10243 thread 0x2803]
  </code></pre>
  
  <p>The only line that I think would fire at the time it crashes that relates to this crash is this line:</p>
  
  <pre><code>UIImage *photo = [self.selectedDictionary objectForKey:@"ProfileImage"];
  </code></pre>
  
  <p>Does anything look wrong here? What could be the problem?</p>
  
  <p>Edit1:
  It is crashing when I do this to call a method:
  Code:</p>
  
  <pre><code>if(actionSheet.tag == 1) {
              [self showAchievements];
          }
  </code></pre>
  
  <p>This is the showAchievements method:
  Code:</p>
  
  <pre><code>- (void)showAchievements {
      GKAchievementViewController *achievements = [[GKAchievementViewController alloc] init];
      if (achievements != nil)
      {
          achievements.achievementDelegate = self;
          [self presentModalViewController:achievements animated:YES];
      }
  }
  
  - (void)achievementViewControllerDidFinish:(GKAchievementViewController *)viewController
  {
      [self dismissModalViewControllerAnimated:YES];
      [viewController release];
  }
  </code></pre>
  
  <p>Can this crash be because I have not properly hooked everything up in iTC? I am definitely sure it crashes in that method and I do not know why.</p>
  
  <p>Does anyone have any ideas?</p>
  
  <p>Edit2: I am getting down to it here, in my console, right before it crashes it has a line saying Missed Method. So I search for where this NSLog is and it is in GameCenterManager.m, a file necessary for Game Center I think. Here is the method:</p>
  
  <pre><code>    - (void) callDelegate: (SEL) selector withArg: (id) arg error: (NSError*) err
  {
      assert([NSThread isMainThread]);
      if([delegate respondsToSelector: selector])
      {
          if(arg != NULL)
          {
              [delegate performSelector: selector withObject: arg withObject: err];
          }
          else
          {
              [delegate performSelector: selector withObject: err];
          }
      }
      else
      {
          NSLog(@"Missed Method");
      }
  }
  </code></pre>
  
  <p>So from that code do you see whats wrong?</p>
  
  <p>Thanks!</p>