nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #03060
[Bug 1064804] Re: Test throws an exception in NUnit but works when running in MSTest or as a Console application
The event logs are showing the following:
1) Application: nunit-console-x86.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at IP 5785CA87 (57840000) with exit code 80131506.
2) Faulting application name: nunit-console-x86.exe, version: 2.5.5.10112, time stamp: 0x4bd0d2b3
Faulting module name: clr.dll, version: 4.0.30319.17929, time stamp: 0x4ffa5753
Exception code: 0xc0000005
Fault offset: 0x0001ca87
Faulting process id: 0x3738
Faulting application start time: 0x01cda6c39f7339f7
Faulting application path: c:\Program Files (x86)\NUnit 2.5.5\bin\net-2.0\nunit-console-x86.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report Id: dec260e7-12b6-11e2-8130-00248c544315
The non-x86 will not work because this is a Microsoft Dynamics AX 4
business connector and there is only a 32 bit version of it. Running the
following will give an error of:
NUnit version 2.5.5.10112
Copyright (C) 2002-2009 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
CLR Version: 4.0.30319.17929 ( Net 4.0 )
ProcessModel: Default DomainUsage: Single
Execution Runtime: net-4.0
Could not load file or assembly 'ClassLibrary1' or one of its dependencies. The
system cannot find the file specified.
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/1064804
Title:
Test throws an exception in NUnit but works when running in MSTest or
as a Console application
Status in NUnit V2 Test Framework:
New
Bug description:
Hi,
I have a simple test which throws an error when I run it using NUnit
(fails on both NUnit GUI/console and Resharper in VS). However, if ran
using Visual Studio's Test -> Debug option or as a Console
application, it runs fine. The code is exactly the same for the 3
different projects types (NUnit, Console and MSTest).
Source code for NUnit test:
using System.Net;
using Microsoft.Dynamics.BusinessConnectorNet;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
Axapta ax = new Axapta();
ax.LogonAs("User1", "Globe", new NetworkCredential("User1", "pwd", "Globe"), default(string), default(string), "A6BuildTestAos:6004", default(string));
ax.Logoff();
}
}
}
Error:
FatalExecutionEngineError was detected.
The runtime has encountered a fatal error. The address of the error was at 0x5785ca87, on thread 0x792c. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
Thanks in advance.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/1064804/+subscriptions
Follow ups
References