Test throws an exception in NUnit but works when running in MSTest or as a Console application
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit Framework |
New
|
Undecided
|
Unassigned |
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.
using Microsoft.
namespace TestProject1
{
[TestClass]
public class UnitTest1
{
public void TestMethod1()
{
Axapta ax = new Axapta();
}
}
}
Error:
FatalExecutionE
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.
Charlie Poole (charlie.poole) wrote : | #1 |
Mun Wai Chan (munwai) wrote : | #2 |
Hi Charlie,
I must have pasted in the code from the MSTest project but it is definitely using the Nunit attributes. We only use NUnit and just found this bug yesterday and so we decided to test with MSTest to confirm if it is a NUnit thing.
That is my main concern which is you not having access to the product. Is there anything I can do to make it easier to debug? Maybe a Goto Meeting or something? I can send you the Microsoft dll that is involved which is the .Net Business Connector dll but you would still need to have a system to try connecting to for the error to occur.
Please let me know what I can do to help you fix this bug (if possible).
Thanks,
Mun Wai
Mun Wai Chan (munwai) wrote : | #3 |
Charlie,
FYI, the software is also available on MSDN if you have an account with them.
Regards,
Mun Wai
Charlie Poole (charlie.poole) wrote : Re: [Bug 1064804] Re: Test throws an exception in NUnit but works when running in MSTest or as a Console application | #4 |
Lets try some easier stuff first. If you isolate the tests by running
them in a separate process from NUnit, what happens?
Charlie
On Tue, Oct 9, 2012 at 9:01 PM, Mun Wai Chan
<email address hidden> wrote:
> Charlie,
>
> FYI, the software is also available on MSDN if you have an account with
> them.
>
> Regards,
>
> Mun Wai
>
> --
> You received this bug notification because you are subscribed to NUnit
> Extended Testing Platform.
> https:/
>
> Title:
> Test throws an exception in NUnit but works when running in MSTest or
> as a Console application
>
> To manage notifications about this bug go to:
> https:/
Mun Wai Chan (munwai) wrote : | #5 |
As mentioned above, I ran it in a Console app and it worked.
using Microsoft.
namespace ConsoleApplication1
{
public class Program
{
public static void Main(string[] args)
{
Axapta ax = new Axapta();
}
}
}
Charlie Poole (charlie.poole) wrote : | #6 |
Right, but I'm suggesting you run it under NUnit using process
isolation. You can do that by using the Settings menu, which
includes a page for specifying how tests are loaded.
Charlie
On Tue, Oct 9, 2012 at 10:27 PM, Mun Wai Chan
<email address hidden> wrote:
> As mentioned above, I ran it in a Console app and it worked.
>
> using Microsoft.
>
> namespace ConsoleApplication1
> {
> public class Program
> {
> public static void Main(string[] args)
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> ax.Logoff();
> }
> }
> }
>
> --
> You received this bug notification because you are subscribed to NUnit
> Extended Testing Platform.
> https:/
>
> Title:
> Test throws an exception in NUnit but works when running in MSTest or
> as a Console application
>
> To manage notifications about this bug go to:
> https:/
Mun Wai Chan (munwai) wrote : | #7 |
Sorry, I misunderstood you. Is below what you meant?
I loaded the unit test dll using the NUnit gui and went to Tools -> Settings -> Assembly Isolation.
Tried running in all 3 options
1) Run tests directly in NUnit process.
2) Run tests in single separate process.
3) Run tests in a seperate process per Assembly.
And all 3 options crashes the NUnit gui.
Simone Busoli (simone.busoli) wrote : Re: [Nunit-core] [Bug 1064804] Re: Test throws an exception in NUnit but works when running in MSTest or as a Console application | #8 |
I've found several reports of people complaining about a similar issue,
although there's not much information in them. In general they seem to be
related to the host of the application, that is, works in console but
breaks in ASP.NET, for instance.
The first thing I would try is to simulate with NUnit what MSTest (I guess)
does. Start by running the tests using nunit-console.exe and see if
anything changes.
Then if your project is compiled for >= .NET 4.0 please modify the
nunit-console.
ONLY: http://
https:/
http://
https:/
On Wed, Oct 10, 2012 at 8:25 AM, Mun Wai Chan
<email address hidden>wrote:
> Sorry, I misunderstood you. Is below what you meant?
>
> I loaded the unit test dll using the NUnit gui and went to Tools ->
> Settings -> Assembly Isolation.
>
> Tried running in all 3 options
>
> 1) Run tests directly in NUnit process.
> 2) Run tests in single separate process.
> 3) Run tests in a seperate process per Assembly.
>
> And all 3 options crashes the NUnit gui.
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
Mun Wai Chan (munwai) wrote : | #9 |
I have actually tried the above previously before giving up as I had no idea what else can be different.
I added the following to the nunit-console-
<startup useLegacyV2Runt
<supportedRu
</startup>
And then ran the test using the following command:
And the console crashed.
Mun Wai Chan (munwai) wrote : | #10 |
The weird thing is running MSTest in Visual Studio works but running it under Resharper does not. And for Nunit, both NUnit console, gui and Resharper produced the same error.
Simone Busoli (simone.busoli) wrote : | #11 |
With the same exception, I guess (look at the event log eventually). What
about the non-x86 version of the console?
On Wed, Oct 10, 2012 at 9:39 AM, Mun Wai Chan
<email address hidden>wrote:
> I have actually tried the above previously before giving up as I had no
> idea what else can be different.
>
> I added the following to the nunit-console-
>
> <startup useLegacyV2Runt
> <supportedRuntime version="v4.0" sku=".NETFramew
> </startup>
>
> And then ran the test using the following command:
>
> nunit-console-
>
> And the console crashed.
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
Mun Wai Chan (munwai) wrote : | #12 |
The event logs are showing the following:
1) Application: nunit-console-
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-
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\
Faulting module path: C:\Windows\
Report Id: dec260e7-
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.
Mun Wai Chan (munwai) wrote : | #13 |
Also, setting the project platform to x64 will produce the following error.
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
.F
Tests run: 1, Errors: 1, Failures: 0, Inconclusive: 0, Time: 0.344 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Errors and Failures:
1) Test Error : ClassLibrary1.
System.
ynamics.
1bf3856ad364e35' or one of its dependencies. An attempt was made to load a progr
am with an incorrect format.
at ClassLibrary1.
Simone Busoli (simone.busoli) wrote : | #14 |
Hi,
I still don't have clear if your project is compiled for .NET 2-3.5 or 4.x.
I assume it's the former, so let's exclude x64 and .NET 4.0. Please also
try to use a more recent version of NUnit as you're still using 2.5 (the
most recent is 2.6.1).
Then please run nunit-console-x86 under .NET 2.0 (remove the .config
changes basically) against your project compiled for Any CPU (or x86) and
paste what you see in the EventLog.
If you still get:
Could not load file or assembly 'ClassLibrary1' or one of its dependencies.
The system cannot find the file specified.
Please provide the fusion log.
Simone
On Wed, Oct 10, 2012 at 10:49 AM, Mun Wai Chan
<email address hidden>wrote:
> The event logs are showing the following:
>
> 1) Application: nunit-console-
> 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-
> 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\
> Faulting module path: C:\Windows\
> Report Id: dec260e7-
>
> 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:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {...
Mun Wai Chan (munwai) wrote : | #15 |
Hi Simone,
I did what you said as above.
1) Compiled it as .Net 2.0 and x86.
2) Remove the config changes.
3) Run nunit-console-x86
And it still crashes. The event logs are below.
1) .NET Runtime version 2.0.50727.5456 - Fatal Execution Engine Error (79AFEABE) (80131506)
2) Faulting application name: nunit-console-
Faulting module name: mscorwks.dll, version: 2.0.50727.5456, time stamp: 0x4ef6c72d
Exception code: 0xc0000005
Fault offset: 0x0000ee3b
Faulting process id: 0x%9
Faulting application start time: 0x%10
Faulting application path: %11
Faulting module path: %12
Report Id: %13
Mun Wai
Mun Wai Chan (munwai) wrote : | #16 |
I am sorry, I missed the part about using the latest version. I installed the latest version and ran it.
E:\New folder (3)\ClassLibrar
n\nunit-
NUnit-Console version 2.6.1.12217
Copyright (C) 2002-2012 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: 2.0.50727.5456 ( Net 3.5 )
ProcessModel: Default DomainUsage: Single
Execution Runtime: net-3.5
.
And it crashes as well. The event logs are:
1) .NET Runtime version 2.0.50727.5456 - Fatal Execution Engine Error (79AFEABE) (80131506)
2) Faulting application name: nunit-console-
Faulting module name: mscorwks.dll, version: 2.0.50727.5456, time stamp: 0x4ef6c72d
Exception code: 0xc0000005
Fault offset: 0x0000ee3b
Faulting process id: 0x%9
Faulting application start time: 0x%10
Faulting application path: %11
Faulting module path: %12
Report Id: %13
Simone Busoli (simone.busoli) wrote : | #17 |
Hmm, not very helpful, I'm afraid. Let's see if Charlie has any other
ideas. We might also consider inspecting a crash dump if you can generate
one.
In some of the links I sent they suggested that updating to a more recent
version of the Business Connector might solve the problem, do you have any
chance to try it?
On Wed, Oct 10, 2012 at 2:56 PM, Mun Wai Chan
<email address hidden>wrote:
> Hi Simone,
>
> I did what you said as above.
>
> 1) Compiled it as .Net 2.0 and x86.
> 2) Remove the config changes.
> 3) Run nunit-console-x86
>
> And it still crashes. The event logs are below.
>
> 1) .NET Runtime version 2.0.50727.5456 - Fatal Execution Engine Error
> (79AFEABE) (80131506)
> 2) Faulting application name: nunit-console-
> time stamp: 0x4bd0d2b3
> Faulting module name: mscorwks.dll, version: 2.0.50727.5456, time stamp:
> 0x4ef6c72d
> Exception code: 0xc0000005
> Fault offset: 0x0000ee3b
> Faulting process id: 0x%9
> Faulting application start time: 0x%10
> Faulting application path: %11
> Faulting module path: %12
> Report Id: %13
>
>
> Mun Wai
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help ...
Jv (jv-ravichandran) wrote : Re: [Bug 1064804] [NEW] Test throws an exception in NUnit but works when running in MSTest or as a Console application | #18 |
Hi,
From the start,
>> Common sources of this bug include user marshaling errors for
COM-interop or PInvoke, which may corrupt the stack.
1. When working in the unmanaged context, it is worth trying the STAThread
attribute on the method.
>> ax.LogonAs("User1", "Globe", new NetworkCredenti
"Globe"
2. Try adding a role for the user with ax32.exe (if it already exists,
please post the role). Plus test permission sets and any admin tasks that
was done during installation of Ax.
3. It looks like with messages on "marshalling" and Domain usage: Single,
it could well be related to the CLR, the GAC and the Dll context. These are
vague references that can be clarified if you walk us through your
installation type of AX, the CLR version, the roles and permission sets.
Jv
On Wed, Oct 10, 2012 at 7:58 AM, Mun Wai Chan
<email address hidden>wrote:
> Public bug reported:
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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.
>
> ** Affects: nunitv2
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
Mun Wai Chan (munwai) wrote : | #19 |
Hi Simone,
The version of Ax I am using is the latest. (Ax 4 SP2).
What tool should I use to create a crashdump. I tried Microsoft's DebugDiag but it doesn't seem to capture the dump when running nunit-console-x86 from the command prompt.
Mun Wai
Mun Wai Chan (munwai) wrote : | #20 |
Hi Jv,
>>1. When working in the unmanaged context, it is worth trying the STAThread
attribute on the method.
Tried adding this and it still crashes.
>>2. Try adding a role for the user with ax32.exe (if it already exists,
please post the role). Plus test permission sets and any admin tasks that
was done during installation of Ax.
I am a domain and Ax admin.
>>3. It looks like with messages on "marshalling" and Domain usage: Single,
it could well be related to the CLR, the GAC and the Dll context. These are
vague references that can be clarified if you walk us through your
installation type of AX, the CLR version, the roles and permission sets.
The thing is why does it work for MSTest but not NUnit? Which makes me think that it is not related to permissions.
Thanks,
Mun Wai
Jv (jv-ravichandran) wrote : Re: [Bug 1064804] Re: Test throws an exception in NUnit but works when running in MSTest or as a Console application | #21 |
It may be related to the AppDomain (s) that are being used.
Are you sure the attribute on your class is [TestFixture] when you run the
test in NUnit?
Jv
On Thu, Oct 11, 2012 at 7:06 AM, Mun Wai Chan
<email address hidden>wrote:
> Hi Jv,
>
> >>1. When working in the unmanaged context, it is worth trying the
> STAThread
> attribute on the method.
>
> Tried adding this and it still crashes.
>
> >>2. Try adding a role for the user with ax32.exe (if it already exists,
> please post the role). Plus test permission sets and any admin tasks that
> was done during installation of Ax.
>
> I am a domain and Ax admin.
>
> >>3. It looks like with messages on "marshalling" and Domain usage: Single,
> it could well be related to the CLR, the GAC and the Dll context. These are
> vague references that can be clarified if you walk us through your
> installation type of AX, the CLR version, the roles and permission sets.
>
> The thing is why does it work for MSTest but not NUnit? Which makes me
> think that it is not related to permissions.
>
> Thanks,
>
> Mun Wai
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
>
--
Regards,
Ravichandran Jv
http://
Mun Wai Chan (munwai) wrote : | #22 |
Yup. I have 3 separate projects in one solution (NUnit, Console and MSTest). Below is the source code for NUnit.
using System;
using System.Net;
using Microsoft.
using NUnit.Framework;
namespace ClassLibrary1
{
[TestFixture]
public class Class1
{
[Test]
public void Test()
{
}
}
}
Charlie Poole (charlie.poole) wrote : | #23 |
The absense of a TestFixture attribute is not going to crash NUnit.
Charlie
On Wed, Oct 10, 2012 at 7:52 PM, Jv <email address hidden> wrote:
> It may be related to the AppDomain (s) that are being used.
>
> Are you sure the attribute on your class is [TestFixture] when you run the
> test in NUnit?
>
> Jv
>
> On Thu, Oct 11, 2012 at 7:06 AM, Mun Wai Chan
> <email address hidden>wrote:
>
>> Hi Jv,
>>
>> >>1. When working in the unmanaged context, it is worth trying the
>> STAThread
>> attribute on the method.
>>
>> Tried adding this and it still crashes.
>>
>> >>2. Try adding a role for the user with ax32.exe (if it already exists,
>> please post the role). Plus test permission sets and any admin tasks that
>> was done during installation of Ax.
>>
>> I am a domain and Ax admin.
>>
>> >>3. It looks like with messages on "marshalling" and Domain usage: Single,
>> it could well be related to the CLR, the GAC and the Dll context. These are
>> vague references that can be clarified if you walk us through your
>> installation type of AX, the CLR version, the roles and permission sets.
>>
>> The thing is why does it work for MSTest but not NUnit? Which makes me
>> think that it is not related to permissions.
>>
>> Thanks,
>>
>> Mun Wai
>>
>> --
>> You received this bug notification because you are a member of NUnit
>> Developers, which is subscribed to NUnit V2.
>> https:/
>>
>> 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.
>> using Microsoft.
>>
>> namespace TestProject1
>> {
>> [TestClass]
>> public class UnitTest1
>> {
>> [TestMethod]
>> public void TestMethod1()
>> {
>> Axapta ax = new Axapta();
>> ax.LogonAs("User1", "Globe", new NetworkCredenti
>> "pwd", "Globe"), default(string), default(string),
>> "A6BuildTestAos
>> ax.Logoff();
>> }
>> }
>> }
>>
>> Error:
>>
>> FatalExecutionE
>> 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:/
Jv (jv-ravichandran) wrote : | #24 |
In the Tools->Settings dialog is a TestLoader option that sets the
PrincipalPolicy. Have you seen the setting (unchecked by default).
Jv
On Thu, Oct 11, 2012 at 8:33 AM, Mun Wai Chan
<email address hidden>wrote:
> Yup. I have 3 separate projects in one solution (NUnit, Console and
> MSTest). Below is the source code for NUnit.
>
> using System;
> using System.Net;
> using Microsoft.
> using NUnit.Framework;
>
> namespace ClassLibrary1
> {
> [TestFixture]
> public class Class1
> {
> [Test]
> public void Test()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new
> NetworkCredenti
> default(string), "devaos2:2714",
> default(string));
> ax.Logoff();
> }
> }
> }
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
>
--
Regards,
Ravichandran Jv
http://
Mun Wai Chan (munwai) wrote : | #25 |
The option Set principal policy is unchecked in Tools -> Settings -> Test Loader -> Advanced.
Jv (jv-ravichandran) wrote : | #26 |
NetworkCredential works on challenge, I believe, so please confirm if your
console app has the same code as the test call. Is "Globe" the fully
qualified domain name? I think that it has got to do with
security/
Jv
On Thu, Oct 11, 2012 at 8:33 AM, Mun Wai Chan
<email address hidden>wrote:
> Yup. I have 3 separate projects in one solution (NUnit, Console and
> MSTest). Below is the source code for NUnit.
>
> using System;
> using System.Net;
> using Microsoft.
> using NUnit.Framework;
>
> namespace ClassLibrary1
> {
> [TestFixture]
> public class Class1
> {
> [Test]
> public void Test()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new
> NetworkCredenti
> default(string), "devaos2:2714",
> default(string));
> ax.Logoff();
> }
> }
> }
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
>
--
Regards,
Ravichandran Jv
http://
Mun Wai Chan (munwai) wrote : | #27 |
Yup. I copied and paste the code into each project. They are exactly the same code, line for line.
Jv (jv-ravichandran) wrote : | #28 |
Here is some help -
http://
On Thu, Oct 11, 2012 at 8:53 AM, Mun Wai Chan
<email address hidden>wrote:
> The option Set principal policy is unchecked in Tools -> Settings ->
> Test Loader -> Advanced.
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
>
--
Regards,
Ravichandran Jv
http://
Jv (jv-ravichandran) wrote : | #29 |
Attach the NUnit process to VS Debugger and see at which breakpoint it
crashes.
On Thu, Oct 11, 2012 at 9:11 AM, Mun Wai Chan
<email address hidden>wrote:
> Yup. I copied and paste the code into each project. They are exactly the
> same code, line for line.
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
>
--
Regards,
Ravichandran Jv
http://
Mun Wai Chan (munwai) wrote : | #30 |
Just to prove that it has nothing to do with the Network Credentials, I have used the Logon method instead and it crashes as well.
using Microsoft.
using NUnit.Framework;
namespace ClassLibrary1
{
[TestFixture]
public class Class1
{
[Test]
public void Test()
{
}
}
}
Mun Wai Chan (munwai) wrote : | #31 |
It crashes on the Logon/LogonAs method.
Jv (jv-ravichandran) wrote : | #32 |
ExpectedException should tell you the exception then.
On Thu, Oct 11, 2012 at 9:31 AM, Mun Wai Chan
<email address hidden>wrote:
> It crashes on the Logon/LogonAs method.
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
>
--
Regards,
Ravichandran Jv
http://
Mun Wai Chan (munwai) wrote : | #33 |
The exception is mentioned above if that is what you meant.
FatalExecutionE
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.
Jv (jv-ravichandran) wrote : | #34 |
Must have missed it. Browsers handle http errors like 404 but the same
cannot be said for apps. Will respond if I get something.
Jv
On Thu, Oct 11, 2012 at 9:59 AM, Mun Wai Chan
<email address hidden>wrote:
> The exception is mentioned above if that is what you meant.
>
> FatalExecutionE
> 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.
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
>
--
Regards,
Ravichandran Jv
http://
Simone Busoli (simone.busoli) wrote : Re: [Nunit-core] [Bug 1064804] Re: Test throws an exception in NUnit but works when running in MSTest or as a Console application | #35 |
Hi Mun,
you can try this:
http://
On Thu, Oct 11, 2012 at 3:34 AM, Mun Wai Chan
<email address hidden>wrote:
> Hi Simone,
>
> The version of Ax I am using is the latest. (Ax 4 SP2).
>
> What tool should I use to create a crashdump. I tried Microsoft's
> DebugDiag but it doesn't seem to capture the dump when running nunit-
> console-x86 from the command prompt.
>
> Mun Wai
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
Mun Wai Chan (munwai) wrote : | #36 |
Does this help?
E:\New folder (3)>procdump.exe -ma -e 1 -f "" -x "e:\New folder (3)" "c:\Program
Files (x86)\NUnit 2.6.1\bin\
ProcDump v5.00 - Writes process dump files
Copyright (C) 2009-2012 Mark Russinovich
Sysinternals - www.sysinternal
With contributions from Andrew Richards
Process: nunit-x86.exe (26956)
CPU threshold: n/a
Performance counter: n/a
Commit threshold: n/a
Threshold seconds: n/a
Number of dumps: 1
Hung window check: Disabled
Exception monitor: First Chance+Unhandled
Exception filter: Display Only
Terminate monitor: Disabled
Dump file: e:\New folder (3)\nunit-x86.dmp
Press Ctrl-C to end monitoring without terminating the process.
CLR Version: v2.0.50727
[10:59:29] Exception: 80000003.BREAKPOINT
[10:59:29] Exception: 80000004.
[10:59:29] Exception: 80000003.BREAKPOINT
[10:59:39] Exception: 000006BA
[10:59:42] Exception: E06D7363.
[10:59:42] Exception: E06D7363.msc
[10:59:42] Exception: E06D7363.
[10:59:42] Exception: E06D7363.msc
[10:59:42] Exception: E06D7363.
[10:59:42] Exception: E06D7363.msc
[10:59:42] Exception: E06D7363.
[10:59:42] Exception: E0434F4D.
[10:59:45] Exception: 80000003.BREAKPOINT
[10:59:45] Exception: 80000004.
[10:59:45] Exception: 80000003.BREAKPOINT
[10:59:45] Exception: 80000004.
[10:59:45] Exception: 80000003.BREAKPOINT
[10:59:45] Exception: 80000003.BREAKPOINT
[10:59:45] Exception: 80000004.
[10:59:45] Exception: 80000003.BREAKPOINT
[10:59:45] Exception: 80000004.
[10:59:45] Exception: 80000003.BREAKPOINT
[10:59:45] Exception: 80000003.BREAKPOINT
[10:59:47] Exception: 000006D9
[10:59:47] Exception: 000006D9
[10:59:48] Exception: C0000005.
The process has exited.
Simone Busoli (simone.busoli) wrote : | #37 |
Could you attach the crash dump or send it privately via email?
On Fri, Oct 12, 2012 at 5:00 AM, Mun Wai Chan
<email address hidden>wrote:
> Does this help?
>
> E:\New folder (3)>procdump.exe -ma -e 1 -f "" -x "e:\New folder (3)"
> "c:\Program
> Files (x86)\NUnit 2.6.1\bin\
>
> ProcDump v5.00 - Writes process dump files
> Copyright (C) 2009-2012 Mark Russinovich
> Sysinternals - www.sysinternal
> With contributions from Andrew Richards
>
> Process: nunit-x86.exe (26956)
> CPU threshold: n/a
> Performance counter: n/a
> Commit threshold: n/a
> Threshold seconds: n/a
> Number of dumps: 1
> Hung window check: Disabled
> Exception monitor: First Chance+Unhandled
> Exception filter: Display Only
> Terminate monitor: Disabled
> Dump file: e:\New folder (3)\nunit-x86.dmp
>
>
> Press Ctrl-C to end monitoring without terminating the process.
>
> CLR Version: v2.0.50727
>
> [10:59:29] Exception: 80000003.BREAKPOINT
> [10:59:29] Exception: 80000004.
> [10:59:29] Exception: 80000003.BREAKPOINT
> [10:59:39] Exception: 000006BA
> [10:59:42] Exception: E06D7363.
> [10:59:42] Exception: E06D7363.msc
> [10:59:42] Exception: E06D7363.
> [10:59:42] Exception: E06D7363.msc
> [10:59:42] Exception: E06D7363.
> [10:59:42] Exception: E06D7363.msc
> [10:59:42] Exception: E06D7363.
> [10:59:42] Exception: E0434F4D.
> [10:59:45] Exception: 80000003.BREAKPOINT
> [10:59:45] Exception: 80000004.
> [10:59:45] Exception: 80000003.BREAKPOINT
> [10:59:45] Exception: 80000004.
> [10:59:45] Exception: 80000003.BREAKPOINT
> [10:59:45] Exception: 80000003.BREAKPOINT
> [10:59:45] Exception: 80000004.
> [10:59:45] Exception: 80000003.BREAKPOINT
> [10:59:45] Exception: 80000004.
> [10:59:45] Exception: 80000003.BREAKPOINT
> [10:59:45] Exception: 80000003.BREAKPOINT
> [10:59:47] Exception: 000006D9
> [10:59:47] Exception: 000006D9
> [10:59:48] Exception: C0000005.
> The process has exited.
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> ...
Mun Wai Chan (munwai) wrote : | #38 |
Hi Simone,
Can you advise me the command to run?
Thanks,
Mun Wai
Simone Busoli (simone.busoli) wrote : | #39 |
You should have it already with the command you launched, see my quote
below:
On Fri, Oct 12, 2012 at 5:00 AM, Mun Wai Chan
<email address hidden>wrote:
> Dump file: e:\New folder (3)\nunit-x86.dmp
Mun Wai Chan (munwai) wrote : | #40 |
Simone Busoli (simone.busoli) wrote : | #41 |
Hi Mun,
not enough I'm afraid as it looks like a minidump rather than a full dump.
In any case I doubt it will be useful, I did a bit of research and I'm not
sure analyzing it will give us any clue of what's going on. I believe the
very best thing we could do is experiment, but it takes time especially as
we don't have access to that code and cannot reproduce the problem.
In any case one somewhat simple thing you could do is compile nunit for
.net 4.0 and try to run your tests with it, after you compile them and your
production code for .net 4.0 too. Since these kind of exceptions might be
related to the CLR itself (although quite unlikely) it might be something
which in CLR 4 went away.
To compile NUnit for 4.0 pull the code from launchpad with a bazaar client
and just run build net-4.0 in the root folder.
Simone
On Fri, Oct 12, 2012 at 11:52 AM, Mun Wai Chan
<email address hidden>wrote:
> Here you go.
>
> ** Attachment added: "nunit-
>
> https:/
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More h...
Mun Wai Chan (munwai) wrote : | #42 |
Hi Simone,
I did a checkout of the NUnit source code using "bzr branch lp:nunitv2".
I then changed all the projects in the solution to .Net 4 (target framework) and nunit-console.exe project to x86. I also recompiled my test to use .Net 4. I then ran the tests and the console still crashes.
E:\New folder (3)\ClassLibrar
g\nunit-
NUnit-Console version 2.6.2.0
Copyright (C) 2002-2012 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
.
Simone Busoli (simone.busoli) wrote : | #43 |
Hi, what you did won't give you the expected results. Please follow these
steps:
1. bzr branch lp:nunitv2
2. open a console and "cd" into the root folder
3. run ".\build.bat net-4.0" from the command line
4. run your tests with ".\builds\
Simone
On Mon, Oct 15, 2012 at 9:12 AM, Mun Wai Chan
<email address hidden>wrote:
> Hi Simone,
>
> I did a checkout of the NUnit source code using "bzr branch lp:nunitv2".
>
> I then changed all the projects in the solution to .Net 4 (target
> framework) and nunit-console.exe project to x86. I also recompiled my
> test to use .Net 4. I then ran the tests and the console still crashes.
>
>
> E:\New folder (3)\ClassLibrar
> Code\nunitv2\
> g\nunit-
> NUnit-Console version 2.6.2.0
> Copyright (C) 2002-2012 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
> .
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https:/
>
> 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.
> using Microsoft.
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredenti
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionE
> 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:/
>
> _______
> Mailing li...
Mun Wai Chan (munwai) wrote : | #44 |
Hi,
I did as above and it is still crashing.
BUILD SUCCEEDED
Total time: 0.3 seconds.
[copy] Copying 1 file to 'E:\TEST\
unit'.
[copy] Copying 2 files to 'E:\TEST\
BUILD SUCCEEDED
Total time: 18.5 seconds.
E:\TEST\
assLibrary1\
NUnit-Console version 2.6.2.12289
Copyright (C) 2002-2012 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
.
The exception from the event logs:
Application: nunit-console-
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.
affects: | nunitv2 → nunit-3.0 |
We'll accept the bug, in order to make the info about it available to other users. Assuming that the Axapta class relates to the Microsoft product of the same name, there isn't much we can do about fixing it without a lot more information. We don't have access to the product in question.
The test you included is not actually an NUnit test, since it uses MsTest attributes. Can we assume you changed the attributes when running under NUnit?
Charlie