Errors, bugs, questions - page 1422

 

Mihail Matkovskij, 2015.11.01 12:55

I can't update the terminal to build 902, it used to update, but now I can't do it for 3 days. Version: 4; build: 890; bit rate: 32. What may be the reason?

What exactly is not working? What are you doing and what do you get? What kind of errors?
 

Error during execution

class A { public:
        virtual bool    g() { Print( __FUNCTION__ ); return true; }
        virtual bool    f() { return g(); }
};
class B : public A { public:
        virtual bool    g() { Print( __FUNCTION__ ); return true; }
};
void OnStart()
{
        int i = 0;
        for ( B b; b.f(); i++ )
                if ( i++ >= 3 )
                        break;
}                

Result: and should be:

 
Karputov Vladimir:
What exactly is not working? What are you doing and what are you getting? What are the errors?

Since the log is confidential, I'm sending it to you in a private message.

 
A100:

Memory leak.


A100, you are quite the bug catcher!!! Keep it up! Hats off to you :)

 
Stanislav Korotky:
This is MT4. I have been trying it for the last few days. Build 902/32.

I tried your example on MT4/891/32 with different compilers (build: 1174, 1210)

Either upgrade... or roll back.

 
sigma7i:

A100, you're quite the bug catcher!!! Keep it up! Hats off to you :)

So, one can see at once who actually uses OOP capabilities and who is a master of reasoning on this subject (there is a whole branch of masters).

Forum on trading, automated trading systems and testing trading strategies

AOP for goodness sake....

George Merts, 2015.10.26 19:58

You just don't know how to cook it.

OOP is very beneficial for both the structuring of programs and the ability to support and modify it.

Especially since you say that you "use classes as containers for functions" - well, put the data that works with those functions into that container - and you've got it, OOP in action.


 
A100:

The only way to get rid of this error is to replace Optimize=1 in metaeditor.ini with 0

I don't really need to get rid of it, but maybe the developers do. After all, such errors shouldn't even occur at compilation if the compiler works well. That's why I gave you an exact code sample when it occurs.
 
Ilya Malev:
That's why I gave the exact code example when it appears.
On build 1210/32 it cannot be repeated
Right?
void OnStart()
{
        ENUM_TIMEFRAMES tf=NULL;
        if(tf==NULL)   tf=Period();
}
 
A100:

I tried your example on MT4/891/32 with different compilers (build: 1174, 1210)

Either upgrade... or roll back.

No. Service Desk always says "upgrade to the latest build". (which of course should be correct, if only they were fixing bugs). I detected the problem on build 900, and then updated to 902. Apparently, the problem arose because of the addition of class templates. While the templates will be "dancing" for a while, I think it's better not to use them at all.

 
A100:
There's no repeat on build 1210\32
Right?
Reason: