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

R Interpreter fails to start on windows - Failed to convert R home to utf-8 #4374

Open
egillax opened this issue Aug 16, 2024 · 7 comments
Open
Labels
bug Something isn't working lang: r support
Milestone

Comments

@egillax
Copy link

egillax commented Aug 16, 2024

System details:

Positron and OS details:

Positron Version: 2024.08.0 (user setup) build 31
Code - OSS Version: 1.91.0
Commit: 7ee0596
Date: 2024-08-10T13:58:54.164Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.14393

Interpreter details:

R4.2.3

Describe the issue:

When starting up positron it fails to launch the R interpreter with:

R 4.2.3 starting.
R 4.2.3 failed to start up (exit code 0)

Then when I press the start console button I get the error and stacktrace below.

Steps to reproduce the issue:

Install positron from latest release on github 2024.08.0 build 31 and start it.

Expected or desired behavior:

Launches the R interpreter succesfully.

Were there any error messages in the UI, Output panel, or Developer Tools console?

Error in R console when starting R console manually:

Error: Socket disposed
e:\efridgeirsson\Positron\resources\app\extensions\positron-r\resources\ark\ark.exe --connection_file C:\Users\ADC59E~1\AppData\Local\Temp\2\kernel-9l6jwA\connection.json --log C:\Users\ADC59E~1\AppData\Local\Temp\2\kernel-9l6jwA\kernel.log --startup-file e:\efridgeirsson\Positron\resources\app\extensions\positron-r\resources\scripts\startup.R --session-mode console -- --interactive --no-restore-data 
  2024-08-16T09:02:45.848967Z ERROR  Panic! In file 'crates\ark\src\sys\windows\interface.rs' at line 134: Failed to convert R home to UTF-8. Path 'C:\Program Files\R\R-4.2.3'. Error: [87] The parameter is incorrect.

Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: tree_sitter_r
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: tree_sitter_r
  12: BaseThreadInitThunk
  13: RtlUserThreadStart.

Backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: tree_sitter_r
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: tree_sitter_r
  17: BaseThreadInitThunk
  18: RtlUserThreadStart

   at crates\ark\src/main.rs:482
Output from Positron R extension output channel
2024-08-16 05:00:26.445 [info] Log level: Debug
2024-08-16 05:00:26.445 [info] Checking for 'InstallPath' in registry key \Software\R-Core\R64 for hive HKCU
2024-08-16 05:00:26.446 [info] Refreshing testthat status
2024-08-16 05:00:26.446 [info] Not working in an R package
2024-08-16 05:00:26.446 [info] Context key 'testthatIsConfigured' is 'false'
2024-08-16 05:00:26.446 [info] Context key 'testthatHasTests' is 'false'
2024-08-16 05:00:27.829 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1:

ERROR: The system was unable to find the specified registry key or value.
2024-08-16 05:00:28.178 [info] Checking for 'InstallPath' in registry key \Software\WOW6432Node\R-Core\R64 for hive HKCU
2024-08-16 05:00:28.932 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1:

ERROR: The system was unable to find the specified registry key or value.
2024-08-16 05:00:29.291 [info] Checking for 'InstallPath' in registry key \Software\R-Core\R64 for hive HKLM
2024-08-16 05:00:30.331 [info] Identified the current version of R from the registry: C:\Program Files\R\R-4.2.3\bin\x64\R.exe
2024-08-16 05:00:30.368 [info] Candidate R binary at C:\Program Files\R\R-4.2.3\bin\x64\R.exe
2024-08-16 05:00:30.368 [info] R installation discovered: {
  "valid": true,
  "supported": true,
  "binpath": "C:\\Program Files\\R\\R-4.2.3\\bin\\x64\\R.exe",
  "homepath": "C:\\Program Files\\R\\R-4.2.3",
  "semVersion": {
    "options": {},
    "loose": false,
    "includePrerelease": false,
    "raw": "4.2.3",
    "major": 4,
    "minor": 2,
    "patch": 3,
    "prerelease": [],
    "build": [],
    "version": "4.2.3"
  },
  "version": "4.2.3",
  "arch": "x86_64",
  "current": true,
  "orthogonal": true
}
2024-08-16 05:00:41.432 [info] Checking for 'InstallPath' in registry key \Software\R-Core\R64 for hive HKCU
2024-08-16 05:00:42.046 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1:

ERROR: The system was unable to find the specified registry key or value.
2024-08-16 05:00:42.255 [info] Checking for 'InstallPath' in registry key \Software\WOW6432Node\R-Core\R64 for hive HKCU
2024-08-16 05:00:42.786 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1:

ERROR: The system was unable to find the specified registry key or value.
2024-08-16 05:00:42.980 [info] Checking for 'InstallPath' in registry key \Software\R-Core\R64 for hive HKLM
2024-08-16 05:00:43.440 [info] Identified the current version of R from the registry: C:\Program Files\R\R-4.2.3\bin\x64\R.exe
2024-08-16 05:00:43.461 [info] Candidate R binary at C:\Program Files\R\R-4.2.3\bin\x64\R.exe
2024-08-16 05:00:43.461 [info] R installation discovered: {
  "valid": true,
  "supported": true,
  "binpath": "C:\\Program Files\\R\\R-4.2.3\\bin\\x64\\R.exe",
  "homepath": "C:\\Program Files\\R\\R-4.2.3",
  "semVersion": {
    "options": {},
    "loose": false,
    "includePrerelease": false,
    "raw": "4.2.3",
    "major": 4,
    "minor": 2,
    "patch": 3,
    "prerelease": [],
    "build": [],
    "version": "4.2.3"
  },
  "version": "4.2.3",
  "arch": "x86_64",
  "current": true,
  "orthogonal": true
}
2024-08-16 05:00:43.461 [info] Candidate R binary at C:\Program Files\R\R-4.0.3\bin\x64\R.exe
2024-08-16 05:00:43.461 [info] R installation discovered: {
  "valid": true,
  "supported": false,
  "binpath": "C:\\Program Files\\R\\R-4.0.3\\bin\\x64\\R.exe",
  "homepath": "C:\\Program Files\\R\\R-4.0.3",
  "semVersion": {
    "options": {},
    "loose": false,
    "includePrerelease": false,
    "raw": "4.0.3",
    "major": 4,
    "minor": 0,
    "patch": 3,
    "prerelease": [],
    "build": [],
    "version": "4.0.3"
  },
  "version": "4.0.3",
  "arch": "x86_64",
  "current": false,
  "orthogonal": true
}
2024-08-16 05:00:43.462 [info] Candidate R binary at C:\Program Files\R\R-4.2.1\bin\x64\R.exe
2024-08-16 05:00:43.462 [info] R installation discovered: {
  "valid": true,
  "supported": true,
  "binpath": "C:\\Program Files\\R\\R-4.2.1\\bin\\x64\\R.exe",
  "homepath": "C:\\Program Files\\R\\R-4.2.1",
  "semVersion": {
    "options": {},
    "loose": false,
    "includePrerelease": false,
    "raw": "4.2.1",
    "major": 4,
    "minor": 2,
    "patch": 1,
    "prerelease": [],
    "build": [],
    "version": "4.2.1"
  },
  "version": "4.2.1",
  "arch": "x86_64",
  "current": false,
  "orthogonal": true
}
2024-08-16 05:00:43.462 [info] Filtering out C:\Program Files\R\R-4.0.3\bin\x64\R.exe: version is < 4.2.0
2024-08-16 05:00:58.579 [info] Log level: Debug
2024-08-16 05:00:58.579 [info] Refreshing testthat status
2024-08-16 05:00:58.579 [info] Not working in an R package
2024-08-16 05:00:58.579 [info] Context key 'testthatIsConfigured' is 'false'
2024-08-16 05:00:58.580 [info] Context key 'testthatHasTests' is 'false'
2024-08-16 05:00:59.649 [info] Checking for 'InstallPath' in registry key \Software\R-Core\R64 for hive HKCU
2024-08-16 05:01:00.525 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1:

ERROR: The system was unable to find the specified registry key or value.
2024-08-16 05:01:00.728 [info] Checking for 'InstallPath' in registry key \Software\WOW6432Node\R-Core\R64 for hive HKCU
2024-08-16 05:01:01.299 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1:

ERROR: The system was unable to find the specified registry key or value.
2024-08-16 05:01:01.518 [info] Checking for 'InstallPath' in registry key \Software\R-Core\R64 for hive HKLM
2024-08-16 05:01:02.117 [info] Identified the current version of R from the registry: C:\Program Files\R\R-4.2.3\bin\x64\R.exe
2024-08-16 05:01:02.130 [info] Candidate R binary at C:\Program Files\R\R-4.2.3\bin\x64\R.exe
2024-08-16 05:01:02.130 [info] R installation discovered: {
  "valid": true,
  "supported": true,
  "binpath": "C:\\Program Files\\R\\R-4.2.3\\bin\\x64\\R.exe",
  "homepath": "C:\\Program Files\\R\\R-4.2.3",
  "semVersion": {
    "options": {},
    "loose": false,
    "includePrerelease": false,
    "raw": "4.2.3",
    "major": 4,
    "minor": 2,
    "patch": 3,
    "prerelease": [],
    "build": [],
    "version": "4.2.3"
  },
  "version": "4.2.3",
  "arch": "x86_64",
  "current": true,
  "orthogonal": true
}
2024-08-16 05:01:02.130 [info] Candidate R binary at C:\Program Files\R\R-4.0.3\bin\x64\R.exe
2024-08-16 05:01:02.130 [info] R installation discovered: {
  "valid": true,
  "supported": false,
  "binpath": "C:\\Program Files\\R\\R-4.0.3\\bin\\x64\\R.exe",
  "homepath": "C:\\Program Files\\R\\R-4.0.3",
  "semVersion": {
    "options": {},
    "loose": false,
    "includePrerelease": false,
    "raw": "4.0.3",
    "major": 4,
    "minor": 0,
    "patch": 3,
    "prerelease": [],
    "build": [],
    "version": "4.0.3"
  },
  "version": "4.0.3",
  "arch": "x86_64",
  "current": false,
  "orthogonal": true
}
2024-08-16 05:01:02.130 [info] Candidate R binary at C:\Program Files\R\R-4.2.1\bin\x64\R.exe
2024-08-16 05:01:02.130 [info] R installation discovered: {
  "valid": true,
  "supported": true,
  "binpath": "C:\\Program Files\\R\\R-4.2.1\\bin\\x64\\R.exe",
  "homepath": "C:\\Program Files\\R\\R-4.2.1",
  "semVersion": {
    "options": {},
    "loose": false,
    "includePrerelease": false,
    "raw": "4.2.1",
    "major": 4,
    "minor": 2,
    "patch": 1,
    "prerelease": [],
    "build": [],
    "version": "4.2.1"
  },
  "version": "4.2.1",
  "arch": "x86_64",
  "current": false,
  "orthogonal": true
}
2024-08-16 05:01:02.130 [info] Filtering out C:\Program Files\R\R-4.0.3\bin\x64\R.exe: version is < 4.2.0
Console: R 4.2.3 Output Channels ```text 2024-08-16 05:00:39.427 [info] [Positron] Connecting to R 4.2.3 kernel (pid 10808) 2024-08-16 05:00:39.427 [info] [Positron] Streaming log file: C:\Users\ADC59E~1\AppData\Local\Temp\2\kernel-2mDzn1\kernel.log 2024-08-16 05:00:39.427 [info] [Positron] Connecting to kernel sockets defined in C:\Users\ADC59E~1\AppData\Local\Temp\2\kernel-2mDzn1\connection.json... 2024-08-16 05:00:39.427 [info] [Positron] Control socket created (count = 1) 2024-08-16 05:00:39.427 [info] [Positron] Shell socket created (count = 2) 2024-08-16 05:00:39.428 [info] [Positron] Stdin socket created (count = 3) 2024-08-16 05:00:39.432 [info] [Positron] I/O socket created (count = 4) 2024-08-16 05:00:39.432 [info] [Positron] Heartbeat socket created (count = 5) 2024-08-16 05:00:39.432 [info] [Positron] Control socket connecting to tcp://127.0.0.1:51789... 2024-08-16 05:00:39.432 [info] [Positron] Shell socket connecting to tcp://127.0.0.1:64749... 2024-08-16 05:00:39.432 [info] [Positron] Stdin socket connecting to tcp://127.0.0.1:61882... 2024-08-16 05:00:39.432 [info] [Positron] I/O socket connecting to tcp://127.0.0.1:41961... 2024-08-16 05:00:39.432 [info] [Positron] Heartbeat socket connecting to tcp://127.0.0.1:62386... 2024-08-16 05:00:39.432 [info] [Positron] Shell socket connected to tcp://127.0.0.1:64749 2024-08-16 05:00:39.433 [info] [Positron] I/O socket connected to tcp://127.0.0.1:41961 2024-08-16 05:00:39.433 [info] [Positron] Heartbeat socket connected to tcp://127.0.0.1:62386 2024-08-16 05:00:39.433 [info] [R] *** Log started at Fri 08/16/2024 5:00:36.62 2024-08-16 05:00:39.433 [info] [R] *** Command line: 2024-08-16 05:00:39.433 [info] [R] e:\efridgeirsson\Positron\resources\app\extensions\positron-r\resources\ark\ark.exe --connection_file C:\Users\ADC59E~1\AppData\Local\Temp\2\kernel-2mDzn1\connection.json --log C:\Users\ADC59E~1\AppData\Local\Temp\2\kernel-2mDzn1\kernel.log --startup-file e:\efridgeirsson\Positron\resources\app\extensions\positron-r\resources\scripts\startup.R --session-mode console -- --interactive --no-restore-data 2024-08-16 05:00:39.433 [info] [Positron] Control socket connected to tcp://127.0.0.1:51789 2024-08-16 05:00:39.433 [info] [Positron] Stdin socket connected to tcp://127.0.0.1:61882 2024-08-16 05:00:39.433 [info] [Positron] Establishing socket listeners... [Positron] Shell socket disconnected from tcp://127.0.0.1:64749 [Positron] I/O socket disconnected from tcp://127.0.0.1:41961 [Positron] Heartbeat socket disconnected from tcp://127.0.0.1:62386 [Positron] Control socket disconnected from tcp://127.0.0.1:51789 [Positron] Stdin socket disconnected from tcp://127.0.0.1:61882 [Positron] All 5 sockets disconnected; kernel exited [Positron] Last line of log file C:\Users\ADC59E~1\AppData\Local\Temp\2\kernel-2mDzn1\kernel.log does't name an exit code: Process exit code -1073740791

[R] 2: tree_sitter_r
[R] 3:
[R] 4:
[R] 5:
[R] 6:
[R] 7:
[R] 8:
[R] 9:
[R] 10:
[R] 11: tree_sitter_r
[R] 12: BaseThreadInitThunk
[R] 13: RtlUserThreadStart.
[R]
[R] Backtrace:
[R] 0:
[R] 1:
[R] 2:
[R] 3:
[R] 4:
[R] 5:
[R] 6:
[R] 7:
[R] 8: tree_sitter_r
[R] 9:
[R] 10:
[R] 11:
[R] 12:
[R] 13:
[R] 14:
[R] 15:
[R] 16: tree_sitter_r
[R] 17: BaseThreadInitThunk
[R] 18: RtlUserThreadStart
[R]
[R] at crates\ark\src/main.rs:482
[R]
[R] *** Log ended at Fri 08/16/2024 5:00:40.00

[R] Process exit code -1073740791

[R]
[Positron] R kernel status changed: starting => exited
2024-08-16 05:01:33.956 [info] [Positron] Connecting to R 4.2.3 kernel (pid 10936)
2024-08-16 05:01:33.957 [info] [Positron] Streaming log file: C:\Users\ADC59E1\AppData\Local\Temp\2\kernel-WmGBxr\kernel.log
2024-08-16 05:01:33.957 [info] [Positron] Connecting to kernel sockets defined in C:\Users\ADC59E
1\AppData\Local\Temp\2\kernel-WmGBxr\connection.json...
2024-08-16 05:01:33.957 [info] [Positron] Control socket created (count = 1)
2024-08-16 05:01:33.957 [info] [Positron] Shell socket created (count = 2)
2024-08-16 05:01:33.957 [info] [Positron] Stdin socket created (count = 3)
2024-08-16 05:01:33.957 [info] [Positron] I/O socket created (count = 4)
2024-08-16 05:01:33.957 [info] [Positron] Heartbeat socket created (count = 5)
2024-08-16 05:01:33.957 [info] [Positron] Control socket connecting to tcp://127.0.0.1:44876...
2024-08-16 05:01:33.957 [info] [Positron] Shell socket connecting to tcp://127.0.0.1:58116...
2024-08-16 05:01:33.958 [info] [Positron] Stdin socket connecting to tcp://127.0.0.1:65203...
2024-08-16 05:01:33.958 [info] [Positron] I/O socket connecting to tcp://127.0.0.1:46481...
2024-08-16 05:01:33.958 [info] [Positron] Heartbeat socket connecting to tcp://127.0.0.1:63833...
2024-08-16 05:01:33.958 [info] [R] *** Log started at Fri 08/16/2024 5:01:33.27
2024-08-16 05:01:33.958 [info] [R] *** Command line:
2024-08-16 05:01:33.958 [info] [R] e:\efridgeirsson\Positron\resources\app\extensions\positron-r\resources\ark\ark.exe --connection_file C:\Users\ADC59E1\AppData\Local\Temp\2\kernel-WmGBxr\connection.json --log C:\Users\ADC59E1\AppData\Local\Temp\2\kernel-WmGBxr\kernel.log --startup-file e:\efridgeirsson\Positron\resources\app\extensions\positron-r\resources\scripts\startup.R --session-mode console -- --interactive --no-restore-data
[Positron] Control socket still connecting (2s)
[Positron] Shell socket still connecting (2s)
[Positron] Stdin socket still connecting (2s)
[Positron] I/O socket still connecting (2s)
[Positron] Heartbeat socket still connecting (2s)
[Positron] Shell socket connected to tcp://127.0.0.1:58116
[Positron] Shell socket disconnected from tcp://127.0.0.1:58116
[Positron] All 5 sockets disconnected; kernel exited
[Positron] Last line of log file C:\Users\ADC59E~1\AppData\Local\Temp\2\kernel-WmGBxr\kernel.log does't name an exit code: Process exit code -1073740791

[R] 2: tree_sitter_r
[R] 3:
[R] 4:
[R] 5:
[R] 6:
[R] 7:
[R] 8:
[R] 9:
[R] 10:
[R] 11: tree_sitter_r
[R] 12: BaseThreadInitThunk
[R] 13: RtlUserThreadStart.
[R]
[R] Backtrace:
[R] 0:
[R] 1:
[R] 2:
[R] 3:
[R] 4:
[R] 5:
[R] 6:
[R] 7:
[R] 8: tree_sitter_r
[R] 9:
[R] 10:
[R] 11:
[R] 12:
[R] 13:
[R] 14:
[R] 15:
[R] 16: tree_sitter_r
[R] 17: BaseThreadInitThunk
[R] 18: RtlUserThreadStart
[R]
[R] at crates\ark\src/main.rs:482
[R]
[R] *** Log ended at Fri 08/16/2024 5:01:34.83

[R] Process exit code -1073740791

[R]
[Positron] R kernel status changed: starting => exited
[Positron] Connecting to R 4.2.3 kernel (pid 5680)
[Positron] Streaming log file: C:\Users\ADC59E1\AppData\Local\Temp\2\kernel-9l6jwA\kernel.log
[Positron] Connecting to kernel sockets defined in C:\Users\ADC59E
1\AppData\Local\Temp\2\kernel-9l6jwA\connection.json...
[Positron] Control socket created (count = 1)
[Positron] Shell socket created (count = 2)
[Positron] Stdin socket created (count = 3)
[Positron] I/O socket created (count = 4)
[Positron] Heartbeat socket created (count = 5)
[Positron] Control socket connecting to tcp://127.0.0.1:42605...
[Positron] Shell socket connecting to tcp://127.0.0.1:53888...
[Positron] Stdin socket connecting to tcp://127.0.0.1:52712...
[Positron] I/O socket connecting to tcp://127.0.0.1:55002...
[Positron] Heartbeat socket connecting to tcp://127.0.0.1:56977...
[Positron] I/O socket connected to tcp://127.0.0.1:55002
[Positron] Shell socket connected to tcp://127.0.0.1:53888
[Positron] Heartbeat socket connected to tcp://127.0.0.1:56977
[Positron] Stdin socket connected to tcp://127.0.0.1:52712
[Positron] Heartbeat socket disconnected from tcp://127.0.0.1:56977
[Positron] I/O socket disconnected from tcp://127.0.0.1:55002
[Positron] Shell socket disconnected from tcp://127.0.0.1:53888
[Positron] Stdin socket disconnected from tcp://127.0.0.1:52712
[Positron] All 5 sockets disconnected; kernel exited
[R] e:\efridgeirsson\Positron\resources\app\extensions\positron-r\resources\ark\ark.exe --connection_file C:\Users\ADC59E1\AppData\Local\Temp\2\kernel-9l6jwA\connection.json --log C:\Users\ADC59E1\AppData\Local\Temp\2\kernel-9l6jwA\kernel.log --startup-file e:\efridgeirsson\Positron\resources\app\extensions\positron-r\resources\scripts\startup.R --session-mode console -- --interactive --no-restore-data

[R] 2024-08-16T09:02:45.848967Z ERROR Panic! In file 'crates\ark\src\sys\windows\interface.rs' at line 134: Failed to convert R home to UTF-8. Path 'C:\Program Files\R\R-4.2.3'. Error: [87] The parameter is incorrect.
[R]
[R] Stack backtrace:
[R] 0:
[R] 1:
[R] 2: tree_sitter_r
[R] 3:
[R] 4:
[R] 5:
[R] 6:
[R] 7:
[R] 8:
[R] 9:
[R] 10:
[R] 11: tree_sitter_r
[R] 12: BaseThreadInitThunk
[R] 13: RtlUserThreadStart.
[R]
[R] Backtrace:
[R] 0:
[R] 1:
[R] 2:
[R] 3:
[R] 4:
[R] 5:
[R] 6:
[R] 7:
[R] 8: tree_sitter_r
[R] 9:
[R] 10:
[R] 11:
[R] 12:
[R] 13:
[R] 14:
[R] 15:
[R] 16: tree_sitter_r
[R] 17: BaseThreadInitThunk
[R] 18: RtlUserThreadStart
[R]
[R] at crates\ark\src/main.rs:482
[R]
[R]
[Positron] R kernel status changed: starting => exited
[Positron] Last line of log file C:\Users\ADC59E~1\AppData\Local\Temp\2\kernel-9l6jwA\kernel.log does't name an exit code: Process exit code -1073740791

</details>

@ravichowdhury88

This comment has been minimized.

@jaejhan

This comment has been minimized.

@juliasilge
Copy link
Contributor

@juliasilge juliasilge added lang: r bug Something isn't working support labels Aug 19, 2024
@juliasilge juliasilge added this to the Future milestone Aug 19, 2024
@juliasilge

This comment has been minimized.

@arthurgailes
Copy link

Getting this same issue on Windows Server 16:

R 4.3.1 starting.
R 4.3.1 failed to start up (exit code -1073740791)

The process exited abnormally (exit code: 0xc0000409)
thread 'main' panicked at crates\ark\src\sys\windows\interface.rs:151:13:
Failed to convert R home to UTF-8. Path 'L:\DataSets9\R\R-4.3.1'. Error: [87] The parameter is incorrect.

Stack backtrace:
0:
1:
2: tree_sitter_r
3:
4:
5:
6:
7:
8:
9:
10:
11:
12: tree_sitter_r
13: BaseThreadInitThunk
14: RtlUserThreadStart.
stack backtrace:

@juliasilge
Copy link
Contributor

This is not my area of expertise, but it looks like the error "The parameter is incorrect." is coming from Windows itself and is typically related to the OS finding something wrong as it tries to read a sector.

For future work, here is where we are trying to get Windows to give us a useful string:
https://github.com/posit-dev/ark/blob/main/crates/ark/src/sys/windows/strings.rs

We could add some more logging in there to get more details on where this OS error is getting thrown.

@jennybc
Copy link
Member

jennybc commented Dec 17, 2024

Another thread to pull on might be differences in the drive that Positron/ark is installed on vs. the drive that R is installed on? That seems to be a common thread in the above two examples.

e:\efridgeirsson\Positron\resources\app\extensions\positron-r\resources\ark\ark.exe
  --connection_file C:\Users\ADC59E~1\AppData\Local\Temp\2\kernel-9l6jwA\connection.json
  --log C:\Users\ADC59E~1\AppData\Local\Temp\2\kernel-9l6jwA\kernel.log
  --startup-file e:\efridgeirsson\Positron\resources\app\extensions\positron-r\resources\scripts\startup.R
...
Failed to convert R home to UTF-8. Path 'C:\Program Files\R\R-4.2.3'.

I suspect that more than one drive is also in play for @arthurgailes, given that R is at L:\DataSets9\R\R-4.3.1'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lang: r support
Projects
None yet
Development

No branches or pull requests

6 participants