Language: C#
Runtime: .NET 4 Client
Issue: At ~14 minutes garbage collection occurs (as seen in the Diagnostic Tools) at this point an exception immediately follows with the following information:
Exception thrown at 0x163BA480 in Test.exe: 0xC0000005: Access violation executing location 0x163BA480.
My program references a third party program with the intention to add additional features through addins.
My program is composed of assemblies:
- My main program which compiles add-on assemblies from .cs files, displays their names in a WPF window.
- A secondary project which simply handles logging, part of the same solution.
- An additional project which is responsible for loading the addins, part of the same solution.
- Any number of loaded addon assemblies.
All assemblies are loaded into the same Appdomain. Eventually this will be changed so that each assembly is within it's own Appdomain.
In this specific case the addon assembly is a simple class definition with no other executing code/methods i.e.:
using System;
using Interface;
namespace TestAddin
{
public class TestAddin
{
}
}
Output:
Program runs successfully, loads assemblies, and displays them.
Program then executes the third party program (via a Run() method from the referenced dll)
Program executes successfully for another ~14 minutes, until the previously mentioned exception occurs.
I'm not sure how to debug this, how do I know where the exception occurred? None of the three projects I wrote utilize unmanaged code and the referenced assembly is running in C#, I could find no unmanaged code using dotpeek.
Any help would be greatly appreciated, if any further information is needed I'd be glad to provide it.