Commit c99ac47
authored
fix(R): detect x64 R on Windows ARM via exit codes (#13822)
* fix: detect x64 R on Windows ARM via exit codes
When x64 R crashes on Windows ARM, detect specific exit codes and provide
helpful error message instead of generic "check your R installation".
Detects two crash scenarios:
- Native ARM hardware: -1073741569 (STATUS_NOT_SUPPORTED)
- Windows ARM VM on Mac: -1073741819 (STATUS_ACCESS_VIOLATION)
Both occur when rmarkdown package loads under x64 emulation. R script
completes successfully and produces YAML before crashing during cleanup.
These error codes are unique to x64 R on ARM Windows, so checking them
directly is sufficient without needing to verify ARM hardware via Windows API.
Closes #8730
Related: #13790
* docs: add issue and test repo links to ARM detection comment
Add references to issue #8730 and quarto-windows-arm test repository
in code comments to help future contributors understand the context.
* fix: improve Windows ARM x64 R error message
Make error message more actionable:
- Show detected error code
- Explain x64 R on Windows ARM issue
- Provide step-by-step fix instructions
- Link to issue #8730 for context
* fix: prevent duplicate Windows ARM x64 R error message
Use errorOnce() instead of rethrowing WindowsArmX64RError to prevent
duplicate error messages when printCallRDiagnostics() calls
knitrCapabilities() again. Returns undefined like other knitrCapabilities
errors without changing general error handling in callR().
* refactor: extract x64-on-ARM check into throwIfX64ROnArm()
Extract x64 R crash detection into helper function for better code
organization. Function name clearly indicates it throws on detection.
* docs: add changelog entry for Windows ARM x64 R detection1 parent f82f02d commit c99ac47
2 files changed
Lines changed: 41 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
71 | 102 | | |
72 | 103 | | |
73 | 104 | | |
| |||
115 | 146 | | |
116 | 147 | | |
117 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
118 | 158 | | |
119 | 159 | | |
120 | | - | |
121 | 160 | | |
122 | 161 | | |
123 | 162 | | |
| |||
0 commit comments