Build 2875 - Huge issues!

 

Since 2875/2860:

* Time until debugging starts <> 40 Seconds, whereby it needs 21 seconds to compile. Builds before 2860 need 3 seconds (all without optimizations - of course)

* Chart freezes just like that when using indicators and EA same time in same chart. Not always, not on every computer, just sometimes on some. The last recognizable chart-event is CHARTEVENT_CHART_CHANGE, after that, the candles do not move anymore. Remove of EA or indicator brings the chart back to life. No such problems ever seen with any build before 2860, not possible to debug the issue. It does not matter if I compile indicators and EA with build 2755 or with 2875, the result is always the same as soon as 2875 is used to work with. 

* Debugger produces errors I never saw before - since years:


* Local variables can still not be found while editing (auto-completion, known since >1year, older builds as well)

* Editor crashes when typing between braces of function calls - not always, just sometimes, mainly with such functions which have been defined recently, never with "old" functions (known since >1 year, older builds as well)

Due to the circumstance, that users cannot decide if they want the update or not, more than 15 monthly paying clients already quitted. The financial damage is growing day by day. Our only change to survive this, is, to explain all customers, how to go back to an older release and highly recommend, to not update MT5 anymore until these huge issues are solved. 

I was asking for a detailed list of changes, but got no response from MetaQuotes. Once again: We are developers, not users. When elementary stuff is changed, it should be explained somewhere. Without such informations about every single detail, damage is always the logical consequence for some developers. And there were many details and it's not the first time that we lose clients because of that and not the first time, that we spend days and nights to figure out what´s going on. But especially since build 2860, MT5 is a total mess and disaster for us. 

@MetaQuotes - please respond and help.

 

Issue #2 - details

In the meanwhile, after some hours of creating test-codes and tracking Print-commands, we could figure out that:

1. All evens are stopped, within the EA as well as in the indicator. The code does not crash, not in the EA, nor in the indicator, the execution of the code is stopped entirely, no events occur at all, also not OnCalculate() or OnTick(), absolutely none. 

2. Both, EA and indicator use OnTimer() and OnChartEvent(). Both lock and unlock the chart. The execution is not stopped after such a chart-locking or unlocking, its independent from that.  

3. As soon as one of the two is unloaded, the chart-candles update again, and the events are fired again. In between: All death. No execution of nothing. 

4. To provoke this "pausing", a kind of heavy changing of the chart (move view, rescale, zoom etc.) is necessary, it takes a while, but it steps out. Unfortunately this happens not on my own computer (main development machine), but on the PCs of my other developers. 

The fact, that whether an EA nor an indicator has any possibility to prevent the chart-candles from being updated, confirms, that this is an internal issue of MetaTrader itself and not of the EA or indicator code. Again: It works without problems below build 2860. MetaTrader does not crash here, all buttons, other charts and so can still be clicked/changed etc. without delay. Here is also a picture of the MT Task manger. All listed charts use the same EA. Only the yellow one contains an indicator as described. The chart seems to be "held", "paused". 



What I can offer is the source code of the indicator, but we talk about <>25.000 lines of code due to the usage of lots of class-libraries. No chance to really understand whats going on, but maybe helpful for debugging. And besides this the executable version of the EA, but no source code. Anyway, its <>150.000 lines of code. 

 

Can you provide your source doe for investigation to me to Ilyas (it would be better)?

 
Rashid Umarov:

Can you provide your source doe for investigation to me to Ilyas (it would be better)?

I been sending you a private message. Thanks a lot. 

 

Build 2881 - All the same. 

Also compile/start of debugger which is still 10 times slower than every build before 2860.

 

Is this why mine says "Not Responding" and hangs for about 10 seconds when I close the platform?

Doerk Hilger:

Since 2875/2860:

* Time until debugging starts <> 40 Seconds, whereby it needs 21 seconds to compile. Builds before 2860 need 3 seconds (all without optimizations - of course)

* Chart freezes just like that when using indicators and EA same time in same chart. Not always, not on every computer, just sometimes on some. The last recognizable chart-event is CHARTEVENT_CHART_CHANGE, after that, the candles do not move anymore. Remove of EA or indicator brings the chart back to life. No such problems ever seen with any build before 2860, not possible to debug the issue. It does not matter if I compile indicators and EA with build 2755 or with 2875, the result is always the same as soon as 2875 is used to work with. 

* Debugger produces errors I never saw before - since years:


* Local variables can still not be found while editing (auto-completion, known since >1year, older builds as well)

* Editor crashes when typing between braces of function calls - not always, just sometimes, mainly with such functions which have been defined recently, never with "old" functions (known since >1 year, older builds as well)

Due to the circumstance, that users cannot decide if they want the update or not, more than 15 monthly paying clients already quitted. The financial damage is growing day by day. Our only change to survive this, is, to explain all customers, how to go back to an older release and highly recommend, to not update MT5 anymore until these huge issues are solved. 

I was asking for a detailed list of changes, but got no response from MetaQuotes. Once again: We are developers, not users. When elementary stuff is changed, it should be explained somewhere. Without such informations about every single detail, damage is always the logical consequence for some developers. And there were many details and it's not the first time that we lose clients because of that and not the first time, that we spend days and nights to figure out what´s going on. But especially since build 2860, MT5 is a total mess and disaster for us. 

@MetaQuotes - please respond and help.

 
Update: It all seems to happen with Windows 10 only. Installations with Windows-Server or other versions of Windows don´t seem to have these problems. 
 
Doerk Hilger:
Update: It all seems to happen with Windows 10 only. Installations with Windows-Server or other versions of Windows don´t seem to have these problems. 

Build 2884 - all the same

 
Doerk Hilger:

Build 2884 - all the same

Thanks for the code provided, it helped us find and fix some styler bugs. But at the same time, your code is very large and contains many links, so it was not possible to identify the reason for the behavior you indicated right away.
We cannot tell when the reason will be determined. It would be nice if you could provide a minimal code that reproduces the problem

 
MetaQuotes:

Thanks for the code provided, it helped us find and fix some styler bugs. But at the same time, your code is very large and contains many links, so it was not possible to identify the reason for the behavior you indicated right away.
We cannot tell when the reason will be determined. It would be nice if you could provide a minimal code that reproduces the problem

First of all: Thank you for you effort, I really appreciate that a lot. 

This is already the most minimal, of course, lots of functions of the included library are not used, but I don´t have a precompiler which is able to remove such functions. Actually, the indicator itself does nothing, just shows a panel, not using any buffers. In the background, all bars of the chart are processed asynchronously. But all that is not the problem, cause these kind of "freezes", or better to say "pauses" of the chart occur after this processing of all bars is finally done. 

The communication of the indicator and the EA are based on

- files (processed during OnTimer())

- ChartEventCustom()

- Chart objects that contain text which is read and written by the EA and the indicator during OnTimer()

At some point, always when the chart is changed quickly, all events are paused. The OnTimer() is also used to identify some chart-changes, because not all changes of the chart are reflected as CHARTEVENT_CHART_CHANGE events. I had already an older topic, which described, that it takes way too long sometimes just to read some properties of the chart, such as its dimensions. I can only guess, but maybe the reason for it all is there, maybe any kind of protection of the integrated task manager determines a too long execution time for this event or any of the events, and then simply stops the further execution of all the code of the chart. Suspicious fact is: The EA execution is stopped AND the indicator execution is stopped. So my suspicion is clearly focused on OnTimer(). Please try to follow that hint. OnTimer() links always to

- the custom __Chart object instance, which analyzes the chart dimensions

- the __Chart object instance again, cause it also reads/writes chart objects (labels) to communicate with the EA in two ways

- the custom __ChartBars object instance, which access bars and uses CopyRates()

- the custom __ChartVars/__LocalVars/__GlobalVars object instances, which access binary files in shared mode for read and write


Conclusion: I am 99% sure, that any of the following processes during the OnTimer() cause this pausing:

- CopyRates

- Access to binary shared files

- Functions that read the chart properties

- ObjectGetString()/ObjectSetString()

- OnTimer() itself - older versions were sometimes not able to initialize the timer at all

The remaining 1% goes to 

- ChartEventCustom(), because I remember, that older versions of MT5 crashed the whole MT instance when both, indicator and EA were using ChartEventCustom() to communicate while the command was executed during OnTimer()

As suggested, I would be very happy to help you with a Skype or Zoom conference. Due to the circumstance, that almost all native MQL functions are packed into compatibility functions, it should be possible to channelize the code very easy while debugging. 

Of course I started already changing the whole communication only to files, but due to the complexity of it all, its not done just like that and may take some weeks. And its still not sure, if this will solve the problem when using the newest builds of MT5. 

Reason: