title: EXC_BAD_ACCESS when performing a segue to ViewController with a UIWebView?
body: <p>So I have a setup like this:</p>
  
  <p><img src="https://i.stack.imgur.com/Ztj9K.png" alt="enter image description here"></p>
  
  <p>Where I have a custom code reader view controller, and as soon as it detects a barcode, I want it to segue to another view controller with a label and a UIWebView. So far, it works perfectly with just the label being displayed. For some reason, all I did was add a <code>UIWebView</code> and added an <code>IBOutlet</code> in my Second View Controller custom class and the segue won't work due to the <code>exc_bad_access</code> error. The error highlights the following line in my code reader view controller:</p>
  
  <pre><code>self.performSegueWithIdentifier("push", sender: self) //my segue is named push
  </code></pre>
  
  <p>Here is my second view controller code:</p>
  
  <pre><code>import UIKit
  
  public class SecondViewController: UIViewController {
      var setText:String!
      @IBOutlet weak var WebV: UIWebView!
  
  
      @IBOutlet var label: UILabel!
      override public func viewDidLoad() {
          label.text = setText
      }
  
  }
  </code></pre>
  
  <p><strong>SOLUTION:</strong> So I just realized that, for some reason, my segue was running off the main thread. Does this happen in a closure? And, does this mean that you can't perform a segue in a closure/block?</p>
  
  <p>Any help is greatly appreciated. Thank you so much.</p>