zigtools / zls

A Zig language server supporting Zig developers with features like autocomplete and goto definition
MIT License
2.87k stars 290 forks source link

Panic: reached unreachable code #1923

Closed kython28 closed 1 month ago

kython28 commented 3 months ago

Zig Version

0.13.0

Zig Language Server Version

0.13.0

Client / Code Editor / Extensions

nvim 0.10.0

Steps to Reproduce and Observed Behavior

I don't have much idea how to do it, but basically, it has happened in several files. The most recent one I've tried to edit is: src/tensor/utils/fill.zig

There, when trying to import a file that is located at a lower level, the lsp server breaks.

Link: https://github.com/kython28/wekua/tree/890c2fc149b121319d58277b8c007db46eb8ae96

Expected Behavior

It shouldn't fail (?) and should be able to import without crashing the server.

Relevant log output

[ERROR][2024-06-17 20:01:16] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "thread 49322 panic: reached unreachable code\n"
[ERROR][2024-06-17 20:01:16] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/debug.zig:412:14: 0x1155748 in positionToIndex (zls)\n    if (!ok) unreachable; // assertion failure\n             ^\n"
[ERROR][2024-06-17 20:01:16] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/features/references.zig:425:49: 0x1176fb5 in referencesHandler (zls)\n    const source_index = offsets.positionToIndex(handle.tree.source, request.position(), server.offset_encoding);\n                                                ^\n"
[ERROR][2024-06-17 20:01:16] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/Server.zig:1514:54: 0x113c647 in sendRequestSync__anon_21786 (zls)\n    const response = try references.referencesHandler(server, arena, .{ .highlight = request });\n                                                     ^\n"
[ERROR][2024-06-17 20:01:16] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/Server.zig:1881:62: 0x10f9352 in processMessage (zls)\n                    const result = try server.sendRequestSync(arena_allocator.allocator(), @tagName(method), params);\n                                                             ^\n"
[ERROR][2024-06-17 20:01:16] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/Server.zig:1908:33: 0x10d5124 in processJob (zls)\n    return server.processMessage(message) catch |err| {\n                                ^\n"
[ERROR][2024-06-17 20:01:16] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:152:39: 0x10d4ce4 in runFn (zls)\n            @call(.auto, func, closure.arguments);\n                                      ^\n"
[ERROR][2024-06-17 20:01:16] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:191:18: 0x10e663f in entryFn (zls)\n            runFn(&run_node.data);\n                 ^\n"
[ERROR][2024-06-17 20:01:16] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/c.zig:239:13: 0x1306fb0 in clone (c)\n            asm volatile (\n            ^\n???:?:?: 0xaaaaaaaaaaaaaaa9 in ??? (???)\nUnwind information for `???:0xaaaaaaaaaaaaaaa9` was not available, trace may be incomplete\n\n"
[ERROR][2024-06-17 20:02:10] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/bin/clangd"   "stderr"    "I[20:02:10.079] <-- textDocument/didClose\nI[20:02:10.079] --> textDocument/publishDiagnostics\n"
[ERROR][2024-06-17 20:02:15] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/bin/clangd"   "stderr"    "I[20:02:15.461] <-- shutdown(3)\nI[20:02:15.461] --> reply:shutdown(3) 0 ms\n"
[ERROR][2024-06-17 20:02:15] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/bin/clangd"   "stderr"    "I[20:02:15.465] <-- exit\nI[20:02:15.465] LSP finished, exiting with status 0\n"
[WARN][2024-06-17 20:02:15] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 25): "
[ERROR][2024-06-17 20:02:15] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/bin/clangd"   "stderr"    "I[20:02:15.991] clangd version 17.0.6\nI[20:02:15.991] Features: linux\nI[20:02:15.991] PID: 49640\nI[20:02:15.991] Working directory: /usr/include/CL\nI[20:02:15.991] argv[0]: /usr/bin/clangd\nI[20:02:15.991] Starting LSP over stdin/stdout\nI[20:02:15.991] <-- initialize(1)\n"
[ERROR][2024-06-17 20:02:15] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/bin/clangd"   "stderr"    "I[20:02:15.992] --> reply:initialize(1) 1 ms\n"
[ERROR][2024-06-17 20:02:15] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/bin/clangd"   "stderr"    "I[20:02:15.993] <-- initialized\n"
[ERROR][2024-06-17 20:02:22] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "info : ( main ): Starting ZLS 0.13.0 @ '/usr/local/bin/zls'\ninfo : (server): Client is 'Neovim-0.10.0-dev'\n"
[ERROR][2024-06-17 20:02:22] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "info : (server): Set config option 'builtin_path' to '/<...>/.cache/zls/builtin.zig'\ninfo : (server): Set config option 'zig_lib_path' to '/usr/lib/zig'\ninfo : (server): Set config option 'zig_exe_path' to '/usr/bin/zig'\ninfo : (server): Set config option 'build_runner_path' to '/<...>/.cache/zls/build_runner/21872970afd69e48a0847077e5196711/build_runner.zig'\ninfo : (server): Set config option 'global_cache_path' to '<...>/.cache/zls'\n"
[ERROR][2024-06-17 20:24:43] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "warning: (store ): Document already open: file:///<...>/wekua/src/utils/work_items.zig\n"
[ERROR][2024-06-17 20:39:27] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "warning: (store ): Document already open: file:///<...>/wekua/tests/utils/utils.zig\n"
[ERROR][2024-06-17 21:45:39] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "error: (server): failed to process notification-textDocument/didChange: error.InvalidParams\n"
[ERROR][2024-06-17 21:45:40] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "error: (server): failed to process notification-textDocument/didChange: error.InvalidParams\n"
[ERROR][2024-06-17 21:47:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "thread 49660 panic: index out of bounds\n"
[ERROR][2024-06-17 21:47:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/analysis.zig:0:0: 0x1176be0 in getPositionContext (zls)\n"
[ERROR][2024-06-17 21:47:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/features/references.zig:428:56: 0x117702b in referencesHandler (zls)\n    const pos_context = try Analyser.getPositionContext(server.allocator, handle.tree.source, source_index, true);\n                                                       ^\n"
[ERROR][2024-06-17 21:47:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/Server.zig:1514:54: 0x113c647 in sendRequestSync__anon_21786 (zls)\n"
[ERROR][2024-06-17 21:47:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "    const response = try references.referencesHandler(server, arena, .{ .highlight = request });\n                                                     ^\n"
[ERROR][2024-06-17 21:47:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/Server.zig:1881:62: 0x10f9352 in processMessage (zls)\n                    const result = try server.sendRequestSync(arena_allocator.allocator(), @tagName(method), params);\n                                                             ^\n"
[ERROR][2024-06-17 21:47:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/Server.zig:1908:33: 0x10d5124 in processJob (zls)\n"
[ERROR][2024-06-17 21:47:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "    return server.processMessage(message) catch |err| {\n                                ^\n"
[ERROR][2024-06-17 21:47:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:152:39: 0x10d4ce4 in runFn (zls)\n            @call(.auto, func, closure.arguments);\n                                      ^\n"
[ERROR][2024-06-17 21:47:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:191:18: 0x10e663f in entryFn (zls)\n            runFn(&run_node.data);\n                 ^\n"
[ERROR][2024-06-17 21:47:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/c.zig:239:13: 0x1306fb0 in clone (c)\n"
[ERROR][2024-06-17 21:47:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "            asm volatile (\n            ^\n???:?:?: 0xaaaaaaaaaaaaaaa9 in ??? (???)\nUnwind information for `???:0xaaaaaaaaaaaaaaa9` was not available, trace may be incomplete\n\n"

[ERROR][2024-06-17 21:49:14] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "thread 64386 panic: reached unreachable code\n"
[ERROR][2024-06-17 21:49:14] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/debug.zig:412:14: 0x1155748 in positionToIndex (zls)\n    if (!ok) unreachable; // assertion failure\n             ^\n"
[ERROR][2024-06-17 21:49:14] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/features/references.zig:425:49: 0x1176fb5 in referencesHandler (zls)\n    const source_index = offsets.positionToIndex(handle.tree.source, request.position(), server.offset_encoding);\n                                                ^\n"
[ERROR][2024-06-17 21:49:14] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/Server.zig:1514:54: 0x113c647 in sendRequestSync__anon_21786 (zls)\n"
[ERROR][2024-06-17 21:49:14] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "    const response = try references.referencesHandler(server, arena, .{ .highlight = request });\n                                                     ^\n"
[ERROR][2024-06-17 21:49:14] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/Server.zig:1881:62: 0x10f9352 in processMessage (zls)\n                    const result = try server.sendRequestSync(arena_allocator.allocator(), @tagName(method), params);\n                                                             ^\n"
[ERROR][2024-06-17 21:49:14] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/Server.zig:1908:33: 0x10d5124 in processJob (zls)\n"
[ERROR][2024-06-17 21:49:14] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "    return server.processMessage(message) catch |err| {\n                                ^\n"
[ERROR][2024-06-17 21:49:14] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:152:39: 0x10d4ce4 in runFn (zls)\n            @call(.auto, func, closure.arguments);\n                                      ^\n"
[ERROR][2024-06-17 21:49:14] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:191:18: 0x10e663f in entryFn (zls)\n            runFn(&run_node.data);\n                 ^\n"
[ERROR][2024-06-17 21:49:14] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/c.zig:239:13: 0x1306fb0 in clone (c)\n            asm volatile (\n            ^\n???:?:?: 0xaaaaaaaaaaaaaaa9 in ??? (???)\nUnwind information for `???:0xaaaaaaaaaaaaaaa9` was not available, trace may be incomplete\n\n"

[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "thread 65000 panic: reached unreachable code\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/debug.zig:412:14: 0x1155748 in positionToIndex (zls)\n    if (!ok) unreachable; // assertion failure\n             ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/features/references.zig:425:49: 0x1176fb5 in referencesHandler (zls)\n    const source_index = offsets.positionToIndex(handle.tree.source, request.position(), server.offset_encoding);\n                                                ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/Server.zig:1514:54: 0x113c647 in sendRequestSync__anon_21786 (zls)\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "    const response = try references.referencesHandler(server, arena, .{ .highlight = request });\n                                                     ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/Server.zig:1881:62: 0x10f9352 in processMessage (zls)\n                    const result = try server.sendRequestSync(arena_allocator.allocator(), @tagName(method), params);\n                                                             ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "<...>/zls/src/Server.zig:1908:33: 0x10d5124 in processJob (zls)\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "    return server.processMessage(message) catch |err| {\n                                ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:152:39: 0x10d4ce4 in runFn (zls)\n            @call(.auto, func, closure.arguments);\n                                      ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:191:18: 0x10e663f in entryFn (zls)\n            runFn(&run_node.data);\n                 ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/c.zig:239:13: 0x"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "1306fb0 in clone (c)\n            asm volatile (\n            ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "???:?:?: 0xaaaaaaaaaaaaaaa9 in ??? (???)\nUnwind information for `???:0xaaaaaaaaaaaaaaa9` was not available, trace may be incomplete\n\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "thread 64999 panic: reached unreachable code\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/debug.zig:412:14: 0x1155748 in positionToIndex (zls)\n    if (!ok) unreachable; // assertion failure\n             ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/features/references.zig:425:49: 0x1176fb5 in referencesHandler (zls)\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "    const source_index = offsets.positionToIndex(handle.tree.source, request.position(), server.offset_encoding);\n                                                ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/Server.zig:1514:54: 0x113c647 in sendRequestSync__anon_21786 (zls)\n    const response = try references.referencesHandler(server, arena, .{ .highlight = request });\n                                                     ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/Server.zig:1881:62: 0x10f9352 in processMessage (zls)\n                    const result = try server.sendRequestSync(arena_allocator.allocator(), @tagName(method), params);\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "                                                             ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/Server.zig:1908"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    ":33: 0x10d5124 in processJob (zls)\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "    return server.processMessage(message) catch |err| {\n                                "
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:152:39: 0x10d4ce4 in runFn (zls)\n            @call(.auto, func, closure.arguments);\n                                      ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:191:18: 0x10e663f in entryFn (zls)\n            runFn(&run_node.data);\n                 ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/c.zig:239:13: 0x1306fb0 in clone (c)\n            asm volatile (\n            ^\n???:?:?: 0xaaaaaaaaaaaaaaa9 in ??? (???)\nUnwind information for `???:0xaaaaaaaaaaaaaaa9` was not available, trace may be incomplete\n\nthread 64997 panic: reached unreachable code\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/debug.zig:412:14: 0x1155748 in positionToIndex (zls)\n    if (!ok) unreachable; // assertion failure\n             ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/features/references.zig:425:49: 0x1176fb5 in referencesHandler (zls)\n    const source_index = offsets.positionToIndex(handle.tree.source, request.position(), server.offset_encoding);\n                                                ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/Server.zig:1514:54: 0x113c647 in sendRequestSync__anon_21786 (zls)\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "    const response = try references.referencesHandler(server, arena, .{ .highlight = request });\n                                                     ^"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/Server.zig:1881:62: 0x10f9352 in processMessage (zls)\n                    const result = try server.sendRequestSync(arena_allocator.allocator(), @tagName(method), params);\n                                                             ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/Server.zig:1908:33: 0x10d5124 in processJob (zls)\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "    return server.processMessage(message) catch |err| {\n                                ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:152:39: 0x10d4ce4 in runFn (zls)\n            @call(.auto, func, closure.arguments);\n                                      ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:191:18: 0x10e663f in entryFn (zls)\n            runFn(&run_node.data);\n                 ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/c.zig:239:13: 0x1306fb0 in clone (c)\n            asm volatile (\n            ^\n???:?:?: 0xaaaaaaaaaaaaaaa9 in ??? (???)\nUnwind information for `???:0xaaaaaaaaaaaaaaa9` was not available, trace may be incomplete\n\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "thread 64998"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    " panic: reached unreachable code\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/debug.zig:412:14: 0x1155748 in positionToIndex (zls)\n    if (!ok) unreachable; // assertion failure\n             ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/features/references.zig:425:49: 0x1176fb5 in referencesHandler (zls)\n    const source_index = offsets.positionToIndex(handle.tree.source, request.position(), server.offset_encoding);\n                                                ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/Server.zig:1514:54: 0x113c647 in sendRequestSync__anon_21786 (zls)\n    const response = try references.referencesHandler(server, arena, .{ .highlight = request });\n                                                     ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/<...>/zls/src/Server.zig:1881:62: 0x10f9352 in processMessage (zls)\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "                    const result = try server.sendRequestSync(arena_allocator.allocator(), @tagName(method), params);\n                                                             ^\n/<...>/zls/src/Server.zig:1908:33"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    ": 0x10d5124 in processJob (zls)\n    return server.processMessage(message) catch |err| {\n                                ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:152:39: 0x10d4ce4 in runFn (zls)\n            @call(.auto, func, closure.arguments);\n                                      ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/std/Thread/Pool.zig:191:18: 0x10e663f in entryFn (zls)\n            runFn(&run_node.data);\n                 ^\n"
[ERROR][2024-06-17 21:56:04] .../vim/lsp/rpc.lua:770    "rpc"   "/usr/local/bin/zls"    "stderr"    "/usr/lib/zig/c.zig:239:13: 0x1306fb0 in clone (c)\n            asm volatile (\n            ^\n???:?:?: 0xaaaaaaaaaaaaaaa9 in ??? (???)\nUnwind information for `???:0xaaaaaaaaaaaaaaa9` was not available, trace may be incomplete\n\n"
Techatrix commented 3 months ago

This could be related to #1537

fithisux commented 2 months ago

Same with Theia IDE on Windows 10 Pro x64, version 0.13.0.

But after removing everything it works with VSCode 1.91.0.

I do not remember doing anything extraordinary

dismint commented 2 months ago

this happens to me all the time, i can try to find a reproducible example if needed as well.

Techatrix commented 1 month ago

The provided logs are a bit hard to read but based on what I can decipher, the first error that occurred is the following:

failed to process notification-textDocument/didChange: error.InvalidParams

This is the same error message that happened in #1537 which has been fixed by #2002. So I believe that this issue should be resolved as well.

If this issue is still happening, please open a new issue.