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

zls crash when enter dot in print #1624

Closed
zhylmzr opened this issue Nov 24, 2023 · 0 comments · Fixed by #1626
Closed

zls crash when enter dot in print #1624

zhylmzr opened this issue Nov 24, 2023 · 0 comments · Fixed by #1626
Labels
bug Something isn't working

Comments

@zhylmzr
Copy link

zhylmzr commented Nov 24, 2023

Zig Version

0.12.0-dev.1697+6fc20b3b0

Zig Language Server Version

0.12.0-dev.251+38a1998

Steps to Reproduce

Kapture.2023-11-24.at.14.33.44.mp4

Expected Behavior

not crash

Actual Behavior

Zig Language Server Log
info : ( main ): Starting ZLS 0.12.0-dev.251+38a1998 @ '/Volumes/ext1/zhylmzr/Library/Application Support/Code/User/globalStorage/ziglang.vscode-zig/zls_install/zls'
info : (server): set config option 'builtin_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls/builtin.zig'
info : (server): set config option 'zig_lib_path' to '/Volumes/ext1/zhylmzr/zig/0.12.0-dev.1697+6fc20b3b0/files/lib'
info : (server): set config option 'zig_exe_path' to '/Volumes/ext1/zhylmzr/Person/Tool/zigup/zig'
info : (server): set config option 'build_runner_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls/build_runner_master.zig'
info : (server): set config option 'global_cache_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls'
info : (server): set config option 'build_runner_global_cache_path' to '/Volumes/ext1/zhylmzr/.cache/zig'
info : (server): client is 'Visual Studio Code-1.84.2'
info : (server): Server.ClientCapabilities{ .supports_snippets = true, .supports_apply_edits = true, .supports_will_save = true, .supports_will_save_wait_until = true, .supports_publish_diagnostics = true, .supports_code_action_fixall = true, .hover_supports_md = true, .completion_doc_supports_md = true, .label_details_support = true, .supports_configuration = true, .supports_workspace_did_change_configuration_dynamic_registration = true, .supports_textDocument_definition_linkSupport = true, .include_at_in_builtins = false, .max_detail_length = 1048576, .workspace_folders = { { 102, 105, 108, 101, 58, 47, 47, 47, 86, 111, 108, 117, 109, 101, 115, 47, 101, 120, 116, 49, 47, 122, 104, 121, 108, 109, 122, 114, 47, 80, 101, 114, 115, 111, 110, 47, 80, 108, 97, 121, 103, 114, 111, 117, 110, 100, 47, 122, 105, 103, 45, 104, 101, 108, 108, 111 } } }
info : (server): offset encoding: utf-16
info : (server): set config option 'semantic_tokens' to 'Config.Config__enum_4519.partial'
thread 59859 panic: index out of bounds
[Info  - 14:33:41] Connection to server got closed. Server will restart.
info : ( main ): Starting ZLS 0.12.0-dev.251+38a1998 @ '/Volumes/ext1/zhylmzr/Library/Application Support/Code/User/globalStorage/ziglang.vscode-zig/zls_install/zls'
info : (server): set config option 'builtin_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls/builtin.zig'
info : (server): set config option 'zig_lib_path' to '/Volumes/ext1/zhylmzr/zig/0.12.0-dev.1697+6fc20b3b0/files/lib'
info : (server): set config option 'zig_exe_path' to '/Volumes/ext1/zhylmzr/Person/Tool/zigup/zig'
info : (server): set config option 'build_runner_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls/build_runner_master.zig'
info : (server): set config option 'global_cache_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls'
info : (server): set config option 'build_runner_global_cache_path' to '/Volumes/ext1/zhylmzr/.cache/zig'
info : (server): client is 'Visual Studio Code-1.84.2'
info : (server): Server.ClientCapabilities{ .supports_snippets = true, .supports_apply_edits = true, .supports_will_save = true, .supports_will_save_wait_until = true, .supports_publish_diagnostics = true, .supports_code_action_fixall = true, .hover_supports_md = true, .completion_doc_supports_md = true, .label_details_support = true, .supports_configuration = true, .supports_workspace_did_change_configuration_dynamic_registration = true, .supports_textDocument_definition_linkSupport = true, .include_at_in_builtins = false, .max_detail_length = 1048576, .workspace_folders = { { 102, 105, 108, 101, 58, 47, 47, 47, 86, 111, 108, 117, 109, 101, 115, 47, 101, 120, 116, 49, 47, 122, 104, 121, 108, 109, 122, 114, 47, 80, 101, 114, 115, 111, 110, 47, 80, 108, 97, 121, 103, 114, 111, 117, 110, 100, 47, 122, 105, 103, 45, 104, 101, 108, 108, 111 } } }
info : (server): offset encoding: utf-16
thread 60249 panic: index out of bounds
[Info  - 14:33:41] Connection to server got closed. Server will restart.
info : ( main ): Starting ZLS 0.12.0-dev.251+38a1998 @ '/Volumes/ext1/zhylmzr/Library/Application Support/Code/User/globalStorage/ziglang.vscode-zig/zls_install/zls'
info : (server): set config option 'builtin_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls/builtin.zig'
info : (server): set config option 'zig_lib_path' to '/Volumes/ext1/zhylmzr/zig/0.12.0-dev.1697+6fc20b3b0/files/lib'
info : (server): set config option 'zig_exe_path' to '/Volumes/ext1/zhylmzr/Person/Tool/zigup/zig'
info : (server): set config option 'build_runner_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls/build_runner_master.zig'
info : (server): set config option 'global_cache_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls'
info : (server): set config option 'build_runner_global_cache_path' to '/Volumes/ext1/zhylmzr/.cache/zig'
info : (server): client is 'Visual Studio Code-1.84.2'
info : (server): Server.ClientCapabilities{ .supports_snippets = true, .supports_apply_edits = true, .supports_will_save = true, .supports_will_save_wait_until = true, .supports_publish_diagnostics = true, .supports_code_action_fixall = true, .hover_supports_md = true, .completion_doc_supports_md = true, .label_details_support = true, .supports_configuration = true, .supports_workspace_did_change_configuration_dynamic_registration = true, .supports_textDocument_definition_linkSupport = true, .include_at_in_builtins = false, .max_detail_length = 1048576, .workspace_folders = { { 102, 105, 108, 101, 58, 47, 47, 47, 86, 111, 108, 117, 109, 101, 115, 47, 101, 120, 116, 49, 47, 122, 104, 121, 108, 109, 122, 114, 47, 80, 101, 114, 115, 111, 110, 47, 80, 108, 97, 121, 103, 114, 111, 117, 110, 100, 47, 122, 105, 103, 45, 104, 101, 108, 108, 111 } } }
info : (server): offset encoding: utf-16
thread 60288 panic: index out of bounds
[Info  - 14:33:41] Connection to server got closed. Server will restart.
info : ( main ): Starting ZLS 0.12.0-dev.251+38a1998 @ '/Volumes/ext1/zhylmzr/Library/Application Support/Code/User/globalStorage/ziglang.vscode-zig/zls_install/zls'
info : (server): set config option 'builtin_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls/builtin.zig'
info : (server): set config option 'zig_lib_path' to '/Volumes/ext1/zhylmzr/zig/0.12.0-dev.1697+6fc20b3b0/files/lib'
info : (server): set config option 'zig_exe_path' to '/Volumes/ext1/zhylmzr/Person/Tool/zigup/zig'
info : (server): set config option 'build_runner_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls/build_runner_master.zig'
info : (server): set config option 'global_cache_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls'
info : (server): set config option 'build_runner_global_cache_path' to '/Volumes/ext1/zhylmzr/.cache/zig'
info : (server): client is 'Visual Studio Code-1.84.2'
info : (server): Server.ClientCapabilities{ .supports_snippets = true, .supports_apply_edits = true, .supports_will_save = true, .supports_will_save_wait_until = true, .supports_publish_diagnostics = true, .supports_code_action_fixall = true, .hover_supports_md = true, .completion_doc_supports_md = true, .label_details_support = true, .supports_configuration = true, .supports_workspace_did_change_configuration_dynamic_registration = true, .supports_textDocument_definition_linkSupport = true, .include_at_in_builtins = false, .max_detail_length = 1048576, .workspace_folders = { { 102, 105, 108, 101, 58, 47, 47, 47, 86, 111, 108, 117, 109, 101, 115, 47, 101, 120, 116, 49, 47, 122, 104, 121, 108, 109, 122, 114, 47, 80, 101, 114, 115, 111, 110, 47, 80, 108, 97, 121, 103, 114, 111, 117, 110, 100, 47, 122, 105, 103, 45, 104, 101, 108, 108, 111 } } }
info : (server): offset encoding: utf-16
info : (server): set config option 'semantic_tokens' to 'Config.Config__enum_4519.partial'
thread 60333 panic: index out of bounds
[Info  - 14:33:41] Connection to server got closed. Server will restart.
info : ( main ): Starting ZLS 0.12.0-dev.251+38a1998 @ '/Volumes/ext1/zhylmzr/Library/Application Support/Code/User/globalStorage/ziglang.vscode-zig/zls_install/zls'
info : (server): set config option 'builtin_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls/builtin.zig'
info : (server): set config option 'zig_lib_path' to '/Volumes/ext1/zhylmzr/zig/0.12.0-dev.1697+6fc20b3b0/files/lib'
info : (server): set config option 'zig_exe_path' to '/Volumes/ext1/zhylmzr/Person/Tool/zigup/zig'
info : (server): set config option 'build_runner_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls/build_runner_master.zig'
info : (server): set config option 'global_cache_path' to '/Volumes/ext1/zhylmzr/Library/Caches/zls'
info : (server): set config option 'build_runner_global_cache_path' to '/Volumes/ext1/zhylmzr/.cache/zig'
info : (server): client is 'Visual Studio Code-1.84.2'
info : (server): Server.ClientCapabilities{ .supports_snippets = true, .supports_apply_edits = true, .supports_will_save = true, .supports_will_save_wait_until = true, .supports_publish_diagnostics = true, .supports_code_action_fixall = true, .hover_supports_md = true, .completion_doc_supports_md = true, .label_details_support = true, .supports_configuration = true, .supports_workspace_did_change_configuration_dynamic_registration = true, .supports_textDocument_definition_linkSupport = true, .include_at_in_builtins = false, .max_detail_length = 1048576, .workspace_folders = { { 102, 105, 108, 101, 58, 47, 47, 47, 86, 111, 108, 117, 109, 101, 115, 47, 101, 120, 116, 49, 47, 122, 104, 121, 108, 109, 122, 114, 47, 80, 101, 114, 115, 111, 110, 47, 80, 108, 97, 121, 103, 114, 111, 117, 110, 100, 47, 122, 105, 103, 45, 104, 101, 108, 108, 111 } } }
info : (server): offset encoding: utf-16
thread 60406 panic: index out of bounds
[Error - 14:33:41] The Zig Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.

@zhylmzr zhylmzr added the bug Something isn't working label Nov 24, 2023
llogick pushed a commit that referenced this issue Nov 26, 2023
* pass correct handle in `collectVarAccessContainerNodes`

fixes #1624

* more clearly document the assumption that functions are ast nodes
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

Successfully merging a pull request may close this issue.

1 participant