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.
Daily Usage Issues
Infinit recursion during resource lookup within mscorlib
Started by richarddezwart on 14,151 views
Remco NCrunch Developer
#8061
24 Nov 2015 22:46 UTC
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?
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?
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
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
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
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 NCrunch Developer
#8080
26 Nov 2015 11:23 UTC
richarddezwart 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.
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.
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 NCrunch Developer
#8105
03 Dec 2015 11:43 UTC
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.
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.
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
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 NCrunch Developer
#8121
08 Dec 2015 21:43 UTC
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.
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.
Post a reply
Log in to reply.