Windows error 0x80131015, -2146234347

Detailed Error Information

COR_E_CANNOTUNLOADAPPDOMAIN[1]

Message"Error while unloading appdomain."
Comment Error while unloading an appdomain

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode19 (0x013)
NameFACILITY_URT[2][3]
DescriptionThe source of the error code is .NET CLR.[2][3]
Error Code4117 (0x1015)

Questions

7votes
1answer

AppDomain.Unload throws in Finalizer?

So here is the story so far, I have this worker thingy which uses an AppDomain to perform some task. The domain is expensive to setup and teardown. So I create a cache per-thread of WeakReference objects to the worker thingy like so: class Worker { [ThreadStatic] static Dictionary<string, WeakReference> [...] read more
c#
appdomain
finalizer
7votes
2answers

How to gracefully unload a child AppDomain that has threads running

I have a service that loads a child AppDomain and then starts a thread running in it. It needs an AppDomain because it dynamically generates and loads some code and I need to be able to restart it without killing the whole service. So there is a thread running in [...] read more
c#
concurrency
marshalling
appdomain
6votes
2answers

Error while unloading appdomain. (Exception from HRESULT: 0x80131015), inside Windows Service

I receive this error in a windows service. This is the same service that I've previously discussed in my question here The code is revised to use Parallel.ForEach (my own version as this is a 3.5 windows service). The reason for the Parallel use is down to the fact that [...] read more
c#
exception
appdomain
4votes
1answer

Error while unloading AppDomain. (Exception from HRESULT: 0x80131015)

I am having this error after using ReportViewer. Upon exit it has this error. Don't know what is causing this. I am using C#. read more
c#
4votes
1answer

How to isolate a bad COM component (HP Quality Center 10.0) from a .Net application when performing integration tests

I'm currently working on some .Net based software (.Net Framework 3.5 SP1) that integrates with HP Quality Center 10.0 through it's COM Client API (often referred to as TDApiOle80 or TDApiOle80.TDConnection). We are using XUnit 1.6.1.1521 and Gallio 3.1.397.0 (invoked from an msbuild file) We go through a process of: [...] read more
.net
com
gallio
xunit.net
hp-quality-center
3votes
1answer

NUnit.Engine.NUnitEngineUnloadException : Multiple exceptions encountered. Retrieve AggregatedExceptions property for more information

When running my tests on build server TeamCity, I get [subject] in my log and step fails. The code was result of a rather large inclusion of code that makes it hard to pinpoint excactly what I'm doing wrong (and I'd rather not roll back changes and do it again [...] read more
nunit
2votes
1answer

Visualizer: An unhandled exception of type 'System.CannotUnloadAppDomainException' occurred in mscorlib.dll

I am attempting to write a Visual Studio Visualizer for Visual Studio 2015 following this guide: https://msdn.microsoft.com/en-us/library/ms164759.aspx However I want to use WPF instead of WinForms. For the visualizer I have this code: using Microsoft.VisualStudio.DebuggerVisualizers; [assembly: System.Diagnostics.DebuggerVisualizer(typeof(Visualizer.DebuggerSide), typeof(VisualizerObjectSource), Target = typeof(string), Description = "Visualizer")] namespace Visualizer { public class DebuggerSide [...] read more
c#
wpf
visual-studio-2015
2votes
3answers

Error while unloading appdomain. (Exception from HRESULT: 0x80131015) occurs when closing a form

I am using a login form to get a main form. Login form calls the main when the password is correct. Even if I commanded the login form to close, it doesnt show as closed, it remains minimized in the taskbar. But when i close the main form when its [...] read more
c#
exception
appdomain
1vote
0answers

How to find the source of a "Exception encountered unloading application domain" with the Nunit runner?

We have a big bunch of tests(6000+) in differents assemblies. We run them on a local Azure Agent, with the Nunit Test adapter. It was taking a very long time, so we activated the runInParallel. The yaml step is now the following: - task: VSTest@2 timeoutInMinutes: 300 inputs: testSelector: 'testAssemblies' [...] read more
c#
nunit
nunit-3.0
1vote
1answer

ICLRRuntimeHost::UnloadAppDomain fail

im trying to load a managed c++/cli dll into a native process so i created a bootstrap dll that start the clr and call the managed dll, everything works fine but i can't kill/unload the clr this is the code. InitCLR and FinitCLR are called by the injector the call [...] read more
c++
c++-cli
1vote
1answer

Disposing of ILoggerFactory in ASP.NET Core

In my ASP.NET Core project I have written an extention on ILoggerFactory that adds a custom ILoggerProvider. (Similar to NLog.Extensions.Logging) I'm adding this in Startup.cs: loggerFactory.AddRabbitLogger(Configuration.GetSection(nameof(WebLoggerOptions))); The logging is working perfectly, however, it sends messages to RabbitMQ and that means it opens a connection and a channel. These cannot stay [...] read more
c#
asp.net-core
rabbitmq
1vote
2answers

Entity Framework 6 update-database throws error while unloading appdomain

We have an EF6 application that is currently using automatic migrations. Our DbMigrationsConfiguration class is: public Configuration() { AutomaticMigrationsEnabled = true; AutomaticMigrationDataLossAllowed = true; } This has all been working fine for a few months, somewhere in the last week it has started to throw an error whilst seeding. I [...] read more
c#
entity-framework
1vote
0answers

Background thread throws exception when unloading in AppDomain, how can I stop it? Error while uploading appdomain (HRESULT 0x80131015)

I've been using this program. I am currently running the server program in an appdomain. However, when I want to unload it, it returns an exception with HRESULT 0x80131015. This only occurs when I start the pipeServer by clicking the button. I've checked which threads are running and tried to [...] read more
multithreading
background
appdomain
hresult
0votes
0answers

TFS Test and Build report back as Failed despite 100% tests passed

From my on-premises TFS 2018 I get the following report back: enter image description here [https://i.stack.imgur.com/6nCbh.png] How can a test be failed an yet 100% passed? If I look at the detailed error message it tell me that all steps except for 64 bit tests was successful. enter image description [...] read more
tfs
mstest
0votes
1answer

SQL Server reporting services scheduler loops, running amok

We have a Windows Server 2008 R2, Service Pack 1 with an SQL Server 2008 R2 (Microsoft SQL Server Standard Edition (64-bit), version 10.50.4042.0) for creating scheduled reports in SSRS. The Report Server services didn't start up after a server restart a while ago and when I noticed that after [...] read more
sql-server
reporting-services
sql-server-2008-r2
ssrs-2008-r2
0votes
1answer

Weird behaviour when I open a reportviewer in WPF

When I open a report in my WPF project once, I get this message this message when I exit {"Error while unloading appdomain. (Exception from HRESULT: 0x80131015)"} Stack Trace : at System.AppDomain.Unload(AppDomain domain) at Microsoft.ReportingServices.RefCountedAppDomain.Dispose() at Microsoft.Reporting.WinForms.LocalReport.ReportRuntimeSetupHandler.ReleaseSandboxAppDomain() at Microsoft.Reporting.WinForms.LocalReport.Dispose() at Microsoft.Reporting.WinForms.ReportInfo.Dispose() at Microsoft.Reporting.WinForms.ReportHierarchy.Clear() at Microsoft.Reporting.WinForms.ReportViewer.Dispose(Boolean disposing) at System.ComponentModel.Component.Finalize() Is there [...] read more
.net
wpf
reportviewer

Comments

Leave a comment

(plain text only)

Sources

  1. https://github.com/dotnet/coreclr/blob/v1.1.0/src/inc/corerror.xml
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  3. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0