I posted a similar topic yesterday and actioned a suggestion from Nicholi. However, when debugging again today, I got numerous instances of the "delete invalid pointer" message in the Experts tab, after the debugger inadvertently failed to stop at the first breakpoint. After going through my steps, I noticed that when the indicator dialog loads after pressing the "play" button in the debugger, I was loading a preset file. I did this because recently, I've used preset files in the terminal (I never used them previously) and in a recent round of debugging over the past few weeks have also loaded the same preset file(s) when using the debugger.
I actioned the debugger WITHOUT the preset file and; 1) no problem hitting my initial breakpoint; 2) after quitting the debugger, no "delete invalid pointer" errors in the Experts tab.
I tried this a few times and got the same results. If I don't apply a preset in the debugger, all is well.
Any thoughts about this?
Short of posting the whole application, I'm not sure what code I could actually post here? The application (indicator) runs and works as expected. If I place a breakpoint in it, anywhere, and run the debugger, it doesn't hit the breakpoint (even the first line) and exits with "deleted invalid pointer" errors in the Experts tab.
This happens after loading a preset before the debugger runs. It's an observation, I don't know why it happens and therefore, I'm at a loss to know what I could post. I've only seen this behaviour since recent updates to MT4. I was hoping that someone had seen this as well.
Why open two topics for the same issue?
My workaround would be to put Print statements in front of each delete, to get an idea what pointer is wrong. Maybe it's not even related to your code?
Why open two topics for the same error?
It's not the same error, it's the same error message. I updated my code with Nicholi's suggestion. That seemed to work fine. I then noticed the same error when routinely running the debugger after loading a preset file. It's a different post title with an explanation as to the difference. I assume my explanation has been lost on folk.
Cheers and thanks.