title: Why this code crashes on iPhone 5?
body: <p>The following code:</p>
  
  <pre><code>func getCurrentMillis() -&gt; Int64 {
      return Int64(Date().timeIntervalSince1970 * 1000)
  }
  </code></pre>
  
  <p>crashes on [32 bit] iPhone 5 with message:</p>
  
  <pre><code>EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT, subcode=0xe7ffdefe)
  </code></pre>
  
  <p>I don't understand why seems that result of this calculation should fit into <code>Int64</code>, or am I missing something?</p>
  
  <p>Stacktrace shows this (<code>TextProcessor.textDidChange()</code> calls <code>getCurrentMillis()</code>):</p>
  
  <p><a href="https://i.stack.imgur.com/fcg30.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fcg30.png" alt="enter image description here"></a></p>
  
  <p><strong>Per OOPer's request, I add the relevant code of TextProcessor:</strong></p>
  
  <pre><code>var timeOfLastInput: Int64 = 0
  
  ...
  
  if getCurrentMillis() - timeOfLastInput &gt; 150 {
      textMap.cursorPosition = nil
  }
  </code></pre>
  
  <p><strong>Update:</strong>
  I've sent bug report to Apple.</p>