Language: C #
Runtime: .NET 4 Client
Problem: after ~ 14 minutes, garbage collection occurs (as shown in Diagnostic Tools) at this point, the exception immediately follows with the following information:
An exception was thrown at 0x163BA480 in Test.exe: 0xC0000005: Access violation of running location 0x163BA480.
My program refers to a third-party program with the intention of adding additional functions through additions.
My program consists of assemblies:
- My main program, which compiles additional assemblies from .cs files, displays their names in a WPF window.
- A secondary project that simply handles logging is part of the same solution.
- An additional project that is responsible for downloading add-ons is part of the same solution.
- Any number of loaded add-on modules.
All assemblies are loaded into the same Appdomain. In the end, this will be changed so that each assembly is inside its own Appdomain.
In this particular case, the add-on assembly is a simple class definition without any other executable codes / methods ie:
using System;
using Interface;
namespace TestAddin
{
public class TestAddin
{
}
}
Output:
The program runs successfully, loads assemblies and displays them.
The program then executes the third-party program (using the Run () method from the referenced DLL)
The program runs successfully for another ~ 14 minutes until the above exception occurs.
I'm not sure how to debug this, how to find out where the exception occurred? None of the three projects that I wrote use unmanaged code and referenced assembly running in C #, I could not find unmanaged code using dotpeek.
, - . .