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

Notification

Icon
Error

Ncrunch Console + Grid Server: Sometimes Load Failure
spolonski
#1 Posted : Wednesday, January 30, 2019 8:22:20 AM(UTC)
Rank: Member

Groups: Registered
Joined: 7/11/2016(UTC)
Posts: 16
Location: Germany

Thanks: 4 times
Was thanked: 2 time(s) in 2 post(s)
Hi Remco,

We are using NCrunch Console in our CI. After update to 3.22 we are getting sometimes Load Failure errors.
Code:


WebApiContrib.IoC.StructureMap (not run)

Path:<skip>\Source\WebApiContrib.IoC.StructureMap\WebApiContrib.IoC.StructureMap.csproj
Result:Load Failure

nCrunch.TaskRunner.Ipc.IpcConnectionClosedException: The connection has been closed
at nCrunch.Core.ProcessManagement.ExternalProcessManager.(EffectiveProcessorArchitecture , ProcessLoadParameters )
at nCrunch.Core.ProcessManagement.ExternalProcessManager.LoadExternalProcess(ProcessLoadParameters parameters, GridClientId client)
at nCrunch.Core.BuildManagement.BuildProcessLauncher..()
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , EffectiveProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 , Nullable`1 , GridAddress )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(ComponentLoadParameters parameters, IList`1 customEnvironmentVariables)
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(EffectiveProcessorArchitecture , String )
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, VisualStudioVersion vsVersion, ComponentUniqueName componentName, TaskSettings componentTaskSettings, Exception parseException, String targetFramework)



As a workaround we are starting NCrunch one time extra. The second run works as expected.
We are using .NET 4.7.1 and NUnit.

Can update to 3.23 help us?

Chears,
Sergei
Remco
#2 Posted : Wednesday, January 30, 2019 9:15:12 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,090

Thanks: 792 times
Was thanked: 1036 time(s) in 986 post(s)
Hi Sergei,

Thanks for sharing this issue.

It looks like the MSBuild system responsible for loading the NCrunch project is suffering from a catastrophic failure and the process is being suddenly terminated without warning.

This could be due to an out of memory exception. Try changing the Build process CPU architecture setting to x64.

Do you see anything in the windows event viewer? Most of the code running here is platform and build code being invoked by NCrunch, so it's hard for me to say whether an upgrade to 3.23 would solve this. I am not aware of anything in any recent version of NCrunch that could be considered responsible for this kind of error.
spolonski
#3 Posted : Tuesday, January 7, 2020 6:38:28 AM(UTC)
Rank: Member

Groups: Registered
Joined: 7/11/2016(UTC)
Posts: 16
Location: Germany

Thanks: 4 times
Was thanked: 2 time(s) in 2 post(s)
Hi Remco,

This misfortune still haunts us. During this time, we updated the framework to 4.8 and the NCruch to 4.2.
Error Message looks now like:

Code:

System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Errors occurred while trying to load the project file:
The "ResolveComReference" task could not be instantiated from "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Could not load file or assembly 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
The "ResolveComReference" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name.
at nCrunch.Compiler.ComponentAnalysisContext.()
at nCrunch.Compiler.ComponentAnalysisContext.AnalyseComponentBuild()
at nCrunch.Compiler.RemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.(CallMethodMessage )
at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data)
at nCrunch.TaskRunner.Ipc.RemoteInstance.(Byte[] )
at nCrunch.TaskRunner.Ipc.RemoteInstance.Invoke(IMessage msg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at nCrunch.Compiler.IRemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
at nCrunch.Core.BuildManagement.BuildProcessLauncher..(IRemoteBuildRunner )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , FilePath , String , ExternalProcess )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , EffectiveProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 , Nullable`1 , GridAddress )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(ComponentLoadParameters parameters, IList`1 customEnvironmentVariables)
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(EffectiveProcessorArchitecture , String )
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, VisualStudioVersion vsVersion, ComponentUniqueName componentName, TaskSettings componentTaskSettings, Exception parseException, String targetFramework)


It looks for me strange that NCrunch is trying to load version 15 of Microsoft.Build.Tasks.Core. It should be a version 16 for VS2019 and .NET 4.8, right?
michaelkroes
#4 Posted : Tuesday, January 7, 2020 8:16:21 AM(UTC)
Rank: NCrunch Developer

Groups: Registered
Joined: 9/22/2017(UTC)
Posts: 213
Location: Netherlands

Thanks: 96 times
Was thanked: 46 time(s) in 44 post(s)
Hi,

It could be that NCrunch is having trouble finding the latest version of visual studio. The console tool will default to the highest version it can find. You could try adding /VS 2019 to the command line parameters.

1 user thanked michaelkroes for this useful post.
spolonski on 1/20/2020(UTC)
spolonski
#5 Posted : Monday, January 20, 2020 6:30:03 AM(UTC)
Rank: Member

Groups: Registered
Joined: 7/11/2016(UTC)
Posts: 16
Location: Germany

Thanks: 4 times
Was thanked: 2 time(s) in 2 post(s)
After changing the Build process CPU architecture setting to x64 and adding /VS 2019 to the command line parameters it works stable.
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.038 seconds.