title: Xcode EXC_BREAKPOINT (code=1, subcode=...) when printing url
body: <p>I have a strange bug in my own program. I'm currently working on Video Editing app. I have a SongPicker view controller, which displays all the songs from the user's music app. When the user selects a song, a new object (MediaAsset) representing that song is created. It worked perfectly fine, when SongPicker was written in Swift, and MediaAsset in Objective-C. However I rewrited MediaAsset completely on Swift and now every time I'm trying to create new MediaAsset from SongPicker, Xcode throwes EXC_BREAKPOINT (code=1, subcode=...) and my app crushes.</p>
  
  <p>Here is the code, that is called when user selects song:</p>
  
  <pre><code>private let mediaItems = MPMediaQuery.songsQuery().items as [MPMediaItem]
  
  func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath){
     let item = filteredMediaItems[indexPath.row]
     println("didSelectRowAtIndexPath")
     println("item: \(item), url: \(item.assetURL.absoluteString)")
     delegate?.songPickerViewController(self, didPickedAsset: MediaAsset(url: item.assetURL, type: .Audio))
  }
  </code></pre>
  
  <p>It actually generates output to console:</p>
  
  <pre><code>didSelectRowAtIndexPath
  item: &lt;MPConcreteMediaItem: 0x174648340&gt; 2369259457983598523, url: Optional("ipod-library://item/item.mp3?id=2369259457983598523")
  </code></pre>
  
  <p>then it goes to MediaAsset constructor, which looks like this:</p>
  
  <pre><code>init(url: NSURL, type: MediaAssetType){
    println("new MediaAsset with url \(url.absoluteString)")
    self.url = url
    self.asset = AVURLAsset(URL: url, options: [AVURLAssetPreferPreciseDurationAndTimingKey: true])
    self.timeRange = CMTimeRangeMake(kCMTimeZero, self.asset.duration)
    self.initialRate = CGFloat(max(self.asset.videoTrack!.nominalFrameRate / 30.0, 1.0))
    self.rate = self.initialRate
    self.type = type
  }
  </code></pre>
  
  <p>it prints to console: </p>
  
  <pre><code>new MediaAsset with url Optional("ipod-library://item/item.mp3?id=2369259457983598523")
  </code></pre>
  
  <p>And on this line it crushes:
  <img src="https://i.stack.imgur.com/HrJ95.png" alt="Crush screenshot"></p>
  
  <p>The code that creates asset from AVURLAsset is exactly the same as it was in my old ObjectiveC class (where it worked perfectly well), so the problem shouldn't belong to AVFoundation.
  Does anybody knows what can be reason of that crush? And as more general question, in which cases "EXC_BREAKPOINT (code=1, ..." arises?</p>
  
  <p><strong>EDIT</strong>
  After deleting this println statement, my app still crushes but now shows this assembler code:<img src="https://i.stack.imgur.com/tBzUN.jpg" alt="Crush"></p>