VLS crashes after 5-10 minutes of using it with VSCode.
System Information
V doctor
OS: windows, Windows 10 Pro v19044 64
Processor: 12 cpus, 64bit, little endian, AMD Ryzen 5 1600 Six-Core Processor
CC version: cc (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) 12.1.0
getwd: C:\Users\user
vmodules: C:\Users\user\.vmodules
vroot: C:\v
vexe: C:\v\v.exe
vexe mtime: 2022-07-06 19:53:45
is vroot writable: true
is vmodules writable: true
V full version: V 0.3.0 b5f2636.426421b
Git version: git version 2.34.1.windows.1
Git vroot status: 0.3-56-g426421be (8 commit(s) behind V master)
.git/config present: true
thirdparty/tcc status: thirdparty-windows-amd64 125e21e2
VLS info
vls version 0.0.1.95b446e
Problem Description
After using VLS in VSCode for about 5-10 minutes, VLS crashes.
Expected Output
Not having an error.
Actual Output
Request textDocument/documentSymbol failed.
Error: Connection got disposed.
at Object.dispose (c:\Users\user\.vscode\extensions\vlanguage.vscode-vlang-0.1.13\out\extension.js:29:4057)
at Object.dispose (c:\Users\user\.vscode\extensions\vlanguage.vscode-vlang-0.1.13\out\extension.js:34:9518)
at Vf.handleConnectionClosed (c:\Users\user\.vscode\extensions\vlanguage.vscode-vlang-0.1.13\out\extension.js:36:9070)
at Vf.handleConnectionClosed (c:\Users\user\.vscode\extensions\vlanguage.vscode-vlang-0.1.13\out\extension.js:39:12201)
at n (c:\Users\user\.vscode\extensions\vlanguage.vscode-vlang-0.1.13\out\extension.js:36:8752)
at Pu.invoke (c:\Users\user\.vscode\extensions\vlanguage.vscode-vlang-0.1.13\out\extension.js:2:9583)
at Tr.fire (c:\Users\user\.vscode\extensions\vlanguage.vscode-vlang-0.1.13\out\extension.js:2:10348)
at it (c:\Users\user\.vscode\extensions\vlanguage.vscode-vlang-0.1.13\out\extension.js:3:10845)
at Pu.invoke (c:\Users\user\.vscode\extensions\vlanguage.vscode-vlang-0.1.13\out\extension.js:2:9583)
at Tr.fire (c:\Users\user\.vscode\extensions\vlanguage.vscode-vlang-0.1.13\out\extension.js:2:10348)
at jo.fireClose (c:\Users\user\.vscode\extensions\vlanguage.vscode-vlang-0.1.13\out\extension.js:2:12622)
at Socket.<anonymous> (c:\Users\user\.vscode\extensions\vlanguage.vscode-vlang-0.1.13\out\extension.js:2:14174)
at Socket.emit (node:events:402:35)
at Pipe.<anonymous> (node:net:687:12)
Steps to Reproduce
Open Visual Studio Code with VLS enabled in the V extension and start editing the file for some time.
Last Recorded LSP Requests
Here's the error in the error report that VLS produces:
================ V panic ================
module: ropes
function: split()
message: rope split out of bounds -1/26185
file: D:/a/vls/vls/vls/ropes/ropes.v:106
v hash: 59d6ca0
=========================================
libbacktrace: og_b(x: a19a320
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
@zeozeozeo seeing the panic, what was the last thing you did when you edit your source code? (example: did you add two characters or deleted a word)
this would help me reproduce the error and solve it. thanks :)
@zeozeozeo seeing the panic, what was the last thing you did when you edit your source code? (example: did you add two characters or deleted a word)
this would help me reproduce the error and solve it. thanks :)
Just tried it again and the error happened when I added a few characters or a new line.
Can confirm that, having the same issue with me too.
@kiwimoe @zeozeozeo Hi, sorry for the late response was on a break. I have encountered issues on my side and fixed it in https://github.com/vlang/vls/commit/5251fe7c586f083e6474a9dccd0928a1e4e29385 . Let me know if it fixed your issues before we can close it. Thanks! 😃
thank you!