Invalid EX5 file - just like that

 

Hi,

since yesterday, the debugger is not able to compile the project anymore, just like that. It started when I created a macro and inserted this into some source files. This was the first time when the debugger created an invalid EX5 file, while the normal compiling process created a working version.

Afterwards, I replaced the macro by an empty macro without functionality, cause I suspected it already - that problem was known in MQL4 before. But, no success.

Afterwards I rolled back the the backup of the previous day, which I created after I finished a release version which worked without problems, also with the debugger. But - no success.


So in fact, I cannot continue my work because I have absolutely no clue whats going on here. From one day to another, simply no more able to debug. 

The service desk asked me for the entire source ... this is impossible without non disclosure agreement and we talk about >70 files. In other words, they have also no idea.

Of course I restarted the terminal several times as well as Windows.


Has anyone an idea?

 

Which build is it ?

So if I understood well, an source code which was compiling fine (debug mode) some days ago, didn't compile correctly anymore ? I would suggest you to try with a fresh MT5 installation, restoring your backup which was working, if not yet tried.

Sometimes weird behaviour like that can also result from hardware issues (HDD/SSD/RAM), so try on an other computer if possible.

 
Doerk Hilger:

Hi,

since yesterday, the debugger is not able to compile the project anymore, just like that. It started when I created a macro and inserted this into some source files. This was the first time when the debugger created an invalid EX5 file, while the normal compiling process created a working version.

Afterwards, I replaced the macro by an empty macro without functionality, cause I suspected it already - that problem was known in MQL4 before. But, no success.

Afterwards I rolled back the the backup of the previous day, which I created after I finished a release version which worked without problems, also with the debugger. But - no success.

So in fact, I cannot continue my work because I have absolutely no clue whats going on here. From one day to another, simply no more able to debug. 

The service desk asked me for the entire source ... this is impossible without non disclosure agreement and we talk about >70 files. In other words, they have also no idea.

Of course I restarted the terminal several times as well as Windows.

Has anyone an idea?

Might not be the case, but since this happened to me very recently, it might steer you in the right direction.

I was using ArrayMaximum and ArrayMinimum but I was accidentally using the MQL4 order of parameters instead of the MQL5 order. The compiler obviously did not detect the problem and at runtime, it would just cause an "Invalid EX5" error (very helpful).

There are many MQL5 functions that at first glance seem to be identical to the MQL4 ones but their parameters are slightly different or in a different order, which can make spotting these errors very frustrating.

EDIT: Forgot to mention that this was actually causing other source code to compile incorrectly as well. In other words, the first failed attempt, corrupted memory and that in turn started causing compile "Invalid EX5" for all the other EAs and Indicators compiled.

I had to clean-up by deleting all affected EX5 files and restarting windows (as well as fix the bug otherwise MetaTrader would automatically recompile when restarted, causing the whole cycle of failures again).

 

Wow, you guys are quick :) Thank you.

@Alain

Build No is 1709, and of course it´s also the same than before. 

It wasn´t days before, actually only hours, the evening before. And in the meanwhile, there were no changes but this macro. But to make sure, I restored the entire backup. 

Computer ... I am using Paralles Desktop with a Mac. Another machine ... I could try on a VPS system, sure.


@Fernando

Hmm ... but there were no such changes, that´s the problem. Anyway I replaced almost every standard function by classes or own functions earlier. But thanks for this hint with the file folders, I will double check if I overlooked something.


Holy shit this ... and weird is, that only the debugger produces such invalid files, the normal compiler works.

 
Doerk Hilger:

Wow, you guys are quick :) Thank you.

@Alain

Build No is 1709, and of course it´s also the same than before. 

It wasn´t days before, actually only hours, the evening before. And in the meanwhile, there were no changes but this macro. But to make sure, I restored the entire backup. 

Computer ... I am using Paralles Desktop with a Mac. Another machine ... I could try on a VPS system, sure.


@Fernando

Hmm ... but there were no such changes, that´s the problem. Anyway I replaced almost every standard function by classes or own functions earlier. But thanks for this hint with the file folders, I will double check if I overlooked something.


Holy shit this ... 

Just reedited my post with extra information, so just read it over again just in case something in it can help you out.

 

What I did not try but what I should is restoring the backup, restart windows and then test it again. Thx Fernando.

 
Doerk Hilger: Build No is 1709, and of course it´s also the same than before.

Since Build 1709 is a beta-version, try updating to the latest 1714 (also beta), but clean up all affected .ex5 files.

 
Doerk Hilger:

Wow, you guys are quick :) Thank you.

@Alain

Build No is 1709, and of course it´s also the same than before. 

Last build is 1714, did you try ?

I would suggest you to have 2 completely separate installation one using the last stable release, and 1 for beta (and I consider official new release less than 1 month still a beta).

It wasn´t days before, actually only hours, the evening before. And in the meanwhile, there were no changes but this macro. But to make sure, I restored the entire backup. 

Computer ... I am using Paralles Desktop with a Mac. Another machine ... I could try on a VPS system, sure.

Yes but the macro is not in cause if your backup is good ? Are you sure it is ?

Anyway, no other than checking all possibilities I am afraid.

 

I will let you know tomorrow. Stuff like this is pretty bad if it happens to you. Last time it took me 2 days to find the origin, bad when you have to deliver. That´s why I think its important to share such experiences and solutions ... if any.

 
Fernando Carreiro:

Since Build 1709 is a beta-version, try updating to the latest 1714 (also beta), but clean up all affected .ex5 files.

Is there any "hidden" files cached or temporary used by the compiler, never checked. That's also why I suggest to try on an other computer, to be sure nothing remains behind a cleaning.

 
Alain Verleyen: Is there any "hidden" files cached or temporary used by the compiler, never checked. That's also why I suggest to try on an other computer, to be sure nothing remains behind a cleaning.

I don't think so, but with all the constant changes and bugs, one never knows (until its too late).

Reason: