Some tools do not work with new 2265 build of MT5 - how to fix? - page 5

 
In my case the problem is between the attach and really starts the EA, it takes 30~40 times more to start the EA, in compiled and debugging file. It is a problem because I use debugging several times. No error no Watkins and code in last mql5 standardsn,o "deprecate methods" (latest builds massages about compilation in future). I hope they fix it.

 MQ if it is possible please let us know if you have some news about what can be this behavior.
 
ericsebestyen:
In my case the problem is between the attach and really starts the EA, it takes 30~40 times more to start the EA, in compiled and debugging file. It is a problem because I use debugging several times. No error no Watkins and code in last mql5 standardsn,o "deprecate methods" (latest builds massages about compilation in future). I hope they fix it.

 MQ if it is possible please let us know if you have some news about what can be this behavior.
So in your case it's a matter of speed, but MT5 is not crashing ?
 

There is another problem which I figured out. The same function produces different results in both versions.

EURUSD e.g. has a ticksize of 0.00001 (most brokers). But, the function will never print anything with the latest build, but the previous build will list most forex symbols. In other words, when you deal with the ticksize in an EA, it will produce unpredictable results with this build! In my case, it produced an infinite loop at some point on top of it all.




void ListSymbolDigits()
   {
      int cnt=::SymbolsTotal(true);
      for (int i=0;i<cnt;i++)
         {
         string name=::SymbolName(i,true);
         double ticksize=(SymbolInfoDouble(name,SYMBOL_TRADE_TICK_SIZE));
         if (0.00001==ticksize)
            Print(name," has 0.00001");
         }
   }



	          
 
Alain Verleyen:
So in your case it's a matter of speed, but MT5 is not crashing ?
Exact Alain, the speed to start the  program, to get the OnInt() it is taking more 30~40 more time. It is not crashing in my case, only speed.
 
Alain Verleyen:
I confirm that doing so, MT5 doesn't crash when the EA starts.

I was able to isolate the problem, to the usage of StringTrimRight() with a string long enough (maybe also related to the string content ?).

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
  string datastr="!sjkhdsjkhsdjkshdkjhdskdhskdhsjdhh;!                              ; ;qhwjdhw;jqjdhwk;dhwd;!                               ; DWDWDWDWDWDWDD                     ;                       ;                     ;                              ; !                              ; !                  ;             sjkgdsakjdhgskdgskdlhgsadhlgsdhsjgdshlds; odywqoudhwpiuddhpqwihdwiphdpqwidhwp; !ajkhqqwkjdhwkjdhwdkwjhdwkjdhwdjkh; wqhwpiudwhdiuwdhwiudhwiduwhdhdHHQIUHU; dkjqhwdkjwhdwkqjdhwdjkwdhqdkjqhwdkq; q;hiiqwidjwodiwjdowidjwiodwiiiIIIIQOWIEJQOIj; !wsuipqypwiuwhHHPIHPIUQHqkjwhqkjwhqkw;            !                        ;                                                                                                                                                                                                                               ";
  StringTrimRight(datastr); 
  }

MT5 doesn't crash with this simple test as with the EA, but an access violation is produced.

2019.12.07 11:31:44.732    MT52265_Crash (DA6Z19,M5)    Access violation at 0x00007FF6D711AE30 read to 0xFFFFFFFFFFFFFFFF
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)       crash -->  00007FF6D711AE30 488B0E            mov        rcx, [rsi]
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)                  00007FF6D711AE33 4889CE            mov        rsi, rcx
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)                  00007FF6D711AE36 4883E6FC          and        rsi, 0xfc
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)                  00007FF6D711AE3A F6C102            test       cl, 0x2
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)                  00007FF6D711AE3D 74F1              jz         0x7ff6d711ae30
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)    
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)                  00007FF6D711AE3F 488B4A08          mov        rcx, [rdx+0x8]
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)                  00007FF6D711AE43 F6C102            test       cl, 0x2
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)    
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)    00: 0x00007FF6D711AE30
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)    01: 0x00007FF6D7793ED9
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)    02: 0x00007FF6D77CAEAA
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)    03: 0x00007FF6D7949F43
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)    04: 0x00007FF6D7108966
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)    05: 0x00007FF6D728ED9D
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)    06: 0x00007FF6D7299A30
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)    07: 0x00007FF6D7B0980C
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)    08: 0x00007FFB7A977BD4
2019.12.07 11:31:44.733    MT52265_Crash (DA6Z19,M5)    09: 0x00007FFB7BFCCED1

 
Doerk Hilger:

There is another problem which I figured out. The same function produces different results in both versions.

EURUSD e.g. has a ticksize of 0.00001 (most brokers). But, the function will never print anything with the latest build, but the previous build will list most forex symbols. In other words, when you deal with the ticksize in an EA, it will produce unpredictable results with this build! In my case, it produced an infinite loop at some point on top of it all.

         if (0.00001==ticksize)

This has never been a correct way to compare double. You need to fix your code here.

Working with Doubles in MQL4
Working with Doubles in MQL4
  • www.mql5.com
The MQL programming opens new opportunities for the automated trading, many people all over the world already have appreciated it. When we are writing an Expert Advisor for trading, we must be sure that it will work correctly. Many newbies often have some questions when the results of some mathematical calculations differ from those expected...
 
ericsebestyen:
Exact Alain, the speed to start the  program, to get the OnInt() it is taking more 30~40 more time. It is not crashing in my case, only speed.
Difficult to help as I don't have such situation.
 
Alain Verleyen:
Difficult to help as I don't have such situation.
I understand, I use many resources and include files, I would like to share but it is very private code to put here. MQ/Alain feel free to ask in private my code to see  the difference between both builds during initialization.
 

Hi,

  Just to share the time that I get to have the OnInit() event now, it is a I5 processor, and it slowdown the entire computer, in Build 2190 I did'nt have it, it was run ant OnInt happened instantaneously after load files, please MQ I hope someone see that.

 

 
Doerk Hilger:

There is another problem which I figured out. The same function produces different results in both versions.

EURUSD e.g. has a ticksize of 0.00001 (most brokers). But, the function will never print anything with the latest build, but the previous build will list most forex symbols. In other words, when you deal with the ticksize in an EA, it will produce unpredictable results with this build! In my case, it produced an infinite loop at some point on top of it all.

Dear Doerk,


Our developer say that you should use NormalizeDouble function before make a comparison.

         if (0.00001==NormalizeDouble(ticksize,5))
           Print(name," has 0.00001");


I checked your code sample of 2098 build - it has same behavior.


Regarding other issues mentioned in ticket - our developers will check it soon.

Thank you for your reports.


Please send me your code samples via chat - I will pass it to developers.