INVALID_POINTER with virtual function, derived class, returning struct

 

I found a problem with MT5 build 1150. When passing a pointer to a virtual function in a derived class that returns a struct, CheckPointer returns INVALID_POINTER even thought the pointer is valid (using the pointer results in an access violation).

 I've attached the file to reproduce the issue. Just run the script.

Thanks 

Files:
 
Naf3tS:

I found a problem with MT5 build 1150. When passing a pointer to a virtual function in a derived class that returns a struct, CheckPointer returns INVALID_POINTER even thought the pointer is valid (using the pointer results in an access violation).

 I've attached the file to reproduce the issue. Just run the script.

Thanks 

The script is working on my platform:

2015.07.11 17:33:40.002 ReproVirtStructIssue (AUDUSD,H1)        Returned: POINTER_DYNAMIC (2)

Probably because you are using an older build. I am using build 1159.

 
I confirm this is a bug in last official release 1150, fixed in 1159 available at Metaquotes-Server.
 
Alain Verleyen:
I confirm this is a bug in last official release 1150, fixed in 1159 available at Metaquotes-Server.

Thanks. Can you post the download location? The download at this URL is still 1150:

https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mt5setup.exe

 
Any idea when this build will be available? This is a pretty severe compiler bug that has broken some pretty basic object-oriented code...
 
Naf3tS:
Any idea when this build will be available? 
Open MT5 and create a new demo account on the metaquotes server. Your terminal will then update to the latest build (give it a few minutes)
 
Stuart Browne:
Open MT5 and create a new demo account on the metaquotes server. Your terminal will then update to the latest build (give it a few minutes)
That's worked, thanks.
 
Naf3tS:
That's worked, thanks.
Welcome :)
Reason: