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

Notification

Icon
Error

Infinit recursion during resource lookup within mscorlib
richarddezwart
#1 Posted : Tuesday, November 24, 2015 1:23:31 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/26/2015(UTC)
Posts: 5
Location: Netherlands

Thanks: 2 times
System.ExecutionEngineException' occurred in mscorlib.dll when testing a class with a 15 resources (Microsoft ReportViewer files, rdlc). When debugging the exception appears to be a InvalidCastException.
Remco
#2 Posted : Tuesday, November 24, 2015 10:46:38 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1287 time(s) in 1194 post(s)
Hi, thanks for sharing this issue.

Sorry, but I'll need a bit more information before I can analyse this.

- Can you confirm that this is a problem you are experiencing when NCrunch is executing your own code in a test run?
- Does the problem appear consistently?
- Does the problem appear if you use a different test runner? (i.e. NUnit vanilla runner)
- Does turning off the 'Instrument output assembly' project-level NCrunch configuration setting for the projects involved resolve the problem?
- Are you able to create a code sample that can reproduce this issue and you can share with me?
- Which version of VS and .NET are you using?
richarddezwart
#3 Posted : Thursday, November 26, 2015 10:47:01 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/26/2015(UTC)
Posts: 5
Location: Netherlands

Thanks: 2 times
Hi Remco,

I'll be happy to try and answer your questions


- Can you confirm that this is a problem you are experiencing when NCrunch is executing your own code in a test run?
Yes it is.

- Does the problem appear consistently?
Every time I run the test

- Does the problem appear if you use a different test runner? (i.e. NUnit vanilla runner)
No problem running with VSTest or Resharper Test

- Does turning off the 'Instrument output assembly' project-level NCrunch configuration setting for the projects involved resolve the problem?
Does not solve the problem

- Are you able to create a code sample that can reproduce this issue and you can share with me?
I will give it a try

- Which version of VS and .NET are you using?
Microsoft Visual Studio Community 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

The project is configured to use .NET 4.5
richarddezwart
#4 Posted : Thursday, November 26, 2015 10:50:38 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/26/2015(UTC)
Posts: 5
Location: Netherlands

Thanks: 2 times
Just found out on another VM that the problem does not occur with

Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

So it might be the Community Edition that is the problem

Remco
#5 Posted : Thursday, November 26, 2015 11:23:19 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1287 time(s) in 1194 post(s)
richarddezwart;8078 wrote:
Just found out on another VM that the problem does not occur with

Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

So it might be the Community Edition that is the problem



Thanks for sharing these extra details. I think its unlikely that the tier of Visual Studio could be responsible for a runtime failure like this. The test code itself isn't executed inside the VS process, and there shouldn't normally be a connection between the two. A more likely scenario is that something is going deeply wrong inside the CLR itself in a manner that is triggered by something in your environment. It may be worth checking to see if everything in your toolset is up to date (i.e. windows updates are installed, etc). If you're using any profiling tools (i.e. MSFakes, JustMock, TypeMock), make sure that you have these all up to date, or try disabling them to see if there is any difference.

If you're able to share any code that can reproduce the problem under NCrunch but not other runners, I'll be happy to see what I can do to help.
richarddezwart
#6 Posted : Thursday, December 3, 2015 8:10:15 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/26/2015(UTC)
Posts: 5
Location: Netherlands

Thanks: 2 times
Hi,

The problem coincides with the following:
============================
With the introduction of .NET 4.6, Microsoft released a number of changes to the garbage collector in an effort to improve performance. The installer for .NET 4.6 makes these changes effective for previous versions of the .NET framework (not just 4.6).

Unfortunately, early release and pre-release versions of .NET 4.6 include a serious performance problem impacting garbage collection in x64 environments. The impact of this problem is very high, with entire processes being completely locked for minutes at a time. The nature of many algorithms used within NCrunch make it highly susceptible to this problem. NCrunch has detected the presence of this problem on this machine.

To resolve this, it is strongly recommended that you upgrade your version of .NET. Microsoft has released a number of hot-fix updates targeting different operating systems. It is likely that the fix will be later included in other Windows updates or roll-up fixes. The following hot-fixes are known to target this issue:

https://support.microsoft.com/en-us/kb/3093266 - Windows 10
https://support.microsoft.com/en-us/kb/3088956 - Windows Server 2012 R2 and Windows 8.1
https://support.microsoft.com/en-us/kb/3088955 - Windows Server 2012 and Windows 8
https://support.microsoft.com/en-us/kb/3088957 - Windows 7 SP1, Windows Server 2008 SP2, Windows Server 2008 R2 SP1, and Windows Vista SP2

Alternatively, changing your 'Engine hosting strategy' NCrunch global configuration setting to 'x86SatelliteProcess' or 'HostInsideIDE' will enable NCrunch to run within an x86 environment, in which the problem does not appear.
===========================
In this organization I cannot run hot-fixes my self, so I will have to wait for a scheduled roll-up.

Changing the Engine Hosting Strategy did not help with the Hard Error.


Remco
#7 Posted : Thursday, December 3, 2015 11:43:29 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1287 time(s) in 1194 post(s)
Hi,

VS2015 Update 1 was just released, along with .NET 4.6.1.

I think this update would be worth trying - MS have fixed a great number of issues in this release, including the quoted x64 GC issue.
richarddezwart
#8 Posted : Tuesday, December 8, 2015 2:31:59 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/26/2015(UTC)
Posts: 5
Location: Netherlands

Thanks: 2 times
Hi Remco,

VS2015 SP1 did not solve the problem. I installed .NET 4.6.1 seperately but it does not show up in the About Box in VS. Says it is 4.6.01055:

Microsoft Visual Studio Community 2015
Version 14.0.24720.00 Update 1
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Community

Visual C# 2015 00322-20000-00000-AA928
Microsoft Visual C# 2015
Remco
#9 Posted : Tuesday, December 8, 2015 9:43:59 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1287 time(s) in 1194 post(s)
Sorry, I'm out of ideas here. Without a way to reproduce this in a dev environment to discover the point of difference with NCrunch loaded, unfortunately I can't help with analysing this any further.

The problem appears with NCrunch instrumentation disabled, so it must be an issue with the compiler or the CLR itself. Why it shows under NCrunch's environment but not others is a mystery to me.

I recommend restructuring the code to see if you can find a workaround. If you can produce a code sample that can reproduce the problem in any environment I'll be happy to look at it further.
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.065 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download