POSSIBLE BUG ON MT5 Build 3480 compiler and previous

 

I need a service support for a possible compiler BUG in the MT5 Build 3480 version :

I am using Advapi32.dll because I need an EA to automatically create the HKEY_CURRENT_USER/QKLog/data1 key in the windows 10 registry, during its inizialization.
However, I get a violation error.
I tryed also to use the same code adapted for Metatrader 4 and it works perfectly.
I am attaching a very simple script where I isolated the part of the code that generates the error.


You can notice that when the code lines 25 and 26 (
// string api = ....
// string url = ....) are disabled by commenting them,  the RegCreateKeyExW function works perfectly by creating the registry key without any violation errors.

If yor enable the code lines 25 and 26 the  RegCreateKeyExW generates the violation error.
I tryed also to start the MT5 with all administrative rights but the problem remains.


Below is the error log

2022.11.01 09:54:47.172    test_error (USDJPY,M1)    Access violation at 0x00007FFFD16D5AC8 read to 0x0000021100000008
2022.11.01 09:54:47.173    test_error (USDJPY,M1)       crash -->  00007FFFD16D5AC8 488B4908          mov        rcx, [rcx+0x8]
2022.11.01 09:54:47.173    test_error (USDJPY,M1)                  00007FFFD16D5ACC 4885C9            test       rcx, rcx
2022.11.01 09:54:47.173    test_error (USDJPY,M1)                  00007FFFD16D5ACF 0F8413020500      jz         dword 0x7fffd1725ce8
2022.11.01 09:54:47.173    test_error (USDJPY,M1)   
2022.11.01 09:54:47.173    test_error (USDJPY,M1)                  00007FFFD16D5AD5 E826000000        call       0x7fffd16d5b00
2022.11.01 09:54:47.173    test_error (USDJPY,M1)                  00007FFFD16D5ADA 8BD0              mov        edx, eax
2022.11.01 09:54:47.173    test_error (USDJPY,M1)                  00007FFFD16D5ADC 85D2              test       edx, edx
2022.11.01 09:54:47.173    test_error (USDJPY,M1)                  00007FFFD16D5ADE 750A              jnz        0x7fffd16d5aea
2022.11.01 09:54:47.173    test_error (USDJPY,M1)   
2022.11.01 09:54:47.173    test_error (USDJPY,M1)   
2022.11.01 09:54:47.173    test_error (USDJPY,M1)    00: 0x00007FFFD16D5AC8
2022.11.01 09:54:47.173    test_error (USDJPY,M1)    01: 0x00007FFFD16A0409
2022.11.01 09:54:47.173    test_error (USDJPY,M1)    02: 0x00007FFFD169FF8B
2022.11.01 09:54:47.173    test_error (USDJPY,M1)    03: 0x00000211A40B06E6
2022.11.01 09:54:47.173    test_error (USDJPY,M1)   

Files:
 

Please note that build 3480 is a beta build, not an official release build.

If you don't intent to be a "beta" tester, then don't use beta builds for your projects.

Instead, use only officially released builds pushed out by reputable brokers and not beta builds pushed out on MetaQuotes demo servers.

 
Fernando Carreiro #:

Please note that build 3480 is a beta build, not an official release build.

If you don't intent to be a "beta" tester, then don't use beta builds for your projects.

Instead, use only officially released builds pushed out by reputable brokers and not beta builds pushed out on MetaQuotes demo servers.

Thanks for your advice, I had also carried out tests with the previous version, still getting the same error.
Was the previous version also a beta?

In any case, I will also carry out tests with the official version of the broker.
 
ricfor #: Thanks for your advice, I had also carried out tests with the previous version, still getting the same error. Was the previous version also a beta? In any case, I will also carry out tests with the official version of the broker.

The last official release build was 3440, but was followed by a few critical fixes pushed out by some brokers. So currently, build 3446 (24 September 2022) is the most stable. Anything after that is considered beta builds.

 
I just tryed on the FPMarkets broker official MT5 platform build 3476 obtaining the same error.
 
Fernando Carreiro #:

The last official release build was 3440, but was followed by a few critical fixes pushed out by some brokers. So currently, build 3446 (24 September 2022) is the most stable. Anything after that is considered beta builds.

Thanks, but how I can try with 3440 build ?   where is it possible to download it ?   
 
previous versions prev version prev. version MT4/5 Versionen zum Download Thanks to Andrey Khatimlianskii https://www.mql5.com/de/users/komposter:
https://drive.google.com/drive/folders/1YSUVehcElTpLxCLPMsdlDfFu4Y61yrcc
 
Carl Schreiber #:
previous versions prev version prev. version MT4/5 Versionen zum Download Thanks to Andrey Khatimlianskii https://www.mql5.com/de/users/komposter:
https://drive.google.com/drive/folders/1YSUVehcElTpLxCLPMsdlDfFu4Y61yrcc
Thanks very very much for sharing !
 

I just tried to run the script by using the MT5 Build 3440 version, getting the same violation error that also resulted in the previous tests using the MT5 beta build.

By commenting the line of the StringFormat statement, the RegCreateKeyExW function correctly generates the key in the windows registry.

I tried also to concatenate the url string in several ways avoiding using the StringFormat statement, but the error is not resolved.

It appears that the RegCreateKeyExW function enters somehow in conflict with the previous statements where any string is concatenated.

Unfortunately, the logic of the EA that I'm programming provides that the url variable is declared and valued before executing theRegCreateKeyExW function and I do not find any other possibilities trying to bypass that violation error.

The same script compiled on MT4 works perfectly without ever getting violation errors.

I hope this strange anomaly can be resolved soon by the developers.





Reason: