Good afternoon, the MT5 log shows this message: 2020.05.21 05:49:44.364 Virtual Hosting failed to get list of virtual hosts (www.mql5.com:443 send request failed [12002])
Can you people please tell me what it means and what to do about it?
time of [Bench1()] = 1483377100000000
time of [Bench2()] = 1725035100000000
time of [Bench1()] = 1523441100000000
time of [Bench2()] = 1712777100000000
time of [Bench1()] = 1416779100000000
time of [Bench2()] = 1452093100000000
time of [Bench1()] = 1399366100000000
time of [Bench2()] = 1449939
My debugger refuses to work in one of my projects. Moreover, its behaviour is difficult to predict. Sometimes it just refuses to enter breakpoints. It also refuses to enter some functions. At first I thought the reason was updates (maybe something went wrong with debugging). But in other simpler programs everything seems to work. I haven't checked it much, though, because I'm working on my main project. It is quite complex and includes 15 modules only of my own design (I have not counted the number of standard modules). The main module contains up to 2000 lines. I thought maybe it's all about the complexity of the project... Also, in some places I use macros for repetitive code snippets. Also I use standard UI elements, such as CAppDialog, CCheckGroup, CComboBox, CButton etc. that I rewrote to the functionality of my program. Maybe debugging doesn't work because of them... For example, the CCheckGroup::itemCheckState(const string item) method I specifically wrote doesn't debug. The method finds item of check box and checks whether it's selected (its State):
This is what kind of UI I ended up with:
Some of the UI elements are temporarily classified. And here is a branch where I described how I overrode Show() and Hide() methods of CAppDialog element:https://www.mql5.com/ru/forum/338301 The compiler complained at that moment and a critical error occurred.
In the end the project compiles normally, the compiler doesn't generate any errors. But debugging fails and just doesn't show execution of some code fragments, functions, methods and so on.
As far as I understand, there may be several reasons for that.
Complicated code of the project, use of macros
Complicated code using standard UI elements, such as CAppDialog, CCheckGroup, CComboBox, CButton (for which I also wrote new methods and redefined some of existing ones)
Debugger bug related to the new build (possible, unlikely).
Build and system info:
Who has had similar problems with the debugger and what might be the cause?
It turns out that the method works fine, but the debugger stops seeing it for some reason. Without proper work of the debugger, the work on the project may be delayed for a long time. I would like the Developers to pay attention to this bug, most likely related to the debugger.
It turns out that the method works properly, but the debugger stops seeing it for some reason. Without the debugger working properly, the project may be delayed for a long time. I would like the Developers to pay attention to this bug most likely related to the debugger.
It's a lot of text, I haven't read all of it. But if something works in debug version and doesn't work in release, or vice versa, check if all variables and fields, especially in class/structure, were initialized.
inputint Range = 0;
double Res = 0;
#define GETCURRENTTICK GetCurrentTick1(Tick)
//#define GETCURRENTTICK GetCurrentTick2(Tick, !i)//#define GETCURRENTTICK GetCurrentTick3(Tick)voidOnTick()
{
MqlTick Tick;
for (int i = 0; i < 100; i++)
if (GETCURRENTTICK)
Res += Tick.bid;
}
doubleOnTester()
{
return(Res);
}
bool GetCurrentTick1( MqlTick &Tick )
{
return(SymbolInfoTick(_Symbol, Tick));
}
bool GetCurrentTick2( MqlTick &Tick, constbool NewTick = false )
{
staticMqlTick CurrentTick;
if (NewTick)
SymbolInfoTick(_Symbol, CurrentTick);
Tick = CurrentTick;
return(true);
}
bool GetCurrentTick3( MqlTick &Tick )
{
staticMqlTick _Tick; // Аналог Bid в MT4
_Tick.bid += _Point; // Хоть какой-то расход вычислительный ресурсов.
Tick = _Tick;
return(true);
}
#define GETCURRENTTICK GetCurrentTick1(Tick)
#define GETCURRENTTICK GetCurrentTick2(Tick, !i)
#define GETCURRENTTICK GetCurrentTick3(Tick)
2020.05.2114:19:52.450 Core 1 pass 0 returned result 693275970.165784in0:00:08.9252020.05.2114:19:59.980 Core 1 pass 1 returned result 693275970.165784in0:00:07.5292020.05.2114:20:07.370 Core 1 pass 2 returned result 693275970.165784in0:00:07.3902020.05.2114:20:14.694 Core 1 pass 3 returned result 693275970.165784in0:00:07.3232020.05.2114:20:21.688 Core 1 pass 4 returned result 693275970.165784in0:00:06.9942020.05.2114:20:29.114 Core 1 pass 5 returned result 693275970.165784in0:00:07.4252020.05.2114:20:36.133 Core 1 pass 6 returned result 693275970.165784in0:00:07.0192020.05.2114:20:43.557 Core 1 pass 7 returned result 693275970.165784in0:00:07.4242020.05.2114:20:49.580 Core 1 pass 8 returned result 693275970.165784in0:00:06.0222020.05.2114:20:57.273 Core 1 pass 9 returned result 693275970.165784in0:00:07.6932020.05.2114:21:03.993 Core 1 pass 10 returned result 693275970.165784in0:00:06.7192020.05.2114:21:03.993 Tester optimization finished, total passes 112020.05.2114:21:04.003 Statistics optimization done in1 minutes 22 seconds
2020.05.2114:21:04.003 Statistics shortest pass 0:00:06.022, longest pass 0:00:08.925, average pass 0:00:07.3142020.05.2114:21:04.003 Statistics local 11 tasks (100%), remote 0 tasks (0%), cloud 0 tasks (0%)
2020.05.2114:21:49.346 Core 1 pass 0 returned result 693275970.165784in0:00:03.0502020.05.2114:21:51.108 Core 1 pass 1 returned result 693275970.165784in0:00:01.7612020.05.2114:21:52.903 Core 1 pass 2 returned result 693275970.165784in0:00:01.7952020.05.2114:21:54.731 Core 1 pass 3 returned result 693275970.165784in0:00:01.8272020.05.2114:21:56.536 Core 1 pass 4 returned result 693275970.165784in0:00:01.8032020.05.2114:21:58.341 Core 1 pass 5 returned result 693275970.165784in0:00:01.8052020.05.2114:22:00.135 Core 1 pass 6 returned result 693275970.165784in0:00:01.7932020.05.2114:22:01.912 Core 1 pass 7 returned result 693275970.165784in0:00:01.7772020.05.2114:22:03.663 Core 1 pass 8 returned result 693275970.165784in0:00:01.7502020.05.2114:22:05.458 Core 1 pass 9 returned result 693275970.165784in0:00:01.7942020.05.2114:22:07.274 Core 1 pass 10 returned result 693275970.165784in0:00:01.8152020.05.2114:22:07.274 Tester optimization finished, total passes 112020.05.2114:22:07.284 Statistics optimization done in0 minutes 21 seconds
2020.05.2114:22:07.284 Statistics shortest pass 0:00:01.750, longest pass 0:00:03.050, average pass 0:00:01.9062020.05.2114:22:07.284 Statistics local 11 tasks (100%), remote 0 tasks (0%), cloud 0 tasks (0%)
2020.05.2114:23:00.873 Core 1 pass 0 returned result 661757660284.981689in0:00:02.8592020.05.2114:23:02.704 Core 1 pass 1 returned result 661757660284.981689in0:00:01.8302020.05.2114:23:04.488 Core 1 pass 2 returned result 661757660284.981689in0:00:01.7832020.05.2114:23:06.227 Core 1 pass 3 returned result 661757660284.981689in0:00:01.7372020.05.2114:23:07.778 Core 1 pass 4 returned result 661757660284.981689in0:00:01.5502020.05.2114:23:09.517 Core 1 pass 5 returned result 661757660284.981689in0:00:01.7382020.05.2114:23:11.288 Core 1 pass 6 returned result 661757660284.981689in0:00:01.7712020.05.2114:23:12.997 Core 1 pass 7 returned result 661757660284.981689in0:00:01.7082020.05.2114:23:14.815 Core 1 pass 8 returned result 661757660284.981689in0:00:01.8172020.05.2114:23:16.621 Core 1 pass 9 returned result 661757660284.981689in0:00:01.8052020.05.2114:23:18.313 Core 1 pass 10 returned result 661757660284.981689in0:00:01.6912020.05.2114:23:18.313 Tester optimization finished, total passes 112020.05.2114:23:18.323 Statistics optimization done in0 minutes 21 seconds
2020.05.2114:23:18.323 Statistics shortest pass 0:00:01.550, longest pass 0:00:02.859, average pass 0:00:01.8442020.05.2114:23:18.323 Statistics local 11 tasks (100%), remote 0 tasks (0%), cloud 0 tasks (0%)
TheXpert: perhaps the method is inline, then it's not the debugger's problem, but the debug compiler's
Exactly, the project turned out to be overflowing with macros, both mine and those from standard modules. Maybe that's why the debugger doesn't always manage to match commands in *.ex5 debug file with lines in *.mq5 source file and other modules...
so it's the cost of the function itself, not the cost of passing the string by value, not by reference!
Your version with the cache is quite a solution, if the execution of this function takes a significant percentage of the time of execution of the EA (which I don't really believe)
Exactly, the project turned out to be overflowing with macros, both mine and those from standard modules. Maybe that's why the debugger doesn't always manage to match commands in *.ex5 debug file with lines in *.mq5 source file and other modules...
perhaps your file structure is so complex that the debugger can't associate a breakpoint, then it's the debugger's problem.
In the optimizer these functions are called tens of billions of times.
Moreover, your variant with the cache is quite a solution, if the execution of this function takes a significant percentage of the runtime of an EA (which I don't really believe)
At a certain stage, not only the relative part of time taken becomes important, but the absolute part as well.
Good afternoon, the MT5 log shows this message: 2020.05.21 05:49:44.364 Virtual Hosting failed to get list of virtual hosts (www.mql5.com:443 send request failed [12002])
Can you people please tell me what it means and what to do about it?
Thank you!
My debugger refuses to work in one of my projects. Moreover, its behaviour is difficult to predict. Sometimes it just refuses to enter breakpoints. It also refuses to enter some functions. At first I thought the reason was updates (maybe something went wrong with debugging). But in other simpler programs everything seems to work. I haven't checked it much, though, because I'm working on my main project. It is quite complex and includes 15 modules only of my own design (I have not counted the number of standard modules). The main module contains up to 2000 lines. I thought maybe it's all about the complexity of the project... Also, in some places I use macros for repetitive code snippets. Also I use standard UI elements, such as CAppDialog, CCheckGroup, CComboBox, CButton etc. that I rewrote to the functionality of my program. Maybe debugging doesn't work because of them... For example, the CCheckGroup::itemCheckState(const string item) method I specifically wrote doesn't debug. The method finds item of check box and checks whether it's selected (its State):
This is what kind of UI I ended up with:
Some of the UI elements are temporarily classified. And here is a branch where I described how I overrode Show() and Hide() methods of CAppDialog element:https://www.mql5.com/ru/forum/338301 The compiler complained at that moment and a critical error occurred.
In the end the project compiles normally, the compiler doesn't generate any errors. But debugging fails and just doesn't show execution of some code fragments, functions, methods and so on.
As far as I understand, there may be several reasons for that.
Build and system info:
https://www.mql5.com/ru/forum/1111/page2746#comment_16481481
In CCheckGroup::itemCheckState method (into which the debugger can't get) I put something like this:
And got the following message:
2020.05.21 13:20:44.229 CCheckGroup::itemCheckState item: 39 state: 32
https://www.mql5.com/ru/forum/1111/page2746#comment_16481481
Without the debugger working properly, the project may be delayed for a long time. I would like the Developers to pay attention to this bug most likely related to the debugger.
It's a lot of text, I haven't read all of it.
But if something works in debug version and doesn't work in release, or vice versa, check if all variables and fields, especially in class/structure, were initialized.
#define GETCURRENTTICK GetCurrentTick1(Tick)#define GETCURRENTTICK GetCurrentTick2(Tick, !i)#define GETCURRENTTICK GetCurrentTick3(Tick)On the subject of SymbolInfo functions being free.
perhaps the method is inline, then it's not the debugger's problem, but the debug compiler's
Exactly, the project turned out to be overflowing with macros, both mine and those from standard modules. Maybe that's why the debugger doesn't always manage to match commands in *.ex5 debug file with lines in *.mq5 source file and other modules...
The SymbolInfo functions are free.
so it's the cost of the function itself, not the cost of passing the string by value, not by reference!
Your version with the cache is quite a solution, if the execution of this function takes a significant percentage of the time of execution of the EA (which I don't really believe)
Exactly, the project turned out to be overflowing with macros, both mine and those from standard modules. Maybe that's why the debugger doesn't always manage to match commands in *.ex5 debug file with lines in *.mq5 source file and other modules...
is the cost of the function itself, not the cost of passing the string by value, not by reference!
That's what I was initially led to.
Forum on trading, automated trading systems and strategy testing
Errors, bugs, questions
fxsaber, 2020.05.20 13:24
It's better to have
In the optimizer these functions are called tens of billions of times.
Moreover, your variant with the cache is quite a solution, if the execution of this function takes a significant percentage of the runtime of an EA (which I don't really believe)
At a certain stage, not only the relative part of time taken becomes important, but the absolute part as well.