title: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) on seconds convert to hrs/mins function
body: <p>I got the error message:</p>
  
  <blockquote>
    <p>EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)</p>
  </blockquote>
  
  <p>In code, I was trying to convert the second counter started from 0 and to convert to hours and minutes. I really don't know what the  problem is.</p>
  
  <pre><code>let secondsQuantity = HKQuantity(unit: HKUnit.secondUnit(), doubleValue: seconds)
  var str_1 = secondsQuantity.description
  let range1 = str_1.rangeOfString("s")
  str_1.removeRange(range1!)
  h = Int(str_1)! / 3600
  m = (Int(str_1)!  % 3600) / 60
  s = Int(str_1)! % 60
  let hour = "\(h) Hours, "
  let min = "\(m) Minutes, "
  let sec = "\(s) Seconds"
  let sentance = "Time: " + hour + min + sec
  timeLabel.text = sentence
  </code></pre>