You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
What is the right place in this forum to submit bug reports?
Here is a very annoying bug that is observed with MetaTrader v4.00 Build 1031, and MetaEditor v5.00 build 1498.
Running this test case in MetaEditor causes MetaTrader to hang:
//| BugReport.mq4 |
//+------------------------------------------------------------------+
struct Test {
static string Fun(string path) {
StringReplace(path, "\\", "/");
return path;
}
};
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
string s = Test::Fun("c:\\my\\path"); //<-- Setting a breakpoint in MetaEditor
// on this line and trying to "step
// into" the call causes MetaTrader
// to hang permanently.
PrintFormat("Path: %s", s);
}
If the Test::Fun() is changed to be a regular function rather than a class-static function, then everything works as it should, but calling static class-scoped functions causes the step-into the function call to hang.
Any idea what's going on?
Serge
What is the right place in this forum to submit bug reports?
What is the right place in this forum to submit bug reports?
Here is a very annoying bug that is observed with MetaTrader v4.00 Build 1031, and MetaEditor v5.00 build 1498.
Running this test case in MetaEditor causes MetaTrader to hang:
//| BugReport.mq4 |
//+------------------------------------------------------------------+
struct Test {
static string Fun(string path) {
return StringReplace(path, "\\", "/");
}
};
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
string s = Test::Fun("c:\\my\\path"); //<-- Setting a breakpoint in MetaEditor
// on this line and trying to "step
// into" the call causes MetaTrader
// to hang permanently.
PrintFormat("Path: %s", s);
}
If the Test::Fun() is changed to be a regular function rather than a class-static function, then everything works as it should, but calling static class-scoped functions causes the step-into the function call to hang.
Any idea what's going on?
Serge
Firstly, I can confirm that it doesn't cause my MT4 Build 1031 with MetaEditor Version 5.00 Build 1498 to hang.
But, I have to ask, why would you try and return an integer to a string function, and then store it in string variable?
Firstly, I can confirm that it doesn't cause my MT4 Build 1031 with MetaEditor Version 5.00 Build 1498 to hang.
Did you place the breakpoint on run it in debugging mode ?
Mine is hanging as reported.
EDIT: But it's also hanging in build 1012. So, it's not related to build 1031.Did you place the breakpoint on run it in debugging mode ?
Mine is hanging as reported.
EDIT: But it's also hanging in build 1012. So, it's not related to build 1031.Yep, it doesn't hang the terminal:
Breakpoint set:
Start Debugging:
Step through:
Result:
Just connected it to a broker - still doesn't hang. Steps in, completes, closes. No problems.