title: What could cause EXC_BREAKPOINT on Swift sharedInstance return
body: <p>I have following crash with <code>sharedInstance</code> <code>return Static.instance!</code> line:</p>
  
  <p>EXC_BREAKPOINT 0x0000000100da42d8</p>
  
  <p>Crash happened in Ad Hoc release build where there is no debug breakpoints.
  According to call stack of the crash <code>sharedInstance</code> should already exist at the time of crash (it is first called on app launch, crash occurred on button tap).</p>
  
  <p>Crash occurred on iPad Air 2 with iOS 8.4.0, build is compiled with Swift 2.1 compiler in Xcode 7.1.1</p>
  
  <p>App itself (which calls sharedInstance on launch) and DataSource class are located in different modules. Could it be that for classes from framework with DataSource class static struct is different?</p>
  
  <pre><code>@objc public final class DataSource : NSObject
  {        
      public class var sharedInstance: DataSource
      {
          struct Static
          {
              static var instance: DataSource?
              static var token: dispatch_once_t = 0
          }
  
          dispatch_once(&amp;Static.token)
              {() -&gt; Void in
                  Static.instance = DataSource()
              }
          return Static.instance!
      }
  
      override init()
      {
          super.init()
          ...
      }
  ...
  }
  </code></pre>