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-11931] Xcode crashes when trying to add dependency #4638

Closed
swift-ci opened this issue Dec 9, 2019 · 9 comments
Closed

[SR-11931] Xcode crashes when trying to add dependency #4638

swift-ci opened this issue Dec 9, 2019 · 9 comments
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Dec 9, 2019

Previous ID SR-11931
Radar rdar://problem/57824032
Original Reporter endresads (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Environment
  • 10.15.1

  • Xcode 11.2.1

Additional Detail from JIRA
Votes 0
Component/s llbuild, Package Manager
Labels Bug
Assignee None
Priority Medium

md5: d45a7eed3082aaf408ccdee24323467c

duplicates:

  • SR-11401 Xcode 11 beta 7 crashes when opening SwiftPM package

Issue Description:

Fatal error: Please file a bug at https://bugs.swift.org with this info – LLBuildValue: ###dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "Did not find a matching key", underlyingError: nil))### --— ###{"env":{"__CF_USER_TEXT_ENCODING":"0x1406174C:0x0:0x0","CA_ASSERT_MAIN_THREAD_TRANSACTIONS":"1","CA_DEBUG_TRANSACTIONS":"1","HOME":"/Users/a692666","LOGNAME":"a692666","MallocNanoZone":"0","PATH":"/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin","SHELL":"/bin/bash","SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.Jc4jy1wNDa/Listeners","TMPDIR":"/var/folders/2h/31fl22c501xg5tcqws_ssyy8_0c5tc/T/","USER":"a692666","XPC_FLAGS":"0x0","XPC_SERVICE_NAME":"com.apple.dt.Xcode.3740"}}###: file /Library/Caches/com.apple.xbs/Sources/swiftpm/swiftpm-15502/Sources/SPMLLBuild/llbuild.swift, line 232

@typesanitizer
Copy link

Could you format the error and provide some context for what you were doing when this error occurred?

@beccadax
Copy link
Contributor

@swift-ci create

@swift-ci
Copy link
Contributor Author

Comment by John Endres (JIRA)

What kind of format do you want it in? That's the exact output of whatever command it was running, and I followed the instructions. If you wanted it formatted some different way then I suggest it prints out that way from the tool or have it tell you how to format it. I will edit the description to show the important parts.

As for context, I was adding a dependency (see the title of the bug). Pretty clear to me. For reference, here is one way to do it.

  1. File -> Swift Packages -> Add Package Dependency...

  2. Paste the repository URL

  3. Assuming there is no unknown error and the next screen populates with version info then go to step 4.

    1. If there are errors, then you have to refresh the package cache. Those are Xcode menus too.
  4. Press Next

  5. Press Finish

Somewhere in there it will crash, and usually leaves the project in a state that crashes Xcode on every open of the project.

To be honest, though, after spending some time with this, I really thing it is not a Swift thing so much as it is an Xcode thing. SPM may be crashing due to a missing key rather than just spitting out an error, but Xcode has lingering problems even if you revert everything. You end up with a corrupted project.

@typesanitizer
Copy link

Sorry, I wasn't clear. What I was saying was that the error message was hard to read – one problem is that JIRA has its own funky markup, and having crashes emit the error in that markup is perhaps not the best option because that might make it hard to read in a terminal.

I think the bolded parts make it clearer, thanks. Same goes for the additional context you provided, thanks, that might make it easier for someone else to reproduce the problem.

cc @aciidb0mb3r does this look like a SwiftPM issue or an Xcode issue?

@swift-ci
Copy link
Contributor Author

Comment by John Endres (JIRA)

Not you man! Just me letting things get to me and being in front of a keyboard.

More info, though. If I keep away from traditional Xcode projects and use the new mode that presents a project if you open a Package.swift file, I have no problems (fingers crossed). Works like it has the past 5 years or so. Xcode is just an editor for intents and purposes then.

@ankitspd
Copy link
Member

Would you be able to provide a zip of your DerivedData directory (when you're in a state where you're hitting this bug).

@typesanitizer
Copy link

@aciidb0mb3r could you please add the original bug report of which this is a duplicate?

@ankitspd
Copy link
Member

It's SR-11401. See the "duplicates" section above.

@typesanitizer
Copy link

For some reason, that wasn't showing up earlier. Thanks!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants