Why does gradle throw LocationAwareException when using DataLogManager under google test?

Our robot code is in C++ and we are trying to test our code by seeing if the robot log file matches the expected (correct) log file. We plan to run a google test that calls the appropriate timed robot methods, which will create the robot log and after that we will compare the log file to the expected log file.

However, every time DataLogManager is used under a google test, gradle throws a LocationAwareException. The test passes, and the log file contains the correct information, but gradle fails with LocationAwareException. This is the gradle log when run with --info --scan --stacktrace:

> Task :runFrcUserProgramTestLinuxx86-64ReleaseGoogleTestExe FAILED
Caching disabled for task ':runFrcUserProgramTestLinuxx86-64ReleaseGoogleTestExe' because:
  Build cache is disabled
  Not made cacheable, yet
Task ':runFrcUserProgramTestLinuxx86-64ReleaseGoogleTestExe' is not up-to-date because:
  Task has failed previously.
Watching 76 directories to track changes
Starting process 'command '/home/gabi/git/testing_elevatorsim/build/install/frcUserProgramTest/linuxx86-64/release/frcUserProgramTest''. Working directory: /home/gabi/git/testing_elevatorsim/build/test-results/frcUserProgramTest/linuxx86-64/release Command: /home/gabi/git/testing_elevatorsim/build/install/frcUserProgramTest/linuxx86-64/release/frcUserProgramTest 
Successfully started process 'command '/home/gabi/git/testing_elevatorsim/build/install/frcUserProgramTest/linuxx86-64/release/frcUserProgramTest''
HAL Extensions: No extensions found
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from SimulationTest
[ RUN      ] SimulationTest.InitTest
testing
Not loading CameraServerShared
NT: could not open persistent file 'networktables.json': No such file or directory (this can be ignored if you aren't expecting persistent values)
NT: Listening on NT3 port 1735, NT4 port 5810
DataLog: Logging to '/home/gabi/git/testing_elevatorsim/build/test-results/frcUserProgramTest/linuxx86-64/release/FRC_TBD_0cfac462436d3ee7.wpilog'
[       OK ] SimulationTest.InitTest (12 ms)
[----------] 1 test from SimulationTest (12 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (12 ms total)
[  PASSED  ] 1 test.
Watching 77 directories to track changes
:runFrcUserProgramTestLinuxx86-64ReleaseGoogleTestExe (Thread[Execution worker Thread 2,5,main]) completed. Took 1.947 secs.
Build Exception: class org.gradle.internal.exceptions.LocationAwareException -> Execution failed for task ':runFrcUserProgramTestLinuxx86-64ReleaseGoogleTestExe'.
Build Exception: class org.gradle.api.tasks.TaskExecutionException -> Execution failed for task ':runFrcUserProgramTestLinuxx86-64ReleaseGoogleTestExe'.
Build Exception: class org.gradle.api.GradleException -> There were failing tests. See the results at: file:///home/gabi/git/testing_elevatorsim/build/test-results/frcUserProgramTest/linuxx86-64/release/
Build Exception: class org.gradle.process.internal.ExecException -> Process 'command '/home/gabi/git/testing_elevatorsim/build/install/frcUserProgramTest/linuxx86-64/release/frcUserProgramTest'' finished with non-zero exit value 139
Exception Task: class org.gradle.nativeplatform.test.tasks.RunTestExecutable_Decorated -> runFrcUserProgramTestLinuxx86-64ReleaseGoogleTestExe

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':runFrcUserProgramTestLinuxx86-64ReleaseGoogleTestExe'.
> There were failing tests. See the results at: file:///home/gabi/git/testing_elevatorsim/build/test-results/frcUserProgramTest/linuxx86-64/release/

* Try:
> Run with --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':runFrcUserProgramTestLinuxx86-64ReleaseGoogleTestExe'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:142)
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:140)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:128)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:69)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:327)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:314)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:307)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:293)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:420)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:342)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
Caused by: org.gradle.api.GradleException: There were failing tests. See the results at: file:///home/gabi/git/testing_elevatorsim/build/test-results/frcUserProgramTest/linuxx86-64/release/
        at org.gradle.nativeplatform.test.tasks.RunTestExecutable.handleTestFailures(RunTestExecutable.java:72)
        at org.gradle.nativeplatform.test.tasks.RunTestExecutable.exec(RunTestExecutable.java:59)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
        at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:236)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:221)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:204)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:187)
        at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:165)
        at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:89)
        at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:40)
        at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:53)
        at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:50)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:50)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:40)
        at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:68)
        at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:38)
        at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
        at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
        at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:29)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.executeDelegateBroadcastingChanges(CaptureStateAfterExecutionStep.java:124)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:80)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:58)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:36)
        at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:181)
        at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:71)
        at org.gradle.internal.Either$Right.fold(Either.java:175)
        at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59)
        at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:69)
        at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:47)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:36)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:25)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:110)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:56)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:56)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:73)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:44)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:89)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:50)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:114)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:57)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:76)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:50)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.executeWithNoEmptySources(SkipEmptyWorkStep.java:254)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:91)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:56)
        at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:32)
        at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:21)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
        at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:43)
        at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:31)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40)
        at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:281)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:40)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:44)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:33)
        at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:139)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:128)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:69)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:327)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:314)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:307)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:293)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:420)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:342)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
Caused by: org.gradle.process.internal.ExecException: Process 'command '/home/gabi/git/testing_elevatorsim/build/install/frcUserProgramTest/linuxx86-64/release/frcUserProgramTest'' finished with non-zero exit value 139
        at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:415)
        at org.gradle.process.internal.DefaultExecAction.execute(DefaultExecAction.java:38)
        at org.gradle.api.tasks.AbstractExecTask.exec(AbstractExecTask.java:73)
        at org.gradle.nativeplatform.test.tasks.RunTestExecutable.exec(RunTestExecutable.java:57)
        ... 116 more


* Get more help at https://help.gradle.org

BUILD FAILED in 12s
5 actionable tasks: 4 executed, 1 up-to-date

This is the build scan published: https://gradle.com/s/onsvkkxafjpwc

This is my code in test.cpp:

class SimulationTest : public testing::Test {
};

TEST_F(SimulationTest, InitTest) {
    std::cout << "testing" << std::endl;
    Robot robot;
    robot.RobotInit();
}

This is RobotInit:

void Robot::RobotInit() {
  frc::DataLogManager::Start();
  wpi::log::DataLog& log = frc::DataLogManager::GetLog();
  auto entry = wpi::log::StringLogEntry(log, "/my/lucylog");
  entry.Append("LUCILLE_RENEE_KRAVERLICH");
  entry.Append("CALEB_IS_NOT_A_HUMAN_BEING");
}

This is the created log file (it contains the correct information):

Timestamp,Name,Value
0.010825,"NT:/FMSInfo/.type","FMSInfo"
0.010851,"NT:/FMSInfo/GameSpecificMessage",""
0.010864,"NT:/FMSInfo/EventName",""
0.010891,"NT:/FMSInfo/MatchNumber",<invalid>
0.010903,"NT:/FMSInfo/ReplayNumber",<invalid>
0.010914,"NT:/FMSInfo/MatchType",<invalid>
0.010927,"NT:/FMSInfo/IsRedAlliance",true
0.010938,"NT:/FMSInfo/StationNumber",<invalid>
0.010993,"NT:/FMSInfo/FMSControlData",<invalid>
0.011027,"NT:/LiveWindow/.status/LW Enabled",false
0.012399,"/my/lucylog","LUCILLE_RENEE_KRAVERLICH"
0.0124,"/my/lucylog","CALEB_IS_NOT_A_HUMAN_BEING"

My full code is on github, in case anyone needs it: https://github.com/Eaglestrike/sim-test-fails

1 Like

Exit code 139 indicates your test received SIGSEGV, i.e. it segfaulted.

You mean the code segfaulted? That would suggest that there is a bug in wpilib logger, right? My code works fine under simulation, so it can’t be with my code. It also works fine under the test if I remove the wpilib logger. Also, it says that the test is passing, so I’m assuming the logger shutdown process is creating the segfault.

Unless you have a backtrace it’s hard to say for certain. Do you have a coredump you could look at?

How to I create a backtrace or a coredump?

It looks like you’re on Linux. Most distros automatically collect coredumps. Otherwise you could try running your tests in a debugger directly. Use the bt command in your debugger to list the backtrace.

Its probably crashing because you’re missing initialization steps. You can’t just construct a Robot instance, and then call robotInit. There is other stuff that happens before the main robot class is initialized.

If you start from here, you’ll see everything that happens. You need to recreate basically everything. Its probably something missing from the HAL initialization that is causing the crash.

1 Like
frame #5: 0x000000019e2c3774 libobjc.A.dylib`_objc_terminate() + 160
frame #6: 0x000000019e5ceeb4 libc++abi.dylib`std::__terminate(void (*)()) + 20
frame #7: 0x000000019e5cee50 libc++abi.dylib`std::terminate() + 56
frame #8: 0x00000001049f250c libwpilibcd.dylib`__clang_call_terminate + 12
frame #9: 0x0000000104a03430 libwpilibcd.dylib`nt::Publisher::~Publisher() + 68
frame #10: 0x0000000104a033ac libwpilibcd.dylib`nt::Publisher::~Publisher() + 28
frame #11: 0x0000000104a02f38 libwpilibcd.dylib`nt::DoublePublisher::~DoublePublisher() + 28
frame #12: 0x0000000104b467c4 libwpilibcd.dylib`(anonymous namespace)::Instance::~Instance() + 56
frame #13: 0x0000000104b4677c libwpilibcd.dylib`(anonymous namespace)::Instance::~Instance() + 28
frame #14: 0x0000000104b46724 libwpilibcd.dylib`std::__1::default_delete<(anonymous namespace)::Instance>::operator()((anonymous namespace)::Instance*) const + 40
frame #15: 0x0000000104b466a8 libwpilibcd.dylib`std::__1::unique_ptr<(anonymous namespace)::Instance, std::__1::default_delete<(anonymous namespace)::Instance> >::reset((anonymous namespace)::Instance*) + 92
frame #16: 0x0000000104b4663c libwpilibcd.dylib`std::__1::unique_ptr<(anonymous namespace)::Instance, std::__1::default_delete<(anonymous namespace)::Instance> >::~unique_ptr() + 32
frame #17: 0x0000000104b41d64 libwpilibcd.dylib`std::__1::unique_ptr<(anonymous namespace)::Instance, std::__1::default_delete<(anonymous namespace)::Instance> >::~unique_ptr() + 28
frame #18: 0x000000019e50105c libsystem_c.dylib`__cxa_finalize_ranges + 464
frame #19: 0x000000019e500df0 libsystem_c.dylib`exit + 44
frame #20: 0x000000019e62ef7c libdyld.dylib`dyld4::LibSystemHelpers::exit(int) const + 20
frame #21: 0x000000019e2ebe9c dyld`start + 2620

Thank you, this is probably the issue. When I use frc::StartRobot() the program doesn’t crash. Now I just have to find a way to start the robot and stop it after that, because with frc::StartRobot() the robot is in an infinite loop running its main loop and never exits.

Feel free to see how the tests for the example projects do this: allwpilib/ElevatorSimulationTest.cpp at main · wpilibsuite/allwpilib · GitHub

Thank you for all of your responses. I did a little more testing with this and I am sure this is a bug: Bug: WPILib logger crashes with segmentation fault when running Google Tests · Issue #5120 · wpilibsuite/allwpilib · GitHub.

This is a confirmed bug: Bug: WPILib logger crashes with segmentation fault when running Google Tests · Issue #5120 · wpilibsuite/allwpilib · GitHub

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.