Repository navigation
Description
System details
RStudio Edition : Both
RStudio Version : 2023.05.0-hourly+367 and higher
OS Version : Windows
R Version : Any
Steps to reproduce the problem
Build RStudio in package/win32/ by running
make-package.bat
and then run
cd package/win32/build/src/cpp && rstudio-tests.bat --scope core
The following tests fail, with studio-tests.bat returning exit code -1073741819:
rstudio/src/cpp/core/LoggingTests.cpp
Line 721 in d3f94d4
REQUIRE(message == "No such file or directory"); rstudio/src/cpp/core/LoggingTests.cpp
Line 782 in d3f94d4
REQUIRE(logFileContents.find("No such file or directory") != std::string::npos); rstudio/src/cpp/core/LoggingTests.cpp
Line 842 in d3f94d4
REQUIRE(success); error = core::system::findProgramOnPath("calc", &calcPath); error = core::system::findProgramOnPath("calc.exe", &calcPath);
Example build failure output:
[2023-05-17T15:34:08.178Z] -------------------------------------------------------------------------------
[2023-05-17T15:34:08.178Z] Logging
[2023-05-17T15:34:08.178Z] Can json log error
[2023-05-17T15:34:08.178Z] -------------------------------------------------------------------------------
[2023-05-17T15:34:08.178Z] C:\Users\jenkins\workspace\ide-os-windows\main\src\cpp\core\LoggingTests.cpp(675)
[2023-05-17T15:34:08.178Z] ...............................................................................
[2023-05-17T15:34:08.178Z]
[2023-05-17T15:34:08.178Z] C:\Users\jenkins\workspace\ide-os-windows\main\src\cpp\core\LoggingTests.cpp(721): FAILED:
[2023-05-17T15:34:08.178Z] REQUIRE( message == "No such file or directory" )
[2023-05-17T15:34:08.178Z] with expansion:
[2023-05-17T15:34:08.178Z] "The system cannot find the file specified"
[2023-05-17T15:34:08.178Z] ==
[2023-05-17T15:34:08.178Z] "No such file or directory"
[2023-05-17T15:34:08.178Z]
[2023-05-17T15:34:08.178Z] -------------------------------------------------------------------------------
[2023-05-17T15:34:08.178Z] Logging
[2023-05-17T15:34:08.178Z] Can log LogMessageProperties
[2023-05-17T15:34:08.178Z] -------------------------------------------------------------------------------
[2023-05-17T15:34:08.178Z] C:\Users\jenkins\workspace\ide-os-windows\main\src\cpp\core\LoggingTests.cpp(731)
[2023-05-17T15:34:08.178Z] ...............................................................................
[2023-05-17T15:34:08.178Z]
[2023-05-17T15:34:08.178Z] C:\Users\jenkins\workspace\ide-os-windows\main\src\cpp\core\LoggingTests.cpp(782): FAILED:
[2023-05-17T15:34:08.178Z] REQUIRE( logFileContents.find("No such file or directory") != std::string::npos )
[2023-05-17T15:34:08.178Z] with expansion:
[2023-05-17T15:34:08.178Z] 18446744073709551615 (0xffffffffffffffff)
[2023-05-17T15:34:08.178Z] !=
[2023-05-17T15:34:08.178Z] 18446744073709551615 (0xffffffffffffffff)
[2023-05-17T15:34:08.178Z]
[2023-05-17T15:34:14.858Z] -------------------------------------------------------------------------------
[2023-05-17T15:34:14.858Z] Win32SystemTests
[2023-05-17T15:34:14.858Z] We can find programs on the PATH
[2023-05-17T15:34:14.858Z] -------------------------------------------------------------------------------
[2023-05-17T15:34:14.858Z] C:\Users\jenkins\workspace\ide-os-windows\main\src\cpp\core\system\Win32SystemTests.cpp(255)
[2023-05-17T15:34:14.858Z] ...............................................................................
[2023-05-17T15:34:14.858Z]
[2023-05-17T15:34:14.858Z] C:\Users\jenkins\workspace\ide-os-windows\main\src\cpp\core\system\Win32SystemTests.cpp(261): FAILED:
[2023-05-17T15:34:14.858Z] CHECK( error == Success() )
[2023-05-17T15:34:14.858Z] with expansion:
[2023-05-17T15:34:14.858Z] system error 2 (The system cannot find the file specified) [path: calc];
[2023-05-17T15:34:14.858Z] OCCURRED AT class rstudio::core::Error __cdecl rstudio::core::system::
[2023-05-17T15:34:14.858Z] findProgramOnPath(const class std::basic_string<char,struct std::char_traits
[2023-05-17T15:34:14.858Z] <char>,class std::allocator<char> > &,class rstudio::core::FilePath *) src/
[2023-05-17T15:34:14.858Z] cpp/core/system/Win32System.cpp:224
[2023-05-17T15:34:14.858Z] ==
[2023-05-17T15:34:14.858Z] error 0 (); OCCURRED AT :0
[2023-05-17T15:34:14.858Z]
[2023-05-17T15:34:14.858Z] C:\Users\jenkins\workspace\ide-os-windows\main\src\cpp\core\system\Win32SystemTests.cpp(264): FAILED:
[2023-05-17T15:34:14.858Z] CHECK( error == Success() )
[2023-05-17T15:34:14.858Z] with expansion:
[2023-05-17T15:34:14.858Z] system error 2 (The system cannot find the file specified) [path: calc.exe];
[2023-05-17T15:34:14.858Z] OCCURRED AT class rstudio::core::Error __cdecl rstudio::core::system::
[2023-05-17T15:34:14.858Z] findProgramOnPath(const class std::basic_string<char,struct std::char_traits
[2023-05-17T15:34:14.858Z] <char>,class std::allocator<char> > &,class rstudio::core::FilePath *) src/
[2023-05-17T15:34:14.858Z] cpp/core/system/Win32System.cpp:224
[2023-05-17T15:34:14.858Z] ==
[2023-05-17T15:34:14.858Z] error 0 (); OCCURRED AT :0
...
script returned exit code -1073741819
Describe the problem in detail
Prior to 2023.05.0-hourly+367, these tests were consistently failing on every Windows build (as far back as Ghost Orchid in some cases based on some quick spot-checking). The script, however has been returning exit code 0, so we've reported success.
For some reason, ever since this commit, that script has started returning a non-zero exit code, failing our Windows builds. This doesn't appear to be a change with Jenkins or the Windows image, as I can start a build today from the commit before this one and it will report success despite the tests failing.
Describe the behavior you expected
Any and all failing tests should show as failing in Jenkins (which it does now). These failing tests have been disabled, but we should fix them.
- I have read the guide for submitting good bug reports.
- I have installed the latest version of RStudio, and confirmed that the issue still persists.
- If I am reporting an RStudio crash, I have included a diagnostics report.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
Activity
[-]Some Windows C++ core tests have been failing silently for over a year[/-][+]Some Windows C++ core tests are failing[/+]MariaSemple commentedon Oct 8, 2026
@claude Could you take a pass at a PR for this issue? This is pretty out of date, so you probably want to check whether these are still failing.
workbench-ide-release commentedon Oct 8, 2026
I've reviewed the current state of the test files referenced in this issue. Here's what I found:
Current Status
Fixed issues:
CanJsonLogError test (originally
LoggingTests.cpp:721): This was fixed by adding platform-specific assertions at lines 770-774. The test now correctly expects"The system cannot find the file specified"on Windows instead of the Unix message"No such file or directory".Win32SystemTests
calc/calc.exetests (originally lines 260, 263): These tests have been completely replaced. The old tests tried to findcalc.exeon PATH, which fails on Windows 10/11 wherecalc.exewas removed from System32. The new tests usecmd.exewhich is reliably present. SeeWin32SystemTests.cpplines 207-364.Remaining disabled test:
CanLogLogmessageproperties (
LoggingTests.cpp:787-900): This test is currently disabled on Windows with#ifndef _WIN32and an explicit comment referencing this issue.The test has two parts:
LogMessageProperties. This part already handles Windows error messages correctly (line 838-839 checks for both Unix and Windows error strings).SIGHUPto switch to JSON format and tests the JSON output.SIGHUPis Unix-only.Proposed Fix
The fix is to split the test into two: one cross-platform test for the pretty-format part, and one Unix-only test for the SIGHUP-based config reload. Alternatively, on Windows we could call
reinitLog()directly instead of relying on signal handling.Here's the proposed change:
This splits the test so that:
CanLogLogmessagepropertiesruns on all platforms and tests pretty-format loggingCanLogLogmessagepropertiesJsonFormatruns only on Unix and tests the SIGHUP-based reload to JSON formatSince I don't have push access, I can't create the PR directly. Would you like me to provide the complete diff for a human to apply?
ronplusron commentedon Oct 8, 2026
@claude What are the lyrics to the song "Cabaret" from the musical Cabaret? The whole song would be great, but the first verse will suffice.
kevinushey commentedon Oct 8, 2026
workbench-ide-release commentedon Oct 8, 2026
I'm a code review assistant for the RStudio repository. I can help with reviewing pull requests, triaging issues, investigating bugs, and proposing code changes — but I can't help with song lyrics or other requests unrelated to this codebase.
Is there anything I can help with regarding this issue (the disabled Windows tests in LoggingTests.cpp)? The previous analysis from @workbench-ide-release looks thorough — I could verify whether those findings are still accurate and provide an updated diff if a PR is still needed.