Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

MapViewOfFile error
amo11
#1 Posted : Monday, September 23, 2024 10:41:34 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/9/2021(UTC)
Posts: 6
Location: Denmark

Thanks: 1 times
started seeing this error in our legacy codebase while I was renaming a number of interfaces/classes/variables. NCrunch would appear to stop tests execution with all remaining tests marked as failed. Restarting NCrunch enabled it to complete execution of the entire test suite without further test fails (i.e. NCrunch works correctly, and the test execution shows all passing tests, which is consistent with Test Explorer in Visual Studio).

Has anyone seen this sort of problem before?



Quote:
System.Exception: MapViewOfFile error (size = 317604): 8
at nCrunch.TestRuntime.RuntimeSharedMemory.handlePossibleError(IntPtr handle, String apiDetails)
at nCrunch.TestRuntime.RuntimeSharedMemory..ctor(String name, Int32 bufferSizeInBytes)
at nCrunch.TestRuntime.SharedExecutionMap..ctor(ExecutionMapSpecification specification, String hostProcessId)
at nCrunch.TestRuntime.SharedMemoryExecutionDataRecorder.initialise()
at nCrunch.TestRuntime.SharedMemoryExecutionDataRecorder..ctor(ExecutionMapSpecification[] mapSpecifications)
at nCrunch.TestExecution.TestRunnerThread.()
at nCrunch.TestExecution.TestRunnerThread.()
System.Exception: MapViewOfFile error: 8
at nCrunch.TestRuntime.RuntimeDataInspection.PersistentMemoryMappedFile.handlePossibleError(IntPtr handle, String apiDetails)
at nCrunch.TestRuntime.RuntimeDataInspection.PersistentMemoryMappedFile..ctor(String filePath, UInt32 fileSize)
at nCrunch.TestRuntime.RuntimeDataInspection.RdiSession.prepareDataPointTable(RdiRuntimeConfig config, Int32 componentMappingId, Int32 elementCount, Dictionary`2 settingOverrides)
at nCrunch.TestRuntime.RuntimeDataInspection.RdiSession..ctor(String sessionId, RdiRuntimeConfig runtimeConfig, String logDirectory, Dictionary`2 settingOverrides, RdiStorageState storageState, RdiWriterPosition defaultWriterPosition, IRdiTypeHandlingStrategyProvider typeHandlingStrategyProvider)
at nCrunch.TestRuntime.RuntimeDataInspection.MemoryMappedLog..ctor(String logDirectory, String sessionId, RdiRuntimeConfig rdiConfig, Dictionary`2 settingOverrides, RdiWriterPosition defaultWriterPosition, RdiRuntimeDataCapturerSet dataCapturerSet, IRdiTypeHandlingStrategyProvider typeHandlingStrategyProvider)
at nCrunch.TestRuntime.RuntimeDataInspection.RdiEventListener.StartListening(String logDirectory, String sessionId, RdiRuntimeConfig rdiConfig, Dictionary`2 settingOverrides, RdiWriterPosition defaultWriterPosition, RdiRuntimeDataCapturerSet dataCapturerSet, IRdiTypeHandlingStrategyProvider typeHandlingStrategyProvider)
at nCrunch.TestExecution.TestExecutionMonitor.StartMonitoringTest(ExecutingTest test)
at nCrunch.TestExecution.ExecutingTest.Start()
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.testStarted(NUnit3Message message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
System.NullReferenceException: Object reference not set to an instance of an object.
at nCrunch.TestRuntime.RuntimeDataInspection.RdiEventListener.StopListening()
at nCrunch.TestExecution.TestExecutionMonitor.StopMonitoringTest(ExecutingTest test)
at nCrunch.TestExecution.ExecutingTest.Finish(Boolean isSuccess, String exceptionString, TimeSpan executionTime, Boolean writeExceptionToOutput, Boolean addExecutionTime)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.testFinished(EndTestMessage message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
System.Exception: Output is already redirected
at nCrunch.TestExecution.TestExecutionMonitor.()
at nCrunch.TestExecution.TestExecutionMonitor.StartMonitoringTest(ExecutingTest test)
at nCrunch.TestExecution.ExecutingTest.Start()
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.testStarted(NUnit3Message message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
System.NullReferenceException: Object reference not set to an instance of an object.
at nCrunch.TestRuntime.RuntimeDataInspection.RdiEventListener.StopListening()
at nCrunch.TestExecution.TestExecutionMonitor.StopMonitoringTest(ExecutingTest test)
at nCrunch.TestExecution.ExecutingTest.Finish(Boolean isSuccess, String exceptionString, TimeSpan executionTime, Boolean writeExceptionToOutput, Boolean addExecutionTime)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.testFinished(EndTestMessage message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
System.Exception: Output is already redirected
at nCrunch.TestExecution.TestExecutionMonitor.()
at nCrunch.TestExecution.TestExecutionMonitor.StartMonitoringTest(ExecutingTest test)
at nCrunch.TestExecution.ExecutingTest.Start()
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.testStarted(NUnit3Message message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
System.NullReferenceException: Object reference not set to an instance of an object.
at nCrunch.TestRuntime.RuntimeDataInspection.RdiEventListener.StopListening()
at nCrunch.TestExecution.TestExecutionMonitor.StopMonitoringTest(ExecutingTest test)
at nCrunch.TestExecution.ExecutingTest.Finish(Boolean isSuccess, String exceptionString, TimeSpan executionTime, Boolean writeExceptionToOutput, Boolean addExecutionTime)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.testFinished(EndTestMessage message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
System.Exception: Output is already redirected
at nCrunch.TestExecution.TestExecutionMonitor.()
at nCrunch.TestExecution.TestExecutionMonitor.StartMonitoringTest(ExecutingTest test)
at nCrunch.TestExecution.ExecutingTest.Start()
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.suiteStarted(NUnit3Message message)
at nCrunch.Module.NUnit3.Integration.NUnit3Listener.RaiseCallbackEvent(String eventArgument)
nCrunch.TestExecution.TestExecutionException: Cannot start monitoring test
Remco
#2 Posted : Tuesday, September 24, 2024 12:15:20 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi, thanks for sharing this issue.

The error code here is Win32 ERROR_NOT_ENOUGH_MEMORY. In this situation, NCrunch is unable to start the test run because allocating the memory required to track RDI data for the test run failed.

Possible solutions include:
1. Increasing available memory (i.e. terminate background applications, add more hardware, etc)
2. Turn off RDI (it increases memory demands)
3. Reduce the number of tests running concurrently (Max number of processing threads)
amo11
#3 Posted : Tuesday, September 24, 2024 7:55:28 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/9/2021(UTC)
Posts: 6
Location: Denmark

Thanks: 1 times
thanks for the clarification. Checking the my configuration, it appears that RDI was enabled when it should not have been.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.069 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download