Xcode crashes editing any packages - Segmentation Fault

Hello all. I am trying to work on some packages, but if I go to the project navigation and do anything from starting to edit a file, to creating a file, folder etc, Xcode immediately crashes with segmentation fault. I am not running anything. This only happens with the packages, if I open a regular project or workspace and work on it, it's fine. Other people I am working with do not seem to have this issue.

I will post the full log here, I tried putting a snippet here but it says I'm not allowed to

Thank you very much Hardware: MacBook Pro, Chip M1 Pro, macOS Monterey v12.5.1

Replies

Hey, I had a similar issue. Xcode would crash on every pod install, fastlane builds, branch changes, stashes etc. Found out the cause was incorrectly added SPM. I have a workspace with two projects. And one of the SPM packages was added to first project, as a result second project also had an access to that SPM library, so I was able to add it via Frameworks and Libraries. I removed that library from second project, and then added it as a package from Project -> Package Dependencies and then added its library from Target -> Frameworks and Libraries. Now it is working without an issue