Re: [swift-users] Assertion Failure When Using the swift-DEVELOPMENT-SNAPSHOT-2016-08-04-a Xcode Toolchain

2016-08-04 Thread Mark Lacey via swift-users

> On Aug 4, 2016, at 8:51 PM, Saagar Jha via swift-users 
>  wrote:
> 
> Hello Swift Users,
> 
> 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 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:
> 
> Assertion failed: (value != OpenExistentials.end() && "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.
> 0  swift0x00010a932ebb 
> llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
> 1  swift0x00010a932106 llvm::sys::RunSignalHandlers() 
> + 70
> 2  swift0x00010a93360f SignalHandler(int) + 383
> 3  libsystem_platform.dylib 0x7fffa6122d7a _sigtramp + 26
> 4  libsystem_platform.dylib 0x00010001 _sigtramp + 1508758177
> 5  swift0x00010a93335e abort + 14
> 6  swift0x00010a933341 __assert_rtn + 81
> 7  swift0x000108431879 
> eraseOpenedExistentials(swift::Expr*&)::ExistentialEraser::walkToExprPre(swift::Expr*)
>  + 361
> 8  swift0x0001085b8ea5 (anonymous 
> namespace)::Traversal::visit(swift::Expr*) + 4981
> 9  swift0x0001085b6f75 
> swift::Expr::walk(swift::ASTWalker&) + 53
> 10 swift0x00010842e375 (anonymous 
> namespace)::FailureDiagnosis::typeCheckChildIndependently(swift::Expr*, 
> swift::Type, swift::ContextualTypePurpose, swift::OptionSet unsigned int>, swift::ExprTypeCheckListener*) + 1221
> 11 swift0x000108434ea3 (anonymous 
> namespace)::FailureDiagnosis::typeCheckArgumentChildIndependently(swift::Expr*,
>  swift::Type, (anonymous namespace)::CalleeCandidateInfo const&, 
> swift::OptionSet) + 1987
> 12 swift0x00010843e9a1 (anonymous 
> namespace)::FailureDiagnosis::visitApplyExpr(swift::ApplyExpr*) + 913
> 13 swift0x000108428f6a swift::ASTVisitor<(anonymous 
> namespace)::FailureDiagnosis, bool, void, void, void, void, 
> void>::visit(swift::Expr*) + 170
> 14 swift0x000108422888 
> swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 
> 104
> 15 swift0x0001084289a8 
> swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl&,
>  swift::Expr*) + 4056
> 16 swift0x0001084ab665 
> swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, 
> swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, 
> swift::constraints::ConstraintSystem&, 
> llvm::SmallVectorImpl&, 
> swift::OptionSet) + 917
> 17 swift0x0001084b17d1 
> swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, 
> swift::TypeLoc, swift::ContextualTypePurpose, 
> swift::OptionSet, 
> swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 625
> 18 swift0x00010852c061 swift::ASTVisitor<(anonymous 
> namespace)::StmtChecker, void, swift::Stmt*, void, void, void, 
> void>::visit(swift::Stmt*) + 545
> 19 swift0x00010852c543 swift::ASTVisitor<(anonymous 
> namespace)::StmtChecker, void, swift::Stmt*, void, void, void, 
> void>::visit(swift::Stmt*) + 1795
> 20 swift0x00010852bf8e swift::ASTVisitor<(anonymous 
> namespace)::StmtChecker, void, swift::Stmt*, void, void, void, 
> void>::visit(swift::Stmt*) + 334
> 21 swift0x00010852b369 (anonymous 
> namespace)::StmtChecker::typeCheckBody(swift::BraceStmt*&) + 25
> 22 swift0x00010852a63f 
> swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, 
> swift::SourceLoc) + 383
> 23 swift0x00010852a463 
> swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*,
>  swift::SourceLoc) + 35
> 24 swift0x00010852afe4 
> swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*)
>  + 180
> 25 swift0x0001084e5c56 
> typeCheckFunctionsAndExternalDecls(swift::TypeChecker&) + 166
> 26 swift0x0001084e68f0 
> swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, 
> swift::OptionSet, unsigned int, 
> unsigned int) + 1568
> 27 swift0x00010818798c 
> 

[swift-users] Assertion Failure When Using the swift-DEVELOPMENT-SNAPSHOT-2016-08-04-a Xcode Toolchain

2016-08-04 Thread Saagar Jha via swift-users
Hello Swift Users,

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 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:

Assertion failed: (value != OpenExistentials.end() && "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.
0  swift0x00010a932ebb 
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift0x00010a932106 llvm::sys::RunSignalHandlers() + 
70
2  swift0x00010a93360f SignalHandler(int) + 383
3  libsystem_platform.dylib 0x7fffa6122d7a _sigtramp + 26
4  libsystem_platform.dylib 0x00010001 _sigtramp + 1508758177
5  swift0x00010a93335e abort + 14
6  swift0x00010a933341 __assert_rtn + 81
7  swift0x000108431879 
eraseOpenedExistentials(swift::Expr*&)::ExistentialEraser::walkToExprPre(swift::Expr*)
 + 361
8  swift0x0001085b8ea5 (anonymous 
namespace)::Traversal::visit(swift::Expr*) + 4981
9  swift0x0001085b6f75 
swift::Expr::walk(swift::ASTWalker&) + 53
10 swift0x00010842e375 (anonymous 
namespace)::FailureDiagnosis::typeCheckChildIndependently(swift::Expr*, 
swift::Type, swift::ContextualTypePurpose, swift::OptionSet, swift::ExprTypeCheckListener*) + 1221
11 swift0x000108434ea3 (anonymous 
namespace)::FailureDiagnosis::typeCheckArgumentChildIndependently(swift::Expr*, 
swift::Type, (anonymous namespace)::CalleeCandidateInfo const&, 
swift::OptionSet) + 1987
12 swift0x00010843e9a1 (anonymous 
namespace)::FailureDiagnosis::visitApplyExpr(swift::ApplyExpr*) + 913
13 swift0x000108428f6a swift::ASTVisitor<(anonymous 
namespace)::FailureDiagnosis, bool, void, void, void, void, 
void>::visit(swift::Expr*) + 170
14 swift0x000108422888 
swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 104
15 swift0x0001084289a8 
swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl&,
 swift::Expr*) + 4056
16 swift0x0001084ab665 
swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, 
swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, 
swift::constraints::ConstraintSystem&, 
llvm::SmallVectorImpl&, 
swift::OptionSet) + 917
17 swift0x0001084b17d1 
swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, 
swift::TypeLoc, swift::ContextualTypePurpose, 
swift::OptionSet, 
swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 625
18 swift0x00010852c061 swift::ASTVisitor<(anonymous 
namespace)::StmtChecker, void, swift::Stmt*, void, void, void, 
void>::visit(swift::Stmt*) + 545
19 swift0x00010852c543 swift::ASTVisitor<(anonymous 
namespace)::StmtChecker, void, swift::Stmt*, void, void, void, 
void>::visit(swift::Stmt*) + 1795
20 swift0x00010852bf8e swift::ASTVisitor<(anonymous 
namespace)::StmtChecker, void, swift::Stmt*, void, void, void, 
void>::visit(swift::Stmt*) + 334
21 swift0x00010852b369 (anonymous 
namespace)::StmtChecker::typeCheckBody(swift::BraceStmt*&) + 25
22 swift0x00010852a63f 
swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, 
swift::SourceLoc) + 383
23 swift0x00010852a463 
swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*,
 swift::SourceLoc) + 35
24 swift0x00010852afe4 
swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) 
+ 180
25 swift0x0001084e5c56 
typeCheckFunctionsAndExternalDecls(swift::TypeChecker&) + 166
26 swift0x0001084e68f0 
swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, 
swift::OptionSet, unsigned int, 
unsigned int) + 1568
27 swift0x00010818798c 
swift::CompilerInstance::performSema() + 3916
28 swift0x000107c82ad1 
performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, 
llvm::ArrayRef, int&, swift::FrontendObserver*) + 449
29 swift0x000107c8163f 
swift::performFrontend(llvm::ArrayRef,