Invalid EX5 file (8) - MT5/MQL5 BUG - page 3

 
Doerk Hilger:

...

4. Compile - When I press the Start-button to start the debugger, it creates an EX5. This does not work. When I press the Compile-button which only creates the EX5, that one works. 

So the debugger doesn't work ? I suppose the ServiceDesk will be able to figure out why, if they want.
 

Fourteen hours later I found the origin somewhere in the deep woods of the forest of classes. Unbelievable ... but still and once again a macro caused it.

1. This code will crash the file:

#define CHARTVARNAME(name) m_varprefix+"#VAR#"+name
GlobalVariablesDeleteAll(CHARTVARNAME(NULL));

2. But as soon as I use "" instead of NULL, it works:

GlobalVariablesDeleteAll(CHARTVARNAME(""));

Of course I don´t know if this is a general problem or if it only occurs in more complex code ... I am too tired to figure out. So take care on NULL in macro-parameters with MT5, guys, it can ruin your day. MT4 is fine with it.

Thank you for supporting me.

Cheers

Doerk
 

 
Doerk Hilger:

Fourteen hours later I found the origin somewhere in the deep woods of the forest of classes. Unbelievable ... but still and once again a macro caused it.

1. This code will crash the file:

2. But as soon as I use "" instead of NULL, it works:

Of course I don´t know if this is a general problem or if it only occurs in more complex code ... I am too tired to figure out. So take care on NULL in macro-parameters with MT5, guys, it can ruin your day. MT4 is fine with it.

Thank you for supporting me.

Cheers

Doerk
 

Yeah but that's a wrong usage of NULL. You should not use it in mql4 either.
 
Alain Verleyen:
Yeah but that's a wrong usage of NULL. You should not use it in mql4 either.

Never heard of that and never had an error when e. g. concatenated string variables and one of those was NULL ... also not in C# or C++ ... sure?

 
Doerk Hilger:

Never heard of that and never had an error when e. g. concatenated string variables and one of those was NULL ... also not in C# or C++ ... sure?

If we take the documentation as reference, which I always do until proven otherwise, I would not use it this way.

'name' in your macro is not a variable, maybe we understand the doc differently. Anyway it's after the facts comment, so not really useful for you.

Though I will never understand why people are continuously repeating "but it's like that in C or C++ or C# or D or E " This is MQL !!!


 

You should tell the preprocessor of MQL4, it seems to have a different opinion about that ;)

 
Doerk Hilger:

You should tell the preprocessor of MQL4, it seems to have a different opinion about that ;)

That's probably why they want to stop it :-D
 

Does Service Desk still working?

I got this error in any indicator/expert/script i compile:

invalid EX5 file (534)

Reason: