i newly have problems with compiler of build 1241.
There is one expert which keeps the compiler crashing.
I could find the row which - when outcommented - removes the crash but i could not reproduce
this issues with simple code.
Also, i have strange behaviour in windows 10 at runtime: A pointer cast to base class pointer fails which seems to be the case only on windows 10 machines.
So the pointer is invalid. In this case as well, i could not create simple code to demonstrate it.
classA* pA=(classA*) this;
This worked so far on my MT5 installed in windows 7.
I works as well in debug mode in Windows 10 but in release note.
I already wrote the desk but i like to know, if i am the only one having these problems.
I could reproduce the cast problem:
The expert attached, shows a message box about invalid pointer when you run it in windows 10 release (so no debug session).
Interesting, I did not even know this could be implicitly converted to a pointer, in my code I used GetPointer(this) in assignments. But it was MT4.
Changing code from
solves it. Thank you for this hint. However, i never used GetPointer and my expert were fine.
There is additional unusual implicit behaviour - you may skip the casting operator (type*) in assignments, i.e. classA* pA= GetPointer(this);
Once they fix it I would get zillion errors.
thank you, the GetPointer solved all problems.
The invalid cast does not occur any longer as well as compiler crash disappeared.
I had this problems only on windows 10 in release version.
Thank you for help.