Errors, bugs, questions - page 2256

 
Nikolai Semko:

1881

Corrected since the 1886 build.

Nikolai Semko:
. And there is more. I'm not sure about it.
A year ago such problems didn't seem to exist.

You just didn't see the problems.

When we added iTime, iOpen, iHigh etc functions which are actually degenerated CopyTime, CopyOpen, CopyHigh etc, we saw that there were cases when the latest data had not been loaded yet and the functions returned the result. In case of i-Functions this proved to be critical.

Everything should work correctly and fast now. Wait for official build.

 
Slava:

Fixed since the 1886 build.

You just haven't seen the problems.

When we added iTime, iOpen, iHigh etc functions, which are actually degenerated CopyTime, CopyOpen, CopyHigh etc, we saw that there are cases when the latest data is not loaded yet and the functions return the result. In case of i-Functions it turned out to be critical.

Everything should be working properly and fast now. Wait for the official build.

Got it, thanks.
I.e. the current available build is 1881? Or did I miss something?
 
Nikolai Semko:
Got it, thanks.
So the current available build is 1881? Or did I miss something?
Current available build 1881
 

Error during execution:

class A {
public:
        template<typename T>
        A* A::f( T )
        {
                int size = ArraySize( i ) + 1;
                Print( __FUNCTION__, ":", size );
                if ( ArrayResize( i, size ) == -1 )
                        Print( __FUNCTION__, ":Error:", GetLastError());
                return &this;
        }
        template<typename T>
        A* A::operator+( T t ) { return  f( t ); }
        int i[];
};
void OnStart()
{
        A a;
        a + 0 + 0;
}

Result: Expected:

A::f<int>:1 A::f<int>:1
A::f<int>:753790661 A::f<int>:2
A::f<int>:Error:4007

Otherwise:

void OnStart()
{
        A a;
        a.f( 0 ).f( 0 );
}

OK. What's the difference? Why did the array size suddenly become 753790660 (instead of one) and as a consequence memory suddenly ran out (4007) ? MT5\1881\32

Moreover... If we delete literally three characters in the first variant, the result will also be okay

 
A100:

Execution error:
Why did the array size suddenly become 753790660 (instead of one) and therefore suddenly run out of memory (4007) ? MT5\1881\32

MT5\1881\64
debug - all ok.
release - compilation error "Internal compiler error".

 

Compilation error:

class A {
        int A::f() { return NULL; } //нормально
        A  *A::g() { return NULL; } //Error: object of 'A' cannot be returned, copy constructor 'A::A(const A &)' not found
};
MT5\1881\32
 
A100:

Why would you write {} inside a class like this (::)?

 

Compilation error:

class A {
        int A::f();
        template <typename T>
        A*  A::g();
};
int A::f() { return NULL; } //нормально
template<typename T>
A*  A::g() { return NULL; } //Error: 'g' - function already defined and has different type
 
fxsaber:

Why would you write {} inside a class like this (::)?

Why not?

class A {
        void A::f() {} //нормально
};
It's roughly like this... I want to write it... if I want to, I don't.
 
A100:

Why not?

It's not a reason.

It's kind of like this... I want to write... if I want to, I don't.
This helps a lot when reading code and avoids mistakes in some situations.
Reason: