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

crash: typing a string interpolation anchor instantly crashes sourcekit-lsp #607

Closed
tayloraswift opened this issue Aug 6, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@tayloraswift
Copy link
Member

opening the following SPM test project in vscode instantly crashes sourcekit-lsp:

sourcekit-lsp-crash-3.zip

public struct sourcekit_lsp_crash_3 {
    var description:String 
    {
        """
        \()
        """
    }
}
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
[Info  - 4:56:02 PM] Connection to server got closed. Server will restart.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
[Info  - 4:56:02 PM] Connection to server got closed. Server will restart.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
[Info  - 4:56:03 PM] Connection to server got closed. Server will restart.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
[Info  - 4:56:03 PM] Connection to server got closed. Server will restart.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
[Error - 4:56:04 PM] The SourceKit Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.

vscode-swift-extension: v0.6.0

$ swiftenv version
DEVELOPMENT-SNAPSHOT-2022-08-01-a 
$ swift --version
Swift version 5.8-dev (LLVM 07d14852a049e40, Swift 613b3223d9ec5f6)
Target: x86_64-unknown-linux-gnu
$ code --version
1.69.2
3b889b090b5ad5793f524b5d1d39fda662b96a2a
x64
@ahoppen
Copy link
Contributor

ahoppen commented Aug 8, 2022

rdar://98304976

@ahoppen
Copy link
Contributor

ahoppen commented Aug 9, 2022

I just tried reproducing this and SourceKit-LSP isn’t crashing for me if I perform the following steps:

  • Open the attached project
  • Type test inside the parentheses of the string interpolation in sourcekit_lsp_crash_3.swift

Are there any other steps you perform to make SourceKit-LSP crash?

@tayloraswift
Copy link
Member Author

tayloraswift commented Aug 11, 2022

if you type test inside the parentheses quickly enough, it will not crash, because the string interpolation anchor only crashes when it is empty.

if you leave the parentheses empty, it blinks 3 times, and then crashes.

i also upgraded to v0.7.0 of the vscode-swift extension, and it crashes as well.

@DavidGoldman
Copy link
Contributor

I believe this should have been fixed by #602

@ahoppen ahoppen added the bug Something isn't working label Aug 22, 2022
@ahoppen
Copy link
Contributor

ahoppen commented Aug 23, 2022

@Kelvin13 Could you check if you are still seeing the issue with the most recent swift development snapshot?

@tayloraswift
Copy link
Member Author

yep, this has been fixed! thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants