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

[Bug]: null node argument error after ctrl+s (VSCode) #1223

Open
iharuspex opened this issue Nov 26, 2024 · 0 comments
Open

[Bug]: null node argument error after ctrl+s (VSCode) #1223

iharuspex opened this issue Nov 26, 2024 · 0 comments
Labels

Comments

@iharuspex
Copy link

Environment

  • OS and Version: Ubuntu 22.04.5
  • IDE Version: VSCode 1.95.3
  • Ada & SPARK Extension Version: v26.0.202411173

Bug Summary and Reproducer

Bug Summary:

[Error - 12:28:13 AM] Request textDocument/definition failed.
  Message: Exception: raised LANGKIT_SUPPORT.ERRORS.PRECONDITION_FAILURE : null node argument
Load address: 0x5c01044fd000

Steps to reproduce: This error occurs at random times, just when I'm typing code and press Ctrl+S

Expected behavior:

Configuration and Logs

"Ada: show extension output" log:

2024-11-27 00:23:44.113 [Ada Extension] INFO     Setting log level to: info 
2024-11-27 00:23:44.116 [Ada Extension] INFO     Starting Ada extension 
2024-11-27 00:23:44.118 [Ada Extension] INFO     Using ALS at: /home/haruspex/.vscode/extensions/adacore.ada-26.0.202411173-linux-x64/x64/linux/ada_language_server 
2024-11-27 00:23:44.130 [Ada Extension] INFO     Using ALS at: /home/haruspex/.vscode/extensions/adacore.ada-26.0.202411173-linux-x64/x64/linux/ada_language_server 
2024-11-27 00:23:44.363 [Ada Extension] INFO     Finished starting Ada extension 
2024-11-27 00:23:44.436 [Ada Extension] INFO     didChangeConfiguration event received 
2024-11-27 00:23:45.268 [Ada Extension] INFO     didChangeConfiguration event received 
2024-11-27 00:23:46.304 [Ada Extension] INFO     didChangeConfiguration event received 
2024-11-27 00:23:46.323 [Ada Extension] INFO     didChangeConfiguration event received 
2024-11-27 00:23:46.554 [Ada Extension] INFO     didChangeConfiguration event received 
2024-11-27 00:23:46.682 [Ada Extension] INFO     didChangeConfiguration event received 
2024-11-27 00:23:46.934 [Ada Extension] INFO     didChangeConfiguration event received 
2024-11-27 00:25:56.880 [Ada Extension] INFO     didChangeConfiguration event received 

ALS output:

Log directory is /home/haruspex/.als/ada_ls_log.2024-11-27T002344.log
[Error - 12:28:13 AM] Request textDocument/definition failed.
  Message: Exception: raised LANGKIT_SUPPORT.ERRORS.PRECONDITION_FAILURE : null node argument
Load address: 0x5c01044fd000
[/home/haruspex/.vscode/extensions/adacore.ada-26.0.202411173-linux-x64/x64/linux/ada_language_server]
0x5c0106f14314 Libadalang.Analysis.P_Fully_Qualified_Name at libadalang-analysis.adb:26099
0x5c0106cd71d2 Laltools.Common.Find_Other_Part_Fallback.Matches at laltools-common.adb:1200
0x5c0106e9ee49 Libadalang.Analysis.Traverse.Wrapper at libadalang-analysis.adb:36607
0x5c01072e5d24 Libadalang.Implementation.Traverse.Localalias at libadalang-implementation.adb:9039
0x5c01072e5dde Libadalang.Implementation.Traverse.Localalias at libadalang-implementation.adb:9051
0x5c01072e5dde Libadalang.Implementation.Traverse.Localalias at libadalang-implementation.adb:9051
0x5c01072e5dde Libadalang.Implementation.Traverse.Localalias at libadalang-implementation.adb:9051
0x5c01072e5dde Libadalang.Implementation.Traverse.Localalias at libadalang-implementation.adb:9051
0x5c01072e5dde Libadalang.Implementation.Traverse.Localalias at libadalang-implementation.adb:9051
0x5c01072e5dde Libadalang.Implementation.Traverse.Localalias at libadalang-implementation.adb:9051
0x5c01072e5dde Libadalang.Implementation.Traverse.Localalias at libadalang-implementation.adb:9051
0x5c01072e5dde Libadalang.Implementation.Traverse.Localalias at libadalang-implementation.adb:9051
0x5c0106f2e67a Libadalang.Analysis.Traverse at libadalang-analysis.adb:36616
0x5c0106d76a41 Laltools.Common.Find_Other_Part_Fallback at laltools-common.adb:1260
0x5c010676addf Lsp.Ada_Definition.Execute_Ada_Request at lsp-ada_definition.adb:248
0x5c01059bf683 Lsp.Ada_Request_Jobs.Execute_Request at lsp-ada_request_jobs.adb:33
0x5c01059bf459 Lsp.Server_Request_Jobs.Execute at lsp-server_request_jobs.adb:46
0x5c010599a6df Lsp.Job_Schedulers.Process_Job at lsp-job_schedulers.adb:191
0x5c010671dbd2 Lsp.Servers.Processing_Task_TypeT at lsp-servers.adb:848
0x5c010897974c system__tasking__stages__task_wrapper at ???
[/lib/x86_64-linux-gnu/libc.so.6]
0x7ce3ce494ac1
0x7ce3ce52684e
0xfffffffffffffffe

  Code: -32603 

Content of /home/haruspex/.als/ada_ls_log.2024-11-27T002344.log :

[ALS.MAIN] ALS version: 26.0w (20241117)
[ALS.MAIN] Initializing server ...
[ALS.MAIN] GPR PATH: /home/haruspex/.local/share/alire/builds/a0b_armv7m_0.1.0_8727264e/ceb9b59d4ab0269aa3bbf318fb0af2f4c8f207c61b9b3a51776fe80923a5a28e/gnat:/home/haruspex/.local/share/alire/builds/a0b_armv7m_systick_clock_0.1.0_46417dbd/347bad853012099edefa1af956fb55244434cfa31028505a338d9a33b6aad918/gnat:/home/haruspex/.local/share/alire/builds/a0b_base_0.2.0_b8702bfc/909be6b80a031bd0cb5e3cae01ecf773ab19276dda8d4d9864711c1b570546fe/gnat:/home/haruspex/.local/share/alire/builds/a0b_callbacks_0.1.0_2087a3c3/c4e91da6dda06525bb1ecf60a0311e33a4a6a0736ee00e118518e6fbdf4e6042/gnat:/home/haruspex/.local/share/alire/builds/a0b_exti_0.1.0_6090acf5/f120597af27aeb5540b2106f3db502b2cc084775a219b90a0197876c346459d7/gnat:/home/haruspex/.local/share/alire/builds/a0b_gpio_0.1.0_011067c7/08e08de9f7786b9f6f29a5f6b0cc8e25c964d643e2d1cd96af628801da7f1f90/gnat:/home/haruspex/.local/share/alire/builds/a0b_i2c_0.1.0_67a3e9f5/a0ff3533ee5867c72213568133bd850d82d6c6dcc5feff6323d861379578c1fb/gnat:/home/haruspex/.local/share/alire/builds/a0b_stm32f401_0.1.0_c9b0dbbe/1dfc64f3635c93b4a0f50f531d25b16033ff4a02be593e6f080ddad02b0b66d7/gnat:/home/haruspex/.local/share/alire/builds/a0b_stm32f401_gpio_0.1.0_ebe3a942/09292c356e97e85a51a0ced6d462952088cb0063458ce3c7c5481c6e9ca07006/gnat:/home/haruspex/.local/share/alire/builds/a0b_time_0.2.0_fe82dcef/fc32098e5a5c306ef177eb6dab825dccb8da6a0b07bcb4e1a2847ad2cdbca00f/gnat:/home/haruspex/projects/ada/blackpill_v12_a0b_playground:/home/haruspex/projects/ada/light-startup/blackpill_stm32f401/../gnat
[ALS.MAIN] PATH: /home/haruspex/.local/share/alire/toolchains/gprbuild_22.0.1_24dfc1b5/bin:/home/haruspex/.local/share/alire/toolchains/gnat_arm_elf_14.2.1_524d4d41/bin:/home/haruspex/apps/bin:/home/haruspex/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/arm/gcc-arm-none-eabi-10-2020-q4-major/bin/
[ALS.MAIN] Ada version used for predefined completion: ADA_2012
[ALS.MAIN] In Message_Handler Text_Document_Did_Open URI:
[ALS.MAIN] file:///home/haruspex/projects/ada/blackpill_v12_a0b_playground/src/drivers/lm75/a0b-i2c-lm75.ads
[ALS.PROJECT] Looking for a project in root: file:///home/haruspex/projects/ada/blackpill_v12_a0b_playground
[ALS.PROJECT] Loading:
[ALS.PROJECT] /home/haruspex/projects/ada/blackpill_v12_a0b_playground/simple_stm32_project.gpr
[ALS.PROJECT] Loading project: /home/haruspex/projects/ada/blackpill_v12_a0b_playground/simple_stm32_project.gpr
[ALS.PROJECT] Loading project with GPR2
[ALS.PROJECT] GPR2 messages after load:
   [ALS.PROJECT] No GPR2 messages
[ALS.PROJECT] Updating project sources
[ALS.PROJECT] GPR2 messages after updating sources:
   [ALS.PROJECT] No GPR2 messages
[ALS.PROJECT] Prepend Context Id: file:///home/haruspex/projects/ada/blackpill_v12_a0b_playground/simple_stm32_project.gpr
[ALS.PROJECT] Project status after loading: 
_ALS.PROJECT_ (PROJECT_TYPE => SINGLE_PROJECT_FOUND,
_ALS.PROJECT_  STATUS => VALID_PROJECT,
_ALS.PROJECT_  PROJECT_FILE => {GNATCOLL.VFS.VIRTUAL_FILE object},
_ALS.PROJECT_  MISSING_ADA_RUNTIME => FALSE,
_ALS.PROJECT_  GPR2_MESSAGES => {GPR2.LOG.OBJECT object})
[ALS.MAIN] Out Message_Handler Text_Document_Did_Open
[ALS.MAIN] In Message_Handler Text_Document_Did_Open URI:
[ALS.MAIN] file:///home/haruspex/projects/ada/blackpill_v12_a0b_playground/src/lm75.ads
[ALS.MAIN] Out Message_Handler Text_Document_Did_Open
[ALS.PROJECT] Reload_Project was called
[ALS.PROJECT] ada.projectFile is not set. We will try to find the project automatically.
[ALS.PROJECT] Looking for a project in root: file:///home/haruspex/projects/ada/blackpill_v12_a0b_playground
[ALS.PROJECT] Loading:
[ALS.PROJECT] /home/haruspex/projects/ada/blackpill_v12_a0b_playground/simple_stm32_project.gpr
[ALS.PROJECT] Loading project: /home/haruspex/projects/ada/blackpill_v12_a0b_playground/simple_stm32_project.gpr
[ALS.PROJECT] Loading project with GPR2
[ALS.PROJECT] GPR2 messages after load:
   [ALS.PROJECT] No GPR2 messages
[ALS.PROJECT] Updating project sources
[ALS.PROJECT] GPR2 messages after updating sources:
   [ALS.PROJECT] No GPR2 messages
[ALS.PROJECT] Prepend Context Id: file:///home/haruspex/projects/ada/blackpill_v12_a0b_playground/simple_stm32_project.gpr
[ALS.PROJECT] Project status after loading: 
_ALS.PROJECT_ (PROJECT_TYPE => SINGLE_PROJECT_FOUND,
_ALS.PROJECT_  STATUS => VALID_PROJECT,
_ALS.PROJECT_  PROJECT_FILE => {GNATCOLL.VFS.VIRTUAL_FILE object},
_ALS.PROJECT_  MISSING_ADA_RUNTIME => FALSE,
_ALS.PROJECT_  GPR2_MESSAGES => {GPR2.LOG.OBJECT object})
[ALS.MAIN] In Message_Handler Text_Document_Did_Open URI:
[ALS.MAIN] file:///home/haruspex/.local/share/alire/builds/a0b_callbacks_0.1.0_2087a3c3/c4e91da6dda06525bb1ecf60a0311e33a4a6a0736ee00e118518e6fbdf4e6042/source/a0b-callbacks.ads
[ALS.MAIN] Out Message_Handler Text_Document_Did_Open
[ALS.MAIN] Getting completions, Pos = ( 41,  15) Node = <Id "R" a0b-i2c-lm75.ads:41:14-41:15>
[ALS.MAIN] Number of filtered completions :  0
[ALS.MAIN] Getting completions, Pos = ( 41,  18) Node = <Id "Read" a0b-i2c-lm75.ads:41:14-41:18>
[ALS.MAIN] Number of filtered completions :  0
[ALS.MAIN] In Message_Handler Text_Document_Did_Open URI:
[ALS.MAIN] file:///home/haruspex/.local/share/alire/builds/a0b_callbacks_0.1.0_2087a3c3/c4e91da6dda06525bb1ecf60a0311e33a4a6a0736ee00e118518e6fbdf4e6042/source/a0b-callbacks.ads
[ALS.MAIN] Out Message_Handler Text_Document_Did_Open
[ALS.MAIN] In Message_Handler Text_Document_Did_Open URI:
[ALS.MAIN] file:///home/haruspex/.local/share/alire/builds/a0b_callbacks_0.1.0_2087a3c3/c4e91da6dda06525bb1ecf60a0311e33a4a6a0736ee00e118518e6fbdf4e6042/source/a0b-callbacks.ads
[ALS.MAIN] Out Message_Handler Text_Document_Did_Open
[ALS.MAIN] Getting completions, Pos = ( 49,  9) Node = <ErrorDecl [] a0b-i2c-lm75.ads:49:8-49:9>
[ALS.MAIN] Number of filtered completions :  0
[ALS.MAIN] Getting completions, Pos = ( 73,  5) Node = <ErrorDecl [] a0b-i2c-lm75.ads:73:4-73:5>
[ALS.MAIN] Number of filtered completions :  0
[ALS.MAIN] Getting completions, Pos = ( 73,  10) Node = <ErrorDecl [] a0b-i2c-lm75.ads:73:9-73:10>
[ALS.MAIN] Number of filtered completions :  0
[ALS.MAIN] Getting completions, Pos = ( 73,  10) Node = <ErrorDecl [] a0b-i2c-lm75.ads:73:9-73:10>
[ALS.MAIN] Number of filtered completions :  0
[ALS.MAIN] Getting completions, Pos = ( 73,  14) Node = <ErrorDecl [] a0b-i2c-lm75.ads:73:13-73:14>
[ALS.MAIN] Number of filtered completions :  0
[ALS.MAIN] Getting completions, Pos = ( 73,  17) Node = <ErrorDecl [] a0b-i2c-lm75.ads:73:16-73:17>
[ALS.MAIN] Number of filtered completions :  0
[ALS.MAIN] Getting completions, Pos = ( 73,  21) Node = <Id "A" a0b-i2c-lm75.ads:73:20-73:21>
[ALS.MAIN] Number of filtered completions :  10
[ALS.MAIN] Getting completions, Pos = ( 73,  24) Node = <DottedName a0b-i2c-lm75.ads:73:20-75:14>
[ALS.MAIN] Number of filtered completions :  13
[ALS.MAIN] Getting completions, Pos = ( 73,  34) Node = <DottedName a0b-i2c-lm75.ads:73:20-75:14>
[ALS.MAIN] Number of filtered completions :  9

Other VS Code Extensions

No response

Additional context

No response

@iharuspex iharuspex added the bug label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant