title: EXC_BAD_INSTRUCTION when unarchiving Swift Dictionary
body: <p>I'm trying to unarchive a custom object that implements the the <code>NSCoding</code> protocol. This class is called <code>Reservation</code> and one of its property is a Swift dictionary:</p>
  
  <pre><code>class Reservation {
    //...
    var orderedExtras : [CarExtra : Int]?
  }
  </code></pre>
  
  <p><code>CarExtra</code> also implements <code>NSCoding</code>.
  Now when I try to write the file to disk using </p>
  
  <pre><code>NSKeyedArchiver.archiveRootObject(reservations, toFile: ArchiveURL.path!)
  </code></pre>
  
  <p>everything is fine. However, I have problems reading this object from disk.
  When I try to unarchive the object with</p>
  
  <pre><code> required convenience init?(coder aDecoder: NSCoder) {
        let extras = aDecoder.decodeObjectForKey("orderedExtras") as? [CarExtra : Int]
   }
  </code></pre>
  
  <p>it gives me a</p>
  
  <blockquote>
    <p>EXC_BAD_INSTRUCTION(code=EXC_I386_INVOP, subcode = 0x0)</p>
  </blockquote>
  
  <p>exception. If I try to treat the unarchived object instead as an NSDictionary</p>
  
  <pre><code>let extras = aDecoder.decodeObjectForKey("orderedExtras") as? NSDictionary
  </code></pre>
  
  <p>it does not crash and I can extract the data I've saved.
  Can someone explain why I get this error message? Of could simply use a NSDictionary throughout the application, but I would prefer to continue with the Swift types.</p>
  
  <p>EDIT: Here is the stack trace
  <a href="https://i.stack.imgur.com/amqbB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/amqbB.png" alt="stack trace"></a></p>