title: Getting an EXC_BAD_ACCESS with va_list
body: <p>Following the sample in article <a href="http://cocoawithlove.com/2009/05/variable-argument-lists-in-cocoa.html" rel="nofollow">http://cocoawithlove.com/2009/05/variable-argument-lists-in-cocoa.html</a>, I've written some custom handling of variable argument methods for forwarding them to another method.</p>
  
  <pre><code>- (void) someMethod:(NSString *)name
     wittParamsAndKeys:(id)firstParam, ... {
  
  va_list args;
  va_start(args, firstParam);
  NSDictionary* paramsAndKeys = 
      [[NSDictionary alloc] initWithObjectsAndKeys:firstParam, args, nil];
  va_end(args);
  
  }
  </code></pre>
  
  <p>But I get <strong>EXC_BAD_ACCESS</strong>. So then I tried removing <code>nil</code> from arguments to NSDictionary:</p>
  
  <pre><code>NSDictionary* paramsAndKeys = 
      [[NSDictionary alloc] initWithObjectsAndKeys:firstParam, args];
  </code></pre>
  
  <p>Again the exception. Now I've got an exception from <code>initWithObjectsAndKeys:</code> for invalid parameters.</p>
  
  <p>I'm wondering if some way exists for just forwarding <em>variable arguments</em> to another method?</p>