title: EXC_BAD_ACCESS (code=1, address=0x0) when runModalForWindow
body: <p>I have a window and a window controller which opens when the user clicks a button.
  Sometimes I get EXC_BAD_ACCESS(code=1, address=0x0). </p>
  
  <pre><code>0x7fff6f2a59e0:  movq   (%rax), %rdi
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code>    ChooseProceduresWindowController *chooseProceduresWindowController = [[ChooseProceduresWindowController alloc] initWithWindowNibName:@"ChooseProceduresWindow"];
      [NSApp runModalForWindow:[chooseProceduresWindowController window]];
  </code></pre>
  
  <p>The error appears then runModalForWindow: is called.
  I don't get this error every time, but I couldn't find a pattern.</p>
  
  <p>Thanks</p>