I can add that I investigated a bit.
What is happening is that tester is trying to copy DLL to the tester sandbox, but can not overwrite existing copy, because it was never released by the same tester process. And bloody windows does not allow to overwrite open dlls, like any normal unix would.
This problem present for quite a time. To be honest, I have no idea why over this time developers ddn't add to tester 4 lines of code, to try to get a handle of libary, if it is loaded, and attempt to unload, before copying new instanse to sandbox.
Or at least introduce some event for forceful stop, then those things can be handled inside EA properly.

Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Running MQL5 Program Properties
- www.mql5.com
A purchased licensed version allows at least 5 activations. The number of activations is specified by seller. Seller may increase the allowed number of activations

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I use my own DLL in the EA. When I run it locally, it works. For both, single and optimization.
But if I "stop" test or optimization instead of waiting for normal finish, after that I need to kill metatester64 processes(es), otherwise it will not start any new tests again. This is something I can live with, albeit fat from ideal.
Things get seriously worse when I use local farm. With registry key "/dlls" I can use dlls on farm, but if I "stop" optimization...then farm has to be rebooted as an onlyoption. I can't restart testers in the metatester agent, and even if I kill them manually, agent does not allow to start them again, reboot is the only option. This isn't something one can live with :)
What a hell is wrong here? Any meaningful working workaround? It is RELLY annoying!
Btw, DLL is simple collection of functions, not static variables, no other fancy stuff, so nothing special about initialization/deinitialization.
behavior can be reproduced with simple DLL with single function like:
and EA like
EA looks complicated in order to force it go slow, to have change to press "stop" :)