Errors, bugs, questions - page 1205

 
ozhiganov:

All brokers' terminals have stopped working, including the one I downloaded from this site...

Restarting does not help, rebooting and reinstalling too, everything was working fine before, I didn't install anything on my computer, I didn't install anything on the terminal either. only shopping in the market.

Take down the running indicators and EAs piece by piece to see what the problem is.

Click on "Details" in the error description window to find out the details. Copy the full text here please.

 

empty, without a single indicator and EA terminal, same thing...

 
Renat:

Capture the running indicators and EAs piece by piece to see what the problem is.

Click on "Details" button in the error description window to get details. Copy the full text here, please.

I take it you want it?

crash --> 000007FCE8441F4F 48396B10 cmp [rbx+0x10], rbp

000007FCE8441F53 7530 jnz 0x7fce8441f85


000007FCE8441F55 488B03 mov rax, [rbx]

000007FCE8441F58 4C8BCF mov r9, rdi

000007FCE8441F5B 4D8BC7 mov r8, r15

000007FCE8441F5E 8BD6 mov edx, esi

000007FCE8441F60 488BCB mov rcx, rbx


: #021 00000000000011C8 EIP: 0000000000000000 ESP: 00000000000000000000


: #022 0000000000001068 EIP: 000007FCF54245DB ESP: 0000006818CFFAC8

000007FCF54245D1:00000A [000007FCF54245DB] NtYieldExecution (ntdll.dll)

000007FCF5426E50:000833 [000007FCF5427683] RtlUnicodeStringToInteger (ntdll.dll)

000007FCF3681828:00001A [000007FCF3681842] BaseThreadInitThunk(kernel32.dll)

000007FCF54774E8:000021 [000007FCF5477509] RtlVerifyVersionInfo (ntdll.dll)


: #023 000000000000111C EIP: 000007FCF54245DB ESP: 0000006818E5FB18

000007FCF54245D1:00000A [000007FCF54245DB] NtYieldExecution (ntdll.dll)

000007FCF5426E50:000833 [000007FCF5427683] RtlUnicodeStringToInteger (ntdll.dll)

000007FCF3681828:00001A [000007FCF3681842] BaseThreadInitThunk (kernel32.dll)

000007FCF54774E8:000021 [000007FCF5477509] RtlVerifyVersionInfo (ntdll.dll)

 
I have sent the full text in a private message
 

While parsing the previous example, we found out a crucial difference between MQL and C++

class A {};
class B : public A {};
class C {
public:
        virtual int g( A* a ) { return ( 1 ); }
        virtual int g( B* b ) { return ( 2 ); } //здесь полное совпадение
};
class D : public C {
public:
        virtual int g( A* a ) { return ( 3 ); }
};
void OnStart()
{
        B* b = new B;
        D* d = new D;
        Print( d.g( b ));
}

In MQL(build 978) the result is: 2 (C::g is called), and in C++ the result is: 3 (D::g is called)

So it turns out that MQL gives priority to an exact type match of the argument, even if it's in a base class, while C++ gives priority to the closest possible class that may not have an exact type match but can have an implicit type conversion.

Please check the results on recent C++ compilers and if the difference is confirmed, preferably decide in favour of C++ for unification purposes.

 
ozhiganov:
I've sent the full text in a private message.
Thank you, we will look into it.
 

Are the copy constructor and assignment operator even planned in the future?

Base class A has 15 fields, it has two descendants B and C - each has +5 more fields.

And the rest is a 20 minute quest.

 

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

A100, 2014.08.29 16:28

Error when outputting via Print(...)

void OnStart()
{
        const int n = 300;
        Print( "n=", n );
        for ( int i = 0; i < n; i++ )
        {
                Print( i );
                if ( i == 0 )
                        Sleep( 2000 );
        }
}

when printing, first part of output skips from 1 to 53 (each time a different part - no clear pattern), sometimes skips in the middle

then prints up to 299 with no skips

If you have some time, please try to run it and if there are any skips in the output, write to me. If no skips - try to increase n (I started skipping at n >= 300) and/or remove

        if ( i == 0 )
                Sleep( 2000 );

On request #1060016 | 2014.08.29 16:30https://www.mql5.com/ru/users/A100/servicedesk/closed/14774

A question has arisen "How do I inform about a print skip?" - The simplest option is a single line with a ellipsis in place of the skipped lines

When the user sees this line, he understands that there are omissions and needs to refer to the .log file (line numbers are not needed - just as an example)
 
A100:

While parsing the previous example, we found out a crucial difference between MQL and C++

In MQL(build 978) the result is: 2 (C::g is called), and in C++ the result is: 3 (D::g is called)

So it turns out that MQL gives priority to an exact type match of the argument, even if it's in a base class, while C++ gives priority to the closest possible class that may not have an exact type match but can have an implicit type conversion.

Please check the results on recent C++ compilers and if the difference is confirmed, preferably decide in favour of C++ for unification purposes.

That's right. Priority is given to an exact match. And it's really right.

Why do we need such unification? Unification of the processing of improperly designed programmes

 
ALXIMIKS:

Are the copy constructor and assignment operator even planned in the future?

Base class A has 15 fields, it has two descendants B and C - each has +5 more fields.

And the rest is a 20 minute quest.

Yes, we will, but in the near future it is not yet in the plans.
Reason: