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

Notification

Icon
Error

How do I "Retrieve the LoaderExceptions property" please?
blah77
#1 Posted : Sunday, April 7, 2013 5:47:20 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/7/2013(UTC)
Posts: 3
Location: Armenia

I get the following backtrace on a project that everything else in the solution depends on. Its dependencies are just fscheck, nunit.framework, powerpack.parallel and a few other common libraries. The message is copied from the bottom of the "ncrunch tests" window. It is reproducible every time. The solution compiles and runs if I don't use ncrunch. It also compiles well enough for the compilation of its dependencies to proceed under ncrunch, but not enough to run any tests (again, under ncrunch; they are fine under nunit).

How do I find out what is wrong please? Many thanks.

An error occurred while analysing this project after it was built: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at NUnit.Core.Builders.TestAssemblyBuilder.GetCandidateFixtureTypes(Assembly assembly, String ns)
at NUnit.Core.Builders.TestAssemblyBuilder.GetFixtures(Assembly assembly, String ns)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, Boolean autoSuites)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, String testName, Boolean autoSuites)
at NUnit.Core.TestSuiteBuilder.Build(TestPackage package)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitDynamicTestFinder.FindFrameworkTestsUsingRuntimeInvoke(TestPackage package, ILogger logger, List`1 tests)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitTestFramework.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, String assemblyFilePath, String[] referencedAssemblyFilePaths)
at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, String assemblyFilePath, String[] referencedAssemblyFilePaths, TestFrameworkDescription[] frameworks)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(TestFrameworkDescription[] applicableFrameworks)
Remco
#2 Posted : Sunday, April 7, 2013 10:39:32 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi,

Thanks for sharing this issue. I've made a note to introduce a future change to NCrunch to extend the error information to also include inner exception details. Meanwhile, we may need to deductively figure out why the CLR is failing to load your assembly.

Do you have any static constructors in the test assembly that involve complex logic?

Very often, this error is related to strong name issues caused by signing. Is there any difference if you turn on the Prevent signing of assembly option on this project and the projects it depends on?

Something else to try is to set your Framework utilisation type for NUnit to 'StaticAnalysis'. This may either get you past the problem or return a more meaningful error that can help with troubleshooting.
blah77
#3 Posted : Monday, April 8, 2013 6:23:46 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/7/2013(UTC)
Posts: 3
Location: Armenia

Remco;3976 wrote:

Something else to try is to set your Framework utilisation type for NUnit to 'StaticAnalysis'. This may either get you past the problem or return a more meaningful error that can help with troubleshooting.


Many thanks. This has moved me forward, and I can now run some trivial tests. But anything more complicated breaks. The top of the exception trace is often:

System.InvalidProgramException : Common Language Runtime detected an invalid program.

This appears related to a bit of code (not a testfixture) that uses static initialisation:

type first () =

....

new (i:int) =
memoiser.memoise (i)


and type memoiser () =
static let storage = .....

static member memoise i = .....



Any ideas on what to try next please?
Remco
#4 Posted : Monday, April 8, 2013 7:55:59 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
This looks to be a bug in NCrunch's instrumentation. You may be able to work around it by marking out the offending code blocks with code coverage suppression comments. An alternative is to disable instrumentation for the project using the instrument output assembly project-level configuration setting. Is there any chance you can reproduce the problem in a small dummy project that you can share with me? Instrumentation issues are a high priority and I'd like to see that this gets fixed.


Thanks!

Remco
blah77
#5 Posted : Monday, April 8, 2013 4:00:52 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/7/2013(UTC)
Posts: 3
Location: Armenia

Remco;3981 wrote:

Is there any chance you can reproduce the problem in a small dummy project that you can share with me? Instrumentation issues are a high priority and I'd like to see that this gets fixed.


I tried to cut it down, but failed. I am sure it can be done, but the project is too large to do it within the timebudget I currently have. It's a shame since it worked really well on small examples.


Remco
#6 Posted : Monday, April 8, 2013 9:34:16 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Did the code coverage suppression or disabling of instrumentation make any difference?

Also, can you confirm which language the project is developed in?
JeremyR
#7 Posted : Tuesday, July 9, 2013 11:34:44 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/20/2013(UTC)
Posts: 6
Location: United States of America

I am having almost the same problem as the OP.

LoaderException when using dynamic detection with NUnit tests.
When I change it to static detection I can now see my tests, but I cannot run any of them successfully. I see the following:
http://snag.gy/reSqS.jpg yellow triangle icon whenever I try to run a specific test.

Since I couldn't find the yellow icon in your documentation and because there was no easy way I could find to see any logs or anything of the sort I had to come here.

I tried disabling instrumentation on both the unit test project and the project under test and neither one made any difference.
This is C#.

Edit: I just found this in the processing Queue for every test:

[17:30:39.8985-TestExecutionTask-64] ERROR (Internal): System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()

Edit 2: To save you any time here is what my setup is like:
We have a solution with ~20 projects.
We only have one unit test project (hoping to fix this soon)
We use maven to pull in some external dependencies
The unit tests are testing a project that uses/references the WPF libraries among many other things

I have tried including our maven target dependencies directory in both the unit test and project under test configuration with no luck.
Remco
#8 Posted : Wednesday, July 10, 2013 6:04:27 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Jeremy -

The yellow arrow symbol indicates that the test has been manually queued for high priority execution. As the test task is bugging out, the engine never gets to execute the test, so the arrow will probably stick around indefinitely.

The 1.46 maintenance release of NCrunch has just gone out the door and is available for download http://www.ncrunch.net/download. This release contains the change described above that drills into the loader exceptions to provide more detail when the dynamic analysis fails. To see the error, you'll need to set your framework utilisation type back to DynamicAnalysis.

The release also contains a range of other fixes, with a good chance that it will directly solve the underlying issue. Give it a spin and let me know how it goes. At the very least, I'm sure we can dig up a more meaningful error to help with troubleshooting.


Cheers,

Remco
JeremyR
#9 Posted : Wednesday, July 10, 2013 5:04:40 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/20/2013(UTC)
Posts: 6
Location: United States of America

Installed the latest version from your link. I can confirm that it lists version 1.46.0.9 in the about dialog.

I'm not finding any more information in any of the stack traces:
"[10:59:39.1411-AnalysisTask-6] ERROR (Analysis): A failure occurred while analysing the assembly [SnapshotComponent: MyProject.UnitTest, 7, 4615240]: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at NUnit.Core.Builders.TestAssemblyBuilder.GetCandidateFixtureTypes(Assembly assembly, String ns)
at NUnit.Core.Builders.TestAssemblyBuilder.GetFixtures(Assembly assembly, String ns)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, Boolean autoSuites)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, String testName, Boolean autoSuites)
at NUnit.Core.TestSuiteBuilder.Build(TestPackage package)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitDynamicTestFinder.FindFrameworkTestsUsingRuntimeInvoke(TestPackage package, ILogger logger, List`1 tests)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitTestFramework.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, String assemblyFilePath, String[] referencedAssemblyFilePaths)
at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, String assemblyFilePath, String[] referencedAssemblyFilePaths, TestFrameworkDescription[] frameworks)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(TestFrameworkDescription[] applicableFrameworks)"

Same exception in both the tests window and in the priority queue window. Both state "Analysis failure" as their status as well.
Remco
#10 Posted : Wednesday, July 10, 2013 11:06:54 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Jeremy -

Try the following:

- Set your log verbosity to Medium
- Reset the engine so that the error occurs nice and fresh
- Open up the processing queue
- Find the Analysis Task in the processing queue that has bombed out
- Check the trace output in the bottom pane

Hopefully the error should be showing here.
JeremyR
#11 Posted : Wednesday, July 10, 2013 11:34:47 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/20/2013(UTC)
Posts: 6
Location: United States of America

Here is the resulting stack trace. I'm not seeing anything useful, but the process not found in pool could be the cause of that.


Quote:
[17:29:26.5249-AnalysisTask-137] Launching task: [AnalysisTask: [SnapshotComponent: XYZ.UI.UnitTest, 7, 62638178], BeingProcessed]
[17:29:26.5259-AnalysisTask-137] Process could not be found in pool with signature matching: [ProcessSignature:
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\target\bin\vc100\Debug\XYZ.UI.UnitTest.dll
nCrunch.TestExecution.RemoteTaskRunner
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\target\bin\vc100\Debug\XYZ.UI.UnitTest.dll.config.ncrunchconfig
x86
Framework4_0
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\XYZ.DataContracts.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\XYZ.DependencyInjection.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\XYZ.ServicesCommon.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\XYZ.ServiceTypes.Api.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\XYZ.UI.TestHelper.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\CoreEnums.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\DAL.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\DataAccess.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\DatabaseTypes.Enums.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Microsoft.CompilerServices.AsyncTargetingPack.Net4.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Microsoft.Practices.Prism.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Microsoft.Practices.Unity.dll
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v4.0\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Moq.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\nunit.framework.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\PresentationCore.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\PresentationFramework.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.ComponentModel.DataAnnotations.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.ServiceModel.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xaml.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Telerik.Windows.Controls.Charting.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Telerik.Windows.Controls.Data.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Telerik.Windows.Controls.DataVisualization.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Telerik.Windows.Controls.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Telerik.Windows.Controls.Docking.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Telerik.Windows.Controls.GridView.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Telerik.Windows.Controls.Navigation.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Telerik.Windows.Data.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Visualization.Interfaces.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\WindowsBase.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Runtime.Serialization.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.Entity.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\XYZ.ServicesTypes.NetResources.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Transactions.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Oracle.DataAccess.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Npgsql.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Configuration.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Microsoft.Practices.Unity.Interception.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\log4net.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Database.Interface.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Database.Definition.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\RetrievalNet.Interfaces.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\DatabaseNet.Interfaces.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\BusinessServices.Shared.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\BusinessServices.Case.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\SharedTypes.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\kff.net.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\kff_client.net.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\ADdtSearch.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\ADdtSearchInterface.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\RetrievalWrapper.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\processing_options.Managed.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\BusinessServicesEntities.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\XYZ.Database.CoreInterop.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Rhino.Mocks.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.ServiceModel.Discovery.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Microsoft.Practices.ServiceLocation.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.Services.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\UIAutomationProvider.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\UIAutomationTypes.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Telerik.Windows.Controls.Input.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.CSharp.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.DataSetExtensions.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.EnterpriseServices.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Drawing.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Mono.Security.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\ADLogger.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.ServiceProcess.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Database.Enums.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\ManagedCoreWrapper.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Management.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.VisualC.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\Altova.Managed.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\_ncrunchreferences\AltovaXML.Managed.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Windows.Forms.dll
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2012\nunit.core.DLL
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2012\nunit.core.interfaces.DLL
C:\Users\jrobertson\AppData\Local\NCrunch\46888\44\_ncrunchreferences\CoreEnums.NetResources.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\46\_ncrunchreferences\Microsoft.Expression.Interactions.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\46\_ncrunchreferences\System.Windows.Interactivity.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\49\XYZ.UI.BusinessServices\bin\Debug\XYZ.UI.BusinessServices.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\47\target\bin\vc100\Debug\XYZ.UI.DataAccess.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\44\target\bin\vc100\Debug\XYZ.UI.DataContracts.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\41\target\bin\silverlight\Debug\XYZ.UI.Interfaces.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\48\target\bin\vc100\Debug\XYZ.UI.ServiceInterfaces.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\46\target\bin\vc100\Debug\XYZ.UI.dll
C:\Users\jrobertson\AppData\Local\NCrunch\46888\42\target\bin\silverlight\Debug\XYZ.UI.NetResources.dll

]
[17:29:26.5269-AnalysisTask-137] Adding external process with Id '3db67b23131d48cfad38ade3b55107f2'
[17:29:26.5269-AnalysisTask-137] Starting external process '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2012\nCrunch.TaskRunner40.x86.exe"' with arguments '46888 nCrunch_9e505035c163435884cf1660aef608c8 ipc://nCrunch_9e505035c163435884cf1660aef608c8/HostCallback 3db67b23131d48cfad38ade3b55107f2 "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2012\nCrunch.TestExecution.DLL" nCrunch.TestExecution.RemoteTaskRunner "C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\target\bin\vc100\Debug" "C:\Users\jrobertson\AppData\Local\NCrunch\46888\50\target\bin\vc100\Debug\XYZ.UI.UnitTest.dll.config.ncrunchconfig"'
[17:29:26.5279-AnalysisTask-137] Process ID '52840' initialised
[17:29:26.6679-AnalysisTask-137] Registered usage of workspace: C:\Users\jrobertson\AppData\Local\NCrunch\46888\50 (now 3 usages)
[17:29:26.6679-AnalysisTask-137] Registered usage of workspace: C:\Users\jrobertson\AppData\Local\NCrunch\46888\49 (now 3 usages)
[17:29:26.6679-AnalysisTask-137] Registered usage of workspace: C:\Users\jrobertson\AppData\Local\NCrunch\46888\47 (now 3 usages)
[17:29:26.6679-AnalysisTask-137] Registered usage of workspace: C:\Users\jrobertson\AppData\Local\NCrunch\46888\44 (now 3 usages)
[17:29:26.6679-AnalysisTask-137] Registered usage of workspace: C:\Users\jrobertson\AppData\Local\NCrunch\46888\41 (now 3 usages)
[17:29:26.6679-AnalysisTask-137] Registered usage of workspace: C:\Users\jrobertson\AppData\Local\NCrunch\46888\48 (now 3 usages)
[17:29:26.6679-AnalysisTask-137] Registered usage of workspace: C:\Users\jrobertson\AppData\Local\NCrunch\46888\46 (now 3 usages)
[17:29:26.6679-AnalysisTask-137] Registered usage of workspace: C:\Users\jrobertson\AppData\Local\NCrunch\46888\42 (now 3 usages)
[17:29:26.8709-AnalysisTask-137] Calling into remote task runner to analyse target assembly: [SnapshotComponent: XYZ.UI.UnitTest, 7, 65183924]
[17:29:27.0259-AnalysisTask-137] ERROR (Analysis): A failure occurred while analysing the assembly [SnapshotComponent: XYZ.UI.UnitTest, 7, 65183924]: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at NUnit.Core.Builders.TestAssemblyBuilder.GetCandidateFixtureTypes(Assembly assembly, String ns)
at NUnit.Core.Builders.TestAssemblyBuilder.GetFixtures(Assembly assembly, String ns)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, Boolean autoSuites)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, String testName, Boolean autoSuites)
at NUnit.Core.TestSuiteBuilder.Build(TestPackage package)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitDynamicTestFinder.FindFrameworkTestsUsingRuntimeInvoke(TestPackage package, ILogger logger, List`1 tests)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitTestFramework.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, String assemblyFilePath, String[] referencedAssemblyFilePaths)
at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, String assemblyFilePath, String[] referencedAssemblyFilePaths, TestFrameworkDescription[] frameworks)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(TestFrameworkDescription[] applicableFrameworks)

[17:29:27.0309-AnalysisTask-137] Process 3db67b23131d48cfad38ade3b55107f2 with system Id 52840 has 34934784 bytes in use, checking against a configured memory limit of 0
[17:29:27.0309-AnalysisTask-137] Storing process 52840 in pool
[17:29:27.0309-AnalysisTask-137] Task processing complete for [AnalysisTask: [SnapshotComponent: XYZ.UI.UnitTest, 7, 62638178], BeingProcessed], processing time: 00:00:00


Or am I missing something inferred by the order in which the .dlls are loaded. It looks like they complete, the ncrunch engine continues to fire up, and then the error is later leaving us still without an idea of which assembly is failing to load.
Remco
#12 Posted : Thursday, July 11, 2013 1:28:32 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Sorry Jeremy, it looks like the new code intended to emit the error details has completely failed.

I've updated the 1.46 release with a new revision that I hope should solve this problem and spit out the correct details. If you download and install the latest revision on the download page, the error details should now (hopefully) be showing in the Tests Window where they should be.
JeremyR
#13 Posted : Thursday, July 11, 2013 3:38:14 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/20/2013(UTC)
Posts: 6
Location: United States of America

No code change from yesterday and now the NCrunch build fails where the msbuild succeeds.:

Quote:
[09:35:59.5456-AnalysisTask-6] ERROR (Internal): System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at nCrunch.Common.ListExtensions.#=qEvejJ7AQqwGu4il9mklX5FMaSEC0Wp3OnguExmdP618=[T](T #=qxAt3uU5M0sUrlBk_pMDi2Q==)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at nCrunch.Common.ListExtensions.JoinAsStrings[T](IEnumerable`1 values, String seperator)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(TestFrameworkDescription[] applicableFrameworks)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at nCrunch.TestExecution.IRemoteTaskRunner.AnalyseAssembly(TestFrameworkDescription[] applicableFrameworks)
at nCrunch.Core.TestManagement.TestRunnerProcess.AnalyseAssembly(TestFrameworkDescription[] applicableFrameworks)
at nCrunch.Core.AnalysisTask.#=qnUD1hL04Eaxk8wxrIPmdfCZqTApaYcS5PL4$x8XQL2gOx$ScoPcdngb5gkKLB6bv(ITestRunnerProcess #=q21LVskWYOslD$7Jk_1ow4gVl14$Gmcdh7LEK2frlDnQ=)
at nCrunch.Core.AnalysisTask.#=qSVC5QCmKP27c9KNydU67bbyyBZY7QWL4f$knNqYgCaQ=.#=qnBE9EAMrxpTYU2xWGIrJHvF8WAemidE5l6HpmKr8EHLlWFiPPQP81a48N8eKzdKO()
at nCrunch.Core.Processing.RuntimeTaskFacilitator.FacilitateRuntimeActionReturningSuccessFlag(ITestRunnerProcess process, Action action)
at nCrunch.Core.AnalysisTask.DoProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.ProcessingTask.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.ProcessingQueue.#=qf1qDf2ZvMsZEG8Uq2eYrcw==(ProcessingTask #=qNdhqjXN8wLxDhJcqsD03fw==)
Remco
#14 Posted : Thursday, July 11, 2013 11:54:36 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Sorry Jeremy. Without a way to reproduce the issue, I'm resorting to blind pitching at the moment to try and get more data about it. This isn't the most efficient troubleshooting method, but I think we'll get there. I've prepared another build if you're interested in giving it a try:

http://downloads.ncrunch.net/NCrunch_VS2012_1.46.0.18.msi
JeremyR
#15 Posted : Friday, July 12, 2013 7:36:57 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/20/2013(UTC)
Posts: 6
Location: United States of America

That one worked well enough to to tell me it was a badImageFormat Exception. Which I then tracked down to being a 64-bit assembly being run in 32-bit. So I dug around your wiki until I figured out how to get my test and other projects building in 64-bit and now all seems to be working.

Thanks,
Jeremy
Remco
#16 Posted : Saturday, July 13, 2013 5:25:07 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Excellent! Thanks for your patience Jeremy :)
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.203 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download