question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove -5 exit code on app domain unload failures

See original GitHub issue

Hi,

After updating from 3.7.0 to 3.8.0, NUnit gives an error exit code. Below is the error output from both 3.7.0 and 3.8.0. The way the NUnitEngineUnloadException is handled has changed, but I do believe it hasn’t been for the better… In 3.7.0 I didn’t get an error exit code, but in 3.8.0 I do.

In 3.7 I get this as engine errors: Unhandled Exception: NUnit.Engine.NUnitEngineException: Exception encountered unloading AppDomain Agent Process was terminated successfully after error. at NUnit.Engine.Runners.ProcessRunner.Dispose(Boolean disposing) at NUnit.Engine.Runners.AbstractTestRunner.Dispose() at NUnit.Engine.Runners.TestExecutionTask.Execute() at NUnit.Engine.Runners.ParallelTaskWorkerPool.ProcessTasksProc() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() powershell gives True as output for this process

In 3.8 I get the following: NUnit.Engine.NUnitEngineUnloadException : Multiple exceptions encountered. Retrieve AggregatedExceptions property for more information ----> NUnit.Engine.NUnitEngineUnloadException : Agent Process was terminated successfully after error. ----> NUnit.Engine.NUnitEngineUnloadException : Exception encountered unloading application domain ----> NUnit.Engine.NUnitEngineException : Exception encountered unloading application domain: Error while unloading ap pdomain. (Exception from HRESULT: 0x80131015) Application domain name: domain-f7378c0-*.dll Application domain BaseDirectory: Path powershell gives False as output for this process

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:43 (22 by maintainers)

github_iconTop GitHub Comments

5reactions
chillitomcommented, Feb 20, 2018

We can ignore the code but it’s just more build cruft for something that should be straightforward. Most people don’t give a toss about AppDomain unloading, AppDomains haven’t made it into .Net Core so going forwards they are going to be of less and less relevance. As noble as the sentiments are to make sure people identify related issues I don’t think it’s the job of the test framework and if it is going to do it then it should be opt in. I’ve wasted an afternoon on this, hundreds of others will too.

2reactions
ChrisMaddockcommented, Feb 21, 2018

Charlie - sorry I haven’t replied directly to your points - but I think the above is relevant. I don’t want to design a way for agents to report unload failures to the engine, if there’s never an actual need for an agent to unload an app domain, and therefore get an unload failure. Without looking at the code here, I’m not sure of the edge cases around this.

I am in agreement with you (both) now though that the current solution isn’t what we want.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AppDomain.Unload doesn't release the assembly I loaded ...
Unload (tempDomain) and then I try to clean up my mess by deleting the files. That fails because the file is locked. I...
Read more >
Error while unloading appdomain
I've been getting an error unloading AppDomain in one of my tests which uses Fiddler Core. ... Is there unmanaged code in FiddlerCore?...
Read more >
Attempted to access an unloaded appdomain - Microsoft Q&A
Yesterday I set up a new server, new windows 2022 installation, installed my app and still get the error randomly. However, yesterday got...
Read more >
Big Sur - LaunchAgents - Load error 5: input/output error
Launching the script manually as /usr/local/bin/automount.sh works fine. Console shows. Code Block launchctl load: system.log shows this when load -w is run ...
Read more >
Solved: Anyone getting the error "The app domain ... was u...
Solved: Several months ago we upgraded SQL Server to 2014 on Win2012. Geodb is at 10.2.2 still. Since the upgrade, we see performance ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found