Daily Usage Issues

NCrunch crashes more often with very high CPU/Memory

Started by TimVisma on 3,107 views

Hello,



I use NCrunch in combination with the latest Rider version. The last 2 months or so, I notice that Rider crashes completely and when I go to task manager, NCrunch uses a lot of Memory and also a lot of CPU. When I kill NCrunch, Rider responds immediately. It happens more often when opening multiple solutions.



I didn't have this problem that bad before. I also lowered the settings for the number of CPUs.



32GB Ram

CPU
11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Base speed: 2.80 GHz
Sockets: 1
Cores: 4
Logical processors: 8

NCrunch: 5.14.0.5
Rider: 2025.1.2


My colleagues who use NCrunch don't really have this problem more often.



Greetings,



Tim
Hi Tim,

Thanks for sharing this issue.

Could you try the build referenced in this thread? There is a fix there for an issue that causes some diagnostic behaviour in Rider that seems to cause issues for some people. I'd be interested to see if this solves the problem for you.
I'll test it ;). Thanks in advance.
Hello,

Installed yesterday, only this morning NCrunch started using up to 20 GB of RAM again... while I have 1 small solution open in Rider and wasn't even working in it at that moment. After killing NCrunch everything works again.

[img=https://i.imgur.com/FkDnBL9.png]NCrunch use 20GB RAM[/img]

Greetz,

Tim
Thanks. Let's try and deduct what is causing this. The screenshot helps as it confirms this is in the engine process (not the satellite test runners).

Can you try turning off RDI (if it's enabled)?

Also, can you share approx details of the solution you're on in terms of number of lines of code, tests and projects?
I can't get the solution started anymore at the moment with NCrunch with the version of the other topic. I wanted to make a Report dump, but I can't do that today. I did "send" a dump yesterday.

It seems like it's writing a very large file or something. Can I throw out some data from certain folders for example? Where can I found the logfiles?

I have RDI turned off by default. The solution consists of approximately 13754 lines of code. Approximately 20 projects including test projects.
This are my Global config file:


<GlobalConfiguration>
<Settings>
<CPUCoresAssignedToIDE>0,1,2,3,4,5</CPUCoresAssignedToIDE>
<CPUCoresAssignedToNCrunch>6,7</CPUCoresAssignedToNCrunch>
<FastLaneThreads>0</FastLaneThreads>
<FrameworkUtilisationTypeForMSTest>UseDynamicAnalysis</FrameworkUtilisationTypeForMSTest>
<MaxNumberOfProcessingThreads>1</MaxNumberOfProcessingThreads>
<MaxTestRunnerProcessesToPool>1</MaxTestRunnerProcessesToPool>
<SystemConfigured>True</SystemConfigured>
<TerminateTestRunnerTasksOnExecutionComplete>False</TerminateTestRunnerTasksOnExecutionComplete>
<WizardAllowParallelTestExecution>False</WizardAllowParallelTestExecution>
<WizardEnableRdi>False</WizardEnableRdi>
<WizardEngineMode>Run all tests automatically</WizardEngineMode>
<WizardIgnoreTests>False</WizardIgnoreTests>
</Settings>
<EngineModes>
<EngineMode>
<Name>Run all tests automatically</Name>
<Settings>
<EngineModeColor>a255, r0, g128, b25</EngineModeColor>
</Settings>
</EngineMode>
<EngineMode>
<Name>Run all tests manually</Name>
<Settings>
<EngineModeColor>a255, r255, g0, b0</EngineModeColor>
<TestsToExecuteAutomatically>False</TestsToExecuteAutomatically>
</Settings>
</EngineMode>
<EngineMode>
<Name>Run impacted tests automatically, others manually</Name>
<Settings>
<AlignOutOfDateStatusWithImpactStatus>True</AlignOutOfDateStatusWithImpactStatus>
<EngineModeColor>a255, r128, g128, b0</EngineModeColor>
<TestsToExecuteAutomatically>IsImpacted</TestsToExecuteAutomatically>
</Settings>
</EngineMode>
<EngineMode>
<Name>Run pinned tests automatically, others manually</Name>
<Settings>
<AutoPinNewTests>True</AutoPinNewTests>
<EngineModeColor>a255, r0, g0, b255</EngineModeColor>
<TestsToExecuteAutomatically>IsPinned</TestsToExecuteAutomatically>
</Settings>
</EngineMode>
</EngineModes>
</GlobalConfiguration>
Does deleting the NCrunch cache directory resolve the problem? Check it first to see how big it is.

You can view the logs by clicking the 'Submit bug report' menu option and choosing to save the report to disk (make sure to give it a few seconds to write the report in the background first)

Edited

Where can I found the cache directory?

https://drive.google.com/open?id=1Vc_lJeQiED3Tm_g2brMRWxsTerRyINlL&usp=drive_fs is a report dump (from an other solution).

[img=https://i.imgur.com/ksrNtfE.png]Cache folder[/img]
I have delete this files.

Greetz.

Tim

Edited

Thanks for confirming this. The size of these files suggests the cache is not the source of the problem.

I don't expect the bug report will contain the information needed to isolate this problem, but it may be worth submitting one anyway using the submit bug report option. I wasn't able to access the report dump you've uploaded ("The organization that owns this item doesn't allow you to access it").

Can you tell me more about the memory allocation pattern? Does the engine rocket straight up to 20GB as soon as it's started? Or does it take a while to build up?
I ran the configuration wizard again and put CPU IDE vs NCrunch in the middle. This allows me to work in the solution again with NCrunch ;).

RAM gradually increased, but within a few minutes (so starting NCrunch). I also saw no green dots from NCrunch in the files.

Greetz,

Tim
TimVisma wrote:I ran the configuration wizard again and put CPU IDE vs NCrunch in the middle. This allows me to work in the solution again with NCrunch ;).


Odd. This shouldn't cause the problem. If it happens again, could you submit a bug report for me?

Post a reply

Log in to reply.