Bug 39115 - XUnit No Stacktrace available
Summary: XUnit No Stacktrace available
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2016-02-25 11:14 UTC by David
Modified: 2016-03-08 12:41 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Demo Project (43.16 KB, application/zip)
2016-03-08 06:40 UTC, David

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description David 2016-02-25 11:14:55 UTC

I'm not able to see the stacktrace in my xunit tests when i execute them over gui or xunit.runner. I'm sure that it is a problem with mono. I did use the same assembly in my test and installed two different mono versions over package-manager apt-get.

1. First i purge all mono stuff...
2. Installed over default ubuntu package repository and get
=>   Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4ubuntu1.1)
3. Execute tests => working!
Output of xunit runner:

xUnit.net console test runner (64-bit .NET 4.0.30319.17020)
Copyright (C) 2015 Outercurve Foundation.                                                                                                                                      

Discovering: Namespace
Discovered:  Namespace
Starting:    Namespace
   Namespace.ChangeRequestServiceTest.SetFinishedAndUpdate_CloseOther_Call [FAIL]
      System.ArgumentNullException : Argument cannot be null.
      Parameter name: source
      Stack Trace:
           at System.Linq.Check.Source (System.Object source) [0x00000] in <filename unknown>:0
           at System.Linq.Enumerable.Any[ChangeRequest] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
           at Namespace.ChangeRequestService.SetFinishedAndUpdate (Namespace.ChangeRequest request, ChangeRequestStatus status) [0x00000] in <filename unknown>:0

4. Add to source list url from http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
5. apt-get update and upgrade
=> Mono JIT compiler version 4.2.2 (Stable Mon Feb 15 17:30:30 UTC 2016)
6. Try again => no Stacktrace anymore
Output of xunit runner:

xUnit.net console test runner (64-bit .NET 4.0.30319.17020)
Copyright (C) 2015 Outercurve Foundation.

Discovering: Namespace
Discovered:  Namespace
Starting:    Namespace
   NamespaceChangeRequestServiceTest.Accept_Set_FinishedProperties [FAIL]
      System.ArgumentNullException : Value cannot be null.
      Parameter name: source
Comment 1 Marek Safar 2016-03-05 15:00:00 UTC
I cannot reproduce the issue. Please provide steps how to reproduce it locally. Using sample projects produces following for me

~/xunit.runner.console.2.1.0/tools$ mono xunit.console.exe AssertExtensibility.dll

xUnit.net Console Runner (32-bit .NET 4.0.30319.42000)
  Discovering: AssertExtensibility
  Discovered:  AssertExtensibility
  Starting:    AssertExtensibility
    EqualExample.EqualStringIgnoreCase [FAIL]
      System.ArgumentOutOfRangeException : Index and length must refer to a location within the string.
      Parameter name: length
      Stack Trace:
          at System.String.Substring (Int32 startIndex, Int32 length) <0x3e0dfd8 + 0x00127> in <filename unknown>:0
          at EqualExample.EqualStringIgnoreCase () <0x4166160 + 0x0003f> in <filename unknown>:0
          at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
          at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x41597f8 + 0x0008f> in <filename unknown>:0
  Finished:    AssertExtensibility
   AssertExtensibility  Total: 10, Errors: 0, Failed: 1, Skipped: 0, Time: 0.320s
Comment 2 David 2016-03-07 07:02:23 UTC
Hi Marek!

thank you for your answer!

Are you using the same mono version? 

I've insert all informations i know. We have this problem in our team on a few machines. I can send you a demo project if you like. Where to upload?

Comment 3 Marek Safar 2016-03-07 20:08:54 UTC
You could attach your project to the bug report.

With steps how to reproduce it
Comment 4 David 2016-03-08 06:40:02 UTC
Created attachment 15301 [details]
Demo Project

Just run the xunit tests
Comment 5 Marek Safar 2016-03-08 12:41:44 UTC
This looks to be xunit issue. Upgrading to xunit 2.1 fixes the issue for me.