title: EXC_BAD_ACCESS in a class variable in Objective C?
body: <p>in my ViewController class declaration, I have a private variable of type NSDictionary*:</p>
  
  <pre><code>@interface ViewController : UIViewController {
      float fScreenWidth;
      float fScreenHeight;
      float fBasePanelWidth;
      float fToolbarHeight;
      float fLabelAndButtonHeight;
      NSDictionary* fMooDataJson;
  }
  </code></pre>
  
  <p>and in my <code>viewDidLayoutSubviews(…)</code> method, I assign this to an <code>NSDictionary</code> object. However, in other calls, when accessing the variable, I get an <code>EXC_BAD_ACCESS</code> error. The access is like this:</p>
  
  <pre><code>NSDictionary* subMooList = [fMooDataJson objectForKey:@"moo"];
  </code></pre>
  
  <p>Any ideas why this would fail? Are there better ways of accessing this variable?</p>