title: Command failed due to signal: Segmentation fault: 11 when Compiling Swift Project
body: <p><img src="https://i.stack.imgur.com/h0rm6.jpg" alt="compiler crash"></p>
  
  <p>I want to make a Tetris Game Project in iOS. But I am facing this problem in this picture. The Xcode occur this ERROR, I couldn't fix it. I used to think, a Shape class has 7 of different Shape subclasses and I divided them in 8 files included the Shape class, that may occur this ERROR. Then I put all of them in one file. However, It occur again.</p>
  
  <p>Here is some of my codes:</p>
  
  <pre><code>class Shape: Hashable, CustomStringConvertible{
      let color: BlockColor
  
      var blocks = Array&lt;Block&gt;()
      var orientation: Orientation
      var column: Int = 0
      var row: Int = 0
  
      // 每个块中的每个小块的位置
      var blockColRowPositions: [Orientation: Array&lt;(col: Int, row: Int)&gt;]{
          return [:]
      }
      // 每个块在底部的形状
      var bottomBlocksForOrientations: [Orientation: Array&lt;Block&gt;]{
          return [:]
      }
  
  
      var bottomBlock: Array&lt;Block&gt;{
          guard let bottomBlocks = bottomBlocksForOrientations[orientation] else{
              return []
          }
          return bottomBlocks
      }
  
      var hashValue:Int{
          return blocks.reduce(0) {$0.hashValue ^ $1.hashValue}
      }
  
      var description:String{
          return "\(color) block facing \(orientation) : \(blocks[firstIndex]), \(blocks[secondIndex]), \(blocks[thirdIndex]), \(blocks[forthIndex])"
      }
  
  // ....
  
  }
  </code></pre>
  
  <p><br></p>
  
  <pre><code>class O_Shape: Shape {
  
      // 每个块中的每个小块的位置
      override var blockColRowPositions: [Orientation: Array&lt;(column: Int, row: Int)&gt;] {
          return [
              Orientation.zero:       [(0,0),(1,0),(0,1),(1,1)],
              Orientation.twoQuater:  [(0,0),(1,0),(0,1),(1,1)],
              Orientation.fourQuater: [(0,0),(1,0),(0,1),(1,1)],
              Orientation.sixQuater:  [(0,0),(1,0),(0,1),(1,1)]
          ]
      }
  
      override var bottomBlocksForOrientations: [Orientation: Array&lt;Block&gt;] {
          return[
              Orientation.zero:       [blocks[thirdIndex], blocks[forthIndex]],
              Orientation.twoQuater:  [blocks[thirdIndex], blocks[forthIndex]],
              Orientation.fourQuater: [blocks[thirdIndex], blocks[forthIndex]],
              Orientation.sixQuater:  [blocks[thirdIndex], blocks[forthIndex]]
          ]
      }
  
  }
  </code></pre>