I found 2 old topics that commented about similar reasons (one linked to the other):
https://www.mql5.com/en/forum/352474
https://www.mql5.com/en/forum/367395
I was also able to reduce code so that the bug was replicable with 2 files (which I also obfuscated for obvious reasons, but don't mind that). Simply, put the files in a folder in /Include, autocomplete a function with parameters inside the class in file "CauseError.mqh" and press "t". I cannot guarantee it will freeze but in the PC I'm using the freezing is consistent even after restarting the computer. You may need a few tries in some cases (as it loads) for it to happen.
Curiously, changing the return type of some operators in the classes file made it so that it wouldn't freeze, which I find curious since operators never appear in autocompletes (uncommenting the macro in test file does that).
For some perspective, in my last test it took almost 4 minutes to unfreeze after pressing "t". Nonetheless, after pressing "r" it froze again for another 4 minutes...
- 2020.10.01
- www.mql5.com
I found 2 old topics that commented about similar reasons (one linked to the other):
https://www.mql5.com/en/forum/352474
https://www.mql5.com/en/forum/367395
I was also able to reduce code so that the bug was replicable with 2 files (which I also obfuscated for obvious reasons, but don't mind that). Simply, put the files in a folder in /Include, autocomplete a function with parameters inside the class in file "CauseError.mqh" and press "t". I cannot guarantee it will freeze but in the PC I'm using the freezing is consistent even after restarting the computer. You may need a few tries in some cases (as it loads) for it to happen.
Curiously, changing the return type of some operators in the classes file made it so that it wouldn't freeze, which I find curious since operators never appear in autocompletes (uncommenting the macro in test file does that).
For some perspective, in my last test it took almost 4 minutes to unfreeze after pressing "t". Nonetheless, after pressing "r" it froze again for another 4 minutes...
The problem is not always a bug, i have a friend using an older PC he uses for coding and sometimes when the optimization is running, the Meta editor is not responding and both Mt5 and Mt editor crash. Make sure you have sufficient memory and CPU when running optimization. If the case is that your Pc is more than fast enough to handle these operations, you might want to reinstall the software and try with a different version
The problem is not always a bug, i have a friend using an older PC he uses for coding and sometimes when the optimization is running, the Meta editor is not responding and both Mt5 and Mt editor crash. Make sure you have sufficient memory and CPU when running optimization. If the case is that your Pc is more than fast enough to handle these operations, you might want to reinstall the software and try with a different version
I'm not running anything in the background, not even metatrader or a browser, and it happens. It's purely a text editor bug, and in this example not even with a big codebase and without any custom code running (just a pseudo-infinite recursion in metaeditor's autocomplete).
I will try later today with a better PC, but I can recall having some freezes with it earlier this week too
I will try later today with a better PC, but I can recall having some freezes with it earlier this week too
Can confirm now it happens in a better PC too (so it seems to be a replicable issue). Freezes for half the time, but still significant
I hope this time metaquotes can fix the issue with this smaller code sample...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Metaeditor seems to have a bug where it freezes with some specific autocomplete suggestions. In my case, whenever I added a function call with one parameter (exactly one parameter, not more) and pressed "t" (or "w" to a lesser extent) that caused metaeditor to freeze indefinitely (at least I had it 10 minutes before I force closed). It seems to happen consistently in a few files of a larger project.
In that context, there are a few classes that start with "T", so that may be part of the reason (and they have a lot of operator overrides, which also seemed to add to the problem). I haven't been able to replicate the issue with less code: I trimmed it down but at some point the same code went from freezing to working correctly (maybe because of cache but I don't know). I'll try to get a sample that would work, but I'm also curious if anyone else has seen this happen.