Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-3815] Assertion failed: ((!isComplete() || isInvalid()) && "Resolver did not resolve requirement") #46400

Closed
tonyarnold opened this issue Feb 1, 2017 · 9 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software

Comments

@tonyarnold
Copy link
Contributor

Previous ID SR-3815
Radar rdar://problem/30541076
Original Reporter @tonyarnold
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash
Assignee @slavapestov
Priority Medium

md5: 8ca50f59f318c1f32f6f35bac6781e28

Issue Description:

When using swift-3.1-DEVELOPMENT-SNAPSHOT-2017-01-31-a.xctoolchain with Xcode 8.2.1 and Xcode 8.3-beta.1, if I open the project https://github.com/wokalski/Diff.swift indexing fails due to a crash in SourceKitService:

Assertion failed: ((!isComplete() || isInvalid()) && "Resolver did not resolve requirement"), function getWitness, file /Users/buildnode/jenkins/workspace/oss-swift-3.1-package-osx/swift/lib/AST/ProtocolConformance.cpp, line 336.

I've attached the crash log.

@belkadan
Copy link
Contributor

belkadan commented Feb 1, 2017

@DougGregor, @slavapestov, did we break something here?

@tonyarnold
Copy link
Contributor Author

I've run Xcode with SOURCEKIT_LOGGING=3 set in the environment, and SourceKitService seems to be crashing in Diff.swift/Sources/NestedExtendedDiff.swift, specifically the following typealias:

public typealias NestedElementEqualityChecker<T: Collection> = (T.Iterator.Element.Iterator.Element, T.Iterator.Element.Iterator.Element) -> Bool where T.Iterator.Element: Collection

Is there some way to get more information about what in that code is triggering this abort? It's happening across a range of projects, and I'd happily change my approach to get up and running again.

@jckarter
Copy link
Member

@swift-ci create

@slavapestov
Copy link
Member

Doesn't seem to crash in beta 2 – @tonyarnold, can you confirm?

@tonyarnold
Copy link
Contributor Author

Sorry Slava, it's still happening to me on beta 2. The compiler works fine, but indexing never completes. Crashes every time with Diff.

@tonyarnold
Copy link
Contributor Author

Actually, I tell a lie - the compiler still crashes in beta 2. If I run a newer snapshot, the project will compile, but the indexing doesn't ever complete - SourceKitService just crashes over and over until I close the project or quite Xcode.

Update: I just tried with today's Swift 3.1 snapshot, same result. It compiles without crashing, but SourceKitService crashes with a log just like the two attached above.

@slavapestov
Copy link
Member

Ok, thanks, I've reproduced it now.

@slavapestov
Copy link
Member

Fix merged: #7640

@tonyarnold
Copy link
Contributor Author

😃 thank you!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software
Projects
None yet
Development

No branches or pull requests

5 participants