Profile Picture

CannotUnloadAppDomainException thrown

Posted By SysInv 6 Years Ago
Posted Friday October 12 2012
I've created a small monitoring window when running backtests/live, but having some problems. The window opens up properly, but then throws the following exception:

An exception of type System.CannotUnloadAppDomainException was thrown.
Error while unloading appdomain. (Exception from HRESULT: 0x80131015)
at System.AppDomain.Unload(AppDomain domain)
at RightEdge.Shared.TradingModuleWrapper.UnloadDomain()
at RightEdge.Shared.TradingModuleWrapper.ShutdownDomain(Boolean clearDelegates)
at RightEdge.Shared.TradingModuleWrapper.Dispose()
at RightEdge.SystemProgress.InitAndRunSystem()

I believe it's because the thread that opens the window blocks the appdomain to shut down, but even if I manually close the thread prior the exception is thrown. Any ideas of what the cause could be? I can run it properly standalone or in OQ, so the problems lies in the use of the application in the RE framework.
Posted Monday October 15 2012
How are you manually closing the thread? Are you closing the window you are displaying before closing the thread?


Similar Topics

Reading This Topic

2005-2018 © RightEdge Systems