I'm working extensively with MT5 and DLLs.
In a method I declare a large local array:
Everything was fine until the new build 540 came out.
Since then MT5 crashes when preparing the local variables on the stack.
You are now forced to work with small arrays and the compiler gives you a warning that the local variable size is too large (512kb).
Well, I think a warning should be a warning and not a sign that the client will crash!
Anyway, I would rather use dynamic arrays but it is not possible to pass dynamic arrays to a DLL(the marshalling is not clear).
Hope this helps you in case you have no clue why your MT5 crashes all of a sudden.