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

segfault when using generics #80

Open
ttytm opened this issue Mar 31, 2024 · 0 comments
Open

segfault when using generics #80

ttytm opened this issue Mar 31, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@ttytm
Copy link
Member

ttytm commented Mar 31, 2024

Describe the bug

v-analyzer crashes when working with generics.
the issue happens more often in neovim than in vscode.

Expected Behavior

keeps running

Current Behavior

segfault

Reproduction Steps

E.g. in vlib/x/json2/decoder.v v-analyzer won't work - tested in VSCode as well as in neovim. The connection to the server closes

signal 11: segmentation fault
addr2line: '[0x4e6756]': No such file
[0x4e6756]
addr2line: '[0x5babc0]': No such file
...
[Error - 1:32:13 AM] Connection to server got closed. Server will not be restarted.
[Info  - 1:35:48 AM] v-analyzer version: 0.0.4-beta.1, commit: cae4a2c, OS: linux x64

In VSCode apparently below can be handled (I think the server restarts itself here), while in neovim a crash without restart seems more likely.

struct Foo[T] {
	foo T
}

// If it doesn't crash on paste try to remove and add the `bar T` parameter`
fn foo[T](bar T) {
	println(bar)
}

Possible Solution

No response

Additional Information/Context

might be an issue with V itself

Environment details (v doctor output)

linux, amd64

Editor name

nvim, vscode

v-analyzer Version

nightly

VS Code Extension Version

No response

@ttytm ttytm added the bug Something isn't working label Mar 31, 2024
@ttytm ttytm added this to the 0.x milestone Mar 31, 2024
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

1 participant