Download MetaTrader 5
To add comments, please log in or register
Do you want to write a trading robot? Find solution in MQL5 Reference!
juxeii
88
juxeii 2011.11.12 04:55 

Hello,

I'm working extensively with MT5 and DLLs.

In a method I declare a large local array:

MqlRates rates[5000];

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.


Best Regards,

Juergen

/
To add comments, please log in or register