<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 4, 2016, at 8:51 PM, Saagar Jha via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hello Swift Users,</div><div class=""><br class=""></div>This afternoon I updated my Xcode to Xcode 8 beta 4, and tried to compile one of my previously migrated Swift 3 projects. Along with a couple of renames, the compiler kept crashing due to a segmentation fault. Since the issue appeared to be similar to&nbsp;SR-2227, which was supposedly fixed with a pull request a couple days ago, I downloaded today’s snapshot toolchain. The new toolchain throws an assertion:<div class=""><br class=""><div class=""><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">Assertion failed: (value != OpenExistentials.end() &amp;&amp; "didn't see this OVE in a containing OpenExistentialExpr?"), function walkToExprPre, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/Sema/CSDiag.cpp, line 3082.</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">0&nbsp; swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010a932ebb llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;) + 43</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">1&nbsp; swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010a932106 llvm::sys::RunSignalHandlers() + 70</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">2&nbsp; swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010a93360f SignalHandler(int) + 383</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">3&nbsp; libsystem_platform.dylib 0x00007fffa6122d7a _sigtramp + 26</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">4&nbsp; libsystem_platform.dylib 0x0000000100000001 _sigtramp + 1508758177</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">5&nbsp; swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010a93335e abort + 14</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">6&nbsp; swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010a933341 __assert_rtn + 81</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">7&nbsp; swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000108431879 eraseOpenedExistentials(swift::Expr*&amp;)::ExistentialEraser::walkToExprPre(swift::Expr*) + 361</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">8&nbsp; swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000001085b8ea5 (anonymous namespace)::Traversal::visit(swift::Expr*) + 4981</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">9&nbsp; swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000001085b6f75 swift::Expr::walk(swift::ASTWalker&amp;) + 53</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">10 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010842e375 (anonymous namespace)::FailureDiagnosis::typeCheckChildIndependently(swift::Expr*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet&lt;TCCFlags, unsigned int&gt;, swift::ExprTypeCheckListener*) + 1221</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">11 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000108434ea3 (anonymous namespace)::FailureDiagnosis::typeCheckArgumentChildIndependently(swift::Expr*, swift::Type, (anonymous namespace)::CalleeCandidateInfo const&amp;, swift::OptionSet&lt;TCCFlags, unsigned int&gt;) + 1987</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">12 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010843e9a1 (anonymous namespace)::FailureDiagnosis::visitApplyExpr(swift::ApplyExpr*) + 913</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">13 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000108428f6a swift::ASTVisitor&lt;(anonymous namespace)::FailureDiagnosis, bool, void, void, void, void, void&gt;::visit(swift::Expr*) + 170</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">14 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000108422888 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 104</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">15 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000001084289a8 swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl&lt;swift::constraints::Solution&gt;&amp;, swift::Expr*) + 4056</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">16 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000001084ab665 swift::TypeChecker::solveForExpression(swift::Expr*&amp;, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&amp;, llvm::SmallVectorImpl&lt;swift::constraints::Solution&gt;&amp;, swift::OptionSet&lt;swift::TypeCheckExprFlags, unsigned int&gt;) + 917</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">17 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000001084b17d1 swift::TypeChecker::typeCheckExpression(swift::Expr*&amp;, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet&lt;swift::TypeCheckExprFlags, unsigned int&gt;, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 625</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">18 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010852c061 swift::ASTVisitor&lt;(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void&gt;::visit(swift::Stmt*) + 545</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">19 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010852c543 swift::ASTVisitor&lt;(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void&gt;::visit(swift::Stmt*) + 1795</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">20 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010852bf8e swift::ASTVisitor&lt;(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void&gt;::visit(swift::Stmt*) + 334</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">21 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010852b369 (anonymous namespace)::StmtChecker::typeCheckBody(swift::BraceStmt*&amp;) + 25</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">22 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010852a63f swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 383</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">23 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010852a463 swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 35</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">24 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010852afe4 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 180</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">25 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000001084e5c56 typeCheckFunctionsAndExternalDecls(swift::TypeChecker&amp;) + 166</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">26 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000001084e68f0 swift::performTypeChecking(swift::SourceFile&amp;, swift::TopLevelContext&amp;, swift::OptionSet&lt;swift::TypeCheckingFlags, unsigned int&gt;, unsigned int, unsigned int) + 1568</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">27 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000010818798c swift::CompilerInstance::performSema() + 3916</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">28 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000107c82ad1 performCompile(swift::CompilerInstance&amp;, swift::CompilerInvocation&amp;, llvm::ArrayRef&lt;char const*&gt;, int&amp;, swift::FrontendObserver*) + 449</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">29 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000107c8163f swift::performFrontend(llvm::ArrayRef&lt;char const*&gt;, char const*, void*, swift::FrontendObserver*) + 2895</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">30 swift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000107c43ea0 main + 2448</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">31 libdyld.dylib&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00007fffa5f16255 start + 1</div></div><div class=""><br class=""></div><div class="">The stack trace doesn’t really help tell me what’s going wrong; does anyone have the same issue or know why this is happening?<br class=""></div></div></div></div></blockquote><div><br class=""></div>It’s a crash while trying to emit a diagnostic after failing to type check an expression. We often print the expression in question after the stack trace, so you might check to see if that is being emitted. It may help you find a work-around.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class=""><div class="">
Thanks,<br class="Apple-interchange-newline"><span style="font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Saagar Jha</span></div><div class=""><br class=""></div><div class="">P.S. Should I file a bug on the JIRA?<br style="font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></div></div></div></div></blockquote><div><br class=""></div>Yes, please!</div><div><br class=""></div><div>Any crash is worthy of a bug report on JIRA. We’ll need a test case along with instructions on how to reproduce the issue using that test case. Small, self-contained source files are always ideal, but an entire project works too if you cannot find a way to isolate it.</div><div><br class=""></div><div>Mark</div><div><br class=""></div></body></html>