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

Notification

Icon
Error

NCrunch console ERROR (Internal): System.ArgumentNullException
GreenMoose
#1 Posted : Monday, March 27, 2017 12:01:10 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 507

Thanks: 145 times
Was thanked: 66 time(s) in 64 post(s)
[NCrunch Console Tool v3.6.0.2]

Quote:

[13:56:49.8953-Core-8] All projects have been loaded
[13:56:49.8953-Core-8] ERROR (Internal): System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate)
at nCrunch.Core.PlatformTypes.DotNetCorePlatformType.☻()
at nCrunch.Core.PlatformTypes.DotNetCorePlatformType.AllProjectsLoaded()
at nCrunch.Client.Synchronisation.SnapshotSynchroniser.☻()
at nCrunch.Client.Synchronisation.SnapshotSynchroniser.☻(DteProjectsAddedWithBuildXmlEvent ☻)


I get above error all of the sudden when running on TeamCity, the execution seems to freeze after above output. Tried changing cache and workspace locations which didn't help. Cleaned the build working directory didn't help. I'm out of ideas :/.
Remco
#2 Posted : Monday, March 27, 2017 12:22:09 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for sharing this problem. I can see how this is happening in NCrunch and it should be easy to fix it, but this looks like a downstream problem from something else. This exception should only happen if you are running NCrunch over a solution with no projects able to be processed (i.e. all supported projects are ignored).

In theory, if/when I fix this problem, NCrunch will likely just complete its execution run and return no results. Does this match your expectation given the structure/configuration of your solution?
GreenMoose
#3 Posted : Monday, March 27, 2017 1:39:34 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 507

Thanks: 145 times
Was thanked: 66 time(s) in 64 post(s)
Remco;10124 wrote:
Hi, thanks for sharing this problem. I can see how this is happening in NCrunch and it should be easy to fix it, but this looks like a downstream problem from something else. This exception should only happen if you are running NCrunch over a solution with no projects able to be processed (i.e. all supported projects are ignored).

In theory, if/when I fix this problem, NCrunch will likely just complete its execution run and return no results. Does this match your expectation given the structure/configuration of your solution?

Hrm no, I have a lot of projects in this solution :|.
Remco
#4 Posted : Monday, March 27, 2017 11:14:07 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
GreenMoose;10125 wrote:

Hrm no, I have a lot of projects in this solution :|.


You may need to apply some deductive logic here so we can work out why the console tool won't load the projects. A few interesting things to check:

- Does the console tool also behave this way when used on the same solution on your dev machine?
- Does this happen only for a specific solution, or also others?
- Does it happen for a minimal dummy test solution?
- This may be harder to test (depending on your setup), but does this happen if the TeamCity server tries to open the solution in VS and process it using the NCrunch VS plugin?

GreenMoose
#5 Posted : Tuesday, March 28, 2017 6:40:20 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 507

Thanks: 145 times
Was thanked: 66 time(s) in 64 post(s)
Ok I found the issue, sortof. The solution consisted both of vs2017 and vs2015 projects (in order to keep compatibility with vs2015) along with a global.json to set the framework version to old core release. (This worked fine with NCrunch)

I later introduced some vs2017-only projects, and for some reason this seems to cause NCrunch to fail. After cleaning up all vs2015 leftovers NCrunch on TeamCity is happy again :).
Remco
#6 Posted : Tuesday, March 28, 2017 8:12:50 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
GreenMoose;10127 wrote:

I later introduced some vs2017-only projects, and for some reason this seems to cause NCrunch to fail. After cleaning up all vs2015 leftovers NCrunch on TeamCity is happy again :).


Interesting ... How did this cause NCrunch to fail? Did it just fail to recognise all the projects in the solution? Or was it kicking up errors?
GreenMoose
#7 Posted : Tuesday, March 28, 2017 9:18:19 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 507

Thanks: 145 times
Was thanked: 66 time(s) in 64 post(s)
Remco;10128 wrote:
GreenMoose;10127 wrote:

I later introduced some vs2017-only projects, and for some reason this seems to cause NCrunch to fail. After cleaning up all vs2015 leftovers NCrunch on TeamCity is happy again :).


Interesting ... How did this cause NCrunch to fail? Did it just fail to recognise all the projects in the solution? Or was it kicking up errors?

No it froze after outputting above exception. Not sure if the project mix was the actual reason though but since we don't really need vs2015 that was the easiest solution to try with. (The solution built fine previously when I hadn't introduced new vs2017 projects).

*Edit: Also I could not repro it locally (where I have vstudio2017 installed) so I guess it is related to settings in global.json along with the specific SDKs installed on built agent.
Remco
#8 Posted : Tuesday, March 28, 2017 11:21:07 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
GreenMoose;10131 wrote:

*Edit: Also I could not repro it locally (where I have vstudio2017 installed) so I guess it is related to settings in global.json along with the specific SDKs installed on built agent.


NCrunch itself no longer cares about global.json (earlier DNX integrated builds did), though I presume this file could have some affect on the build system, which NCrunch does use when trying to load projects. If the build system wasn't behaving as expected, it's possible NCrunch was dropping the projects as being unable to be loaded and then running into its unplanned explosion downstream. If this is the case, then fixing the downstream explosion you've originally reported here should allow the engine to progress further and report these problems in a more sensible way.
1 user thanked Remco for this useful post.
GreenMoose on 3/28/2017(UTC)
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.046 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download