簡體   English   中英

存檔時Xcode 10 Generics typealias Segmentation Fault 11

[英]Xcode 10 Generics typealias Segmentation Fault 11 while archiving

Xcode 10存檔時出現分段錯誤

注意:

  • Xcode 10在設備和模擬器上構建運行正常,在Xcode 9.4中, 歸檔構建運行也很好

我的代碼:

typealias ResponseBlock<T> = (_ sender: T) -> Void

我在整個項目中使用它,如:

var callback: ResponseBlock<AnyObject>? 

在Xcode 10上存檔時出錯:

  1. 同時生成Objective-C頭
  2. 打印時................
  3. 打印類型'ResponseBlock <[IndexPath]>'(聲明在.....] RangeText =“typealias ResponseBlock =(_ sender:T) - > V”)
  4. 打印類型'(T)' 錯誤:分段錯誤:11

用法:

var refreshCells: ResponseBlock<[IndexPath]>?
viewModel.refreshCells = {indexPathList in 
     self.collectionView.reloadItems(at:   indexPathList)
}

我注意到XCODE 10 Archive處於發布模式並且構建,運行處於調試模式。

所以我檢查了ReleaseDebug模式配置之間的區別

發現: 在此輸入圖像描述

解: 在此輸入圖像描述

它解決了我的問題,現在不再收到Segmentation Fault。

設置Build系統以使用遺留構建系統對我有用:

文件>工作區設置

設置構建系統

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM