-
Notifications
You must be signed in to change notification settings - Fork 395
detect and warn about x64 R on Windows ARM #13790
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
Closed
Closed
+147
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Detects x64 R running on Windows ARM and provides helpful error message with ARM64 R download guidance instead of generic installation message. Implementation details: - Parses YAML output to detect architecture mismatch - Uses custom WindowsArmX64RError for type-safe error handling - Detects in both success and failure paths (emulation is intermittent) - Ensures error displays in quarto check output 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Deno.build.arch reports x86_64 even when x64 Deno runs on ARM64 hardware under emulation. Use Windows IsWow64Process2 API via FFI to detect the actual native hardware architecture. This fixes the x64-on-ARM detection so the custom error message displays instead of the generic "Please check your installation of R" message. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Performance improvements: - Check isX64R first to short-circuit when R is ARM64 (correct setup) - Only check ARM architecture when R fails (x64 R on ARM always crashes) - Avoids FFI overhead for all successful R checks Documentation: - Explains why kernel32.dll FFI is needed and safe - Links to validation repo and Microsoft API docs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
cderv
added a commit
that referenced
this pull request
Dec 22, 2025
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. This simpler approach checks exit codes directly rather than parsing YAML output to detect architecture strings. Closes #8730 Related: #13790
cderv
added a commit
that referenced
this pull request
Dec 22, 2025
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. This is the simplest possible approach: just check exit codes, no DLL calls. Closes #8730 Related: #13790
Collaborator
Author
|
As discussed, I think we'll start with simpler than trying to detect Windows ARM from deno x64 using a dll for Windows API. #13822 is about simplifying by checking error code. |
Use errorOnce() instead of rethrowing WindowsArmX64RError to prevent duplicate error messages when printCallRDiagnostics() calls knitrCapabilities() again. This scoped fix: - Only affects WindowsArmX64RError handling - Returns undefined like other knitrCapabilities errors - Doesn't change general error handling in callR() - Applies to both catch blocks that handle this error type
cderv
added a commit
that referenced
this pull request
Dec 22, 2025
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
cderv
added a commit
that referenced
this pull request
Jan 6, 2026
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
cderv
added a commit
that referenced
this pull request
Jan 13, 2026
* 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 detection
Collaborator
Author
|
This is closed in favor of #13822 But we'll keep the branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When x64 R fails on Windows ARM, parse YAML output to detect the architecture mismatch and provide a specific error message with ARM64 R download links instead of the generic "check your R installation" message.
Also adds platform information to quarto check output with warning when x64 R is detected on ARM Windows.
This is draft PR because I need to check this work as expected in windows ARM runner