Download MetaTrader 5

When debugging, the debugger randomly stops with Uninit Reason 4 (Chart Closed)

To add comments, please log in or register
Alexander Martinez
578
Alexander Martinez  

As the title says, when debugging, the debugger randomly stops with uninit reason 4 ("Chart Closed" according to the Uninitialization Reason Codes).

‌It could be anywhere from 7-15 minutes.‌

I'm not closing the chart and there's no functions in the EA that would cause the chart to close or even messes with the chart (other than, perhaps, OnChartEvent). In fact, I just leave the EA running without me messing with it to be absolutely sure that it's doing this on its own.

‌I even set up breakpoints where the code of if statements would process if the conditions were met, just to see if something fishy is going on, and the breakpoints aren't triggered so I know the code is running smoothly (or at least I believe it is).

It's too much code to share in a forum post, so before I delve any deeper into this, I'm just wondering‌ if this is expected behavior. For example, maybe the debugger closes after a while if it doesn't receive any user input or something?

Alain Verleyen
Moderator
35118
Alain Verleyen  
No it's not expected. Which build is it ?
Alexander Martinez
578
Alexander Martinez  
Alain Verleyen:
No it's not expected. Which build is it ?

Build 1049.

‌Unfortunately, the markets are closed, but I just thought about debugging another EA to see if I experience the same issue.

Doerk Hilger
1553
Doerk Hilger  
I also reported this behaviour to the service desk. There is a newer build, but the problem is the same.
Alexander Martinez
578
Alexander Martinez  
Doerk Hilger:
I also reported this behaviour to the service desk. There is a newer build, but the problem is the same.
Thanks for sharing. It sucks not knowing if you're experiencing an isolated issue or a known issue.
Carl Schreiber
Moderator
7955
Carl Schreiber  
This happens occasionally to me too while I was debugging an indicator (mt4 b1031). I pressed Shift +F9 and debugging ended - a restart passed that code line.
sierwoo
18
sierwoo  
I happened this problem this days.I could't resolve it.I had try my EA(Empty) on other PC but also .Hope the superman save me !
Blahtech Limited
6910
James Cater  

I've never found the debugger to be super stable.

When I use it I try to set breakpoints that exactly match my area of interest rather than long debug sessions that repeatedly stop inside loops

YMMV

To add comments, please log in or register