VPS Migration failed - failed to load program (546)

 

I get the error shown below since a few days.

I cannot migrate on several MT5 accounts.

I tried also migrating from different computers.

I stopped the VPS and restarted it.

The Error stays the same. "Migration failed" and "failed to load program (546)".

I use VPS since years and never had such an issue.

Any idea what to do?


Error Message

 
Dr. Pieter Mergenthaler: I get the error shown below since a few days. I cannot migrate on several MT5 accounts. I tried also migrating from different computers. I stopped the VPS and restarted it. The Error stays the same. "Migration failed" and "failed to load program (546)". I use VPS since years and never had such an issue. Any idea what to do?

In your screenshot, in the red box ... "Migration failed, please check the journal of your program"

So please check and show your Journal log entries for the migration attempt, and provide more technical details ... How to report technical issues?

 
Fernando Carreiro #:

In your screenshot, in the red box ... "Migration failed, please check the journal of your program"

So please check and show your Journal log entries for the migration attempt, and provide more technical details ... How to report technical issues?

Thanks for your help. Here the Journal log entries.

first, as described in the link you provideed "how to report..": 

2024.01.30 07:55:17.609    Terminal    MetaTrader 5 IC Markets EU x64 build 4153 started for IC Markets (EU) Ltd
2024.01.30 07:55:17.610    Terminal    Windows 10 build 19045, 8 x Intel Core i7-3740QM  @ 2.70GHz, AVX, 2 / 7 Gb memory, 7 / 476 Gb disk, UAC, GMT+1
2024.01.30 07:55:17.610    Terminal    C:\Users\Pieter\AppData\Roaming\MetaQuotes\Terminal\4B1CE69F577705455263BD980C39A82C

Second, from the actual event of migration:
2024.01.30 08:09:44.126    Experts    expert EACustom (EURUSD,Daily) loaded successfully
2024.01.30 08:10:36.952    Virtual Hosting    6484712: prepare to transfer experts, indicators and signal
2024.01.30 08:10:36.952    Virtual Hosting    6484712: migrate 323 symbols (4.83 Kb)
2024.01.30 08:10:36.953    Virtual Hosting    6484712: prepare charts to synchronize...
2024.01.30 08:10:36.965    Virtual Hosting    6484712: migrate chart "EURUSD,Daily" (344.17 Kb archived to 27.52 Kb)
2024.01.30 08:10:36.988    Virtual Hosting    6484712: transferred chart size 27.69 Kb
2024.01.30 08:10:36.988    Virtual Hosting    6484712: 1 chart prepared to synchronize
2024.01.30 08:10:36.989    Virtual Hosting    6484712: prepare expert files to synchronize...
2024.01.30 08:10:36.989    Virtual Hosting    6484712: check for load "Experts\EACustom.ex5"
2024.01.30 08:10:37.078    Virtual Hosting    6484712: failed to load program (546)

Third, Journal log from a different computer.

2024.01.22 16:20:24.411    Terminal    MetaTrader 5 IC Markets (SC) x64 build 4153 started for Raw Trading Ltd
2024.01.22 16:20:24.412    Terminal    Windows Server 2012 R2 build 9600 on KVM, 2 x Intel Xeon Silver 4216  @ 2.10GHz, AVX2, 0 / 2 Gb memory, 3 / 79 Gb disk, touchable, RDP, UAC, admin, GMT+0
2024.01.22 16:20:24.412    Terminal    C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\1640F6577B1C4EC659BF41EA9F6C38ED

2024.01.30 07:24:13.092    Virtual Hosting    6484712: prepare to transfer experts, indicators and signal
2024.01.30 07:24:13.093    Virtual Hosting    6484712: migrate 10 symbols (156 bytes)
2024.01.30 07:24:13.093    Virtual Hosting    6484712: prepare charts to synchronize...
2024.01.30 07:24:13.120    Virtual Hosting    6484712: migrate chart "US30,Daily" (851.25 Kb archived to 61.60 Kb)
2024.01.30 07:24:13.120    Virtual Hosting    6484712: transferred chart size 61.77 Kb
2024.01.30 07:24:13.120    Virtual Hosting    6484712: 1 chart prepared to synchronize
2024.01.30 07:24:13.121    Virtual Hosting    6484712: prepare expert files to synchronize...
2024.01.30 07:24:13.121    Virtual Hosting    6484712: check for load "Experts\EACustom.ex5"
2024.01.30 07:24:13.126    Virtual Hosting    6484712: failed to load program (546)
 
As you can read there is something wrong with the EA: "Experts\EACustom.ex5"
 
Dr. Pieter Mergenthaler #:
2024.01.30 08:10:36.989    Virtual Hosting    6484712: check for load "Experts\EACustom.ex5"
2024.01.30 08:10:37.078    Virtual Hosting    6484712: failed to load program (546)

As stated, there is a problem with the "EACustom.ex5" file.

Possible causes that come to mind are:

  • File is corrupt.
  • Was compiled with very old compiler.
  • Was NOT compiled with "X64 Regular"
  • Has dependencies on DLL's.
So, try recompiling it with "X64 Regular" and make sure it is not dependant on DLLs.
 
Fernando Carreiro #:

As stated, there is a problem with the "EACustom.ex5" file.

Possible causes that come to mind are:

  • File is corrupt.
  • Was compiled with very old compiler.
  • Was NOT compiled with "X64 Regular"
  • Has dependencies on DLL's.
So, try recompiling it with "X64 Regular" and make sure it is not dependant on DLLs.

Thanks for the list. My answer below in bold.

  • File is corrupt.
    • This seems not to be the case since I can run backtests with the file and I can run the EA on computers and my personal Windows Server. Only with MT5-VPS the issue occurs since a few days.
  • Was compiled with very old compiler.
    • The MT5-platform I use was installed more than I year ago. I always install the latest versions as soon as there are updates. How do I find out how old the compiler is?
  • Was NOT compiled with "X64 Regular"
    •  Compile    C:\Users\Pieter\AppData\Roaming\MetaQuotes\Terminal\4B1CE69F577705455263BD980C39A82C\MQL5\Experts\EACustom.mq5 - 0 errors, 409 warnings, 7316 msec elapsed, cpu='X64 Regular'
  • Has dependencies on DLL's.
    • No DLL included.
 
Dr. Pieter Mergenthaler #:

Thanks for the list. My answer below in bold.

  • File is corrupt.
    • This seems not to be the case since I can run backtests with the file and I can run the EA on computers and my personal Windows Server. Only with MT5-VPS the issue occurs since a few days.
  • Was compiled with very old compiler.
    • The MT5-platform I use was installed more than I year ago. I always install the latest versions as soon as there are updates. How do I find out how old the compiler is?
  • Was NOT compiled with "X64 Regular"
    •  Compile    C:\Users\Pieter\AppData\Roaming\MetaQuotes\Terminal\4B1CE69F577705455263BD980C39A82C\MQL5\Experts\EACustom.mq5 - 0 errors, 409 warnings, 7316 msec elapsed, cpu='X64 Regular'
  • Has dependencies on DLL's.
    • No DLL included.

As a test, just recompile it and try again!

On a side note ...

409 Warnings???

That code is not safe at all. "Warnings" are potential runtime errors. You should always fix your warnings. Never ignore them.

 
Fernando Carreiro #:

As a test, just recompile it and try again!

On a side note ...

409 Warnings???

That code is not safe at all. "Warnings" are potential runtime errors. You should always fix your warnings. Never ignore them.

Yes, definetly some warning-cleanup-homework for me to do for some of the next rainy weekends.


I compiled and tried again. Nothing changed.

2024.01.30 19:35:10.755    Terminal    MetaTrader 5 IC Markets EU x64 build 4153 started for IC Markets (EU) Ltd
2024.01.30 19:35:10.755    Terminal    Windows 10 build 19045, 8 x Intel Core i7-3740QM  @ 2.70GHz, AVX, 3 / 7 Gb memory, 6 / 476 Gb disk, UAC, GMT+1
2024.01.30 19:35:10.755    Terminal    C:\Users\Pieter\AppData\Roaming\MetaQuotes\Terminal\4B1CE69F577705455263BD980C39A82C

2024.01.30 19:47:12.789    Virtual Hosting    6484712: prepare expert files to synchronize...
2024.01.30 19:47:12.789    Virtual Hosting    6484712: check for load "Experts\EACustom.ex5"
2024.01.30 19:47:12.886    Virtual Hosting    6484712: failed to load program (546)

 
Dr. Pieter Mergenthaler #: I compiled and tried again. Nothing changed.

Can you tell us the file size of both the ".mq5" and ".ex5" files?

And as another test, can you please carry out the following procedure.

  1. Save your current setup if required.
  2. Close MT5.
  3. Delete the file "EACustom.ex5" or rename it to something else.
  4. Restart MT5.
  5. Check the log to make sure it carried out an automatic compilation of that file.
  6. Retry the migration.

If that fails, try migrating a different setup with a different EA. Then retry the migration with the correct setup and the correct EA.

Let us know how it goes!

EDIT: Also, can you tell us the full file path of the file?

 
Fernando Carreiro #:

Can you tell us the file size of both the ".mq5" and ".ex5" files?

And as another test, can you please carry out the following procedure.

  1. Save your current setup if required.
  2. Close MT5.
  3. Delete the file "EACustom.ex5" or rename it to something else.
  4. Restart MT5.
  5. Check the log to make sure it carried out an automatic compilation of that file.
  6. Retry the migration.

If that fails, try migrating a different setup with a different EA. Then retry the migration with the correct setup and the correct EA.

Let us know how it goes!

EDIT: Also, can you tell us the full file path of the file?

Can you tell us the file size of both the ".mq5" and ".ex5" files? .mq5: 1.682 KB; .ex5: 593 KB

  1. Save your current setup if required.
  2. Close MT5.
  3. Delete the file "EACustom.ex5" or rename it to something else.
  4. Restart MT5.
  5. Check the log to make sure it carried out an automatic compilation of that file. metaeditor.log file shows that automatic compilation of that file was caried out
  6. Retry the migration. migration failed

If that fails, try migrating a different setup with a different EA. migrating different EA works without issue (very similar to EACustom) 

Then retry the migration with the correct setup and the correct EA. migration failed

EDIT: Also, can you tell us the full file path of the file?

C:\Users\Pieter\AppData\Roaming\MetaQuotes\Terminal\4B1CE69F577705455263BD980C39A82C\MQL5\Experts

EDIT: I recompiled the EA's .mq5 file from december 2023. In december I had no issue migrating. Today migrating that EACustom_20231213 failes.
 
Dr. Pieter Mergenthaler #:

Can you tell us the file size of both the ".mq5" and ".ex5" files? .mq5: 1.682 KB; .ex5: 593 KB

  1. Save your current setup if required.
  2. Close MT5.
  3. Delete the file "EACustom.ex5" or rename it to something else.
  4. Restart MT5.
  5. Check the log to make sure it carried out an automatic compilation of that file. metaeditor.log file shows that automatic compilation of that file was caried out
  6. Retry the migration. migration failed

If that fails, try migrating a different setup with a different EA. migrating different EA works without issue (very similar to EACustom) 

Then retry the migration with the correct setup and the correct EA. migration failed

EDIT: Also, can you tell us the full file path of the file?

C:\Users\Pieter\AppData\Roaming\MetaQuotes\Terminal\4B1CE69F577705455263BD980C39A82C\MQL5\Experts

EDIT: I recompiled the EA's .mq5 file from december 2023. In december I had no issue migrating. Today migrating that EACustom_20231213 failes.


Based on all the information you have given, and all the various tests you have faithfully carried out, I can only concluded that something recent on the MetaQuotes side, is now identifying the EA as invalid.

Solving the issue will require the help of a skilled 3rd party to analyse the EA code and maybe see if they can identify some possible issue, and work with you to troubleshoot it.

If you know a highly skilled programmer, ask them to help review the code with you, to discover the cause.

If you don't have anyone, and if you are willing to trust a moderator, I can try do that for you in private and for free.

On a side note, one more thing you can try, is to modify the EA code is some meaningful way, just so that the resulting compilation is different with some significance, to see if it accepts it.

There is not much more I can think of at this point.

Reason: