Compiler error when adding new product.

 

Hi,

I'm trying to add a new product, TheStrat Monitor MT5 (67376), and when I add the .ex5 file it keeps coming back with a compiler error. The Indicator works perfectly on two separate MT5 accounts, so I'm struggling to see what the problem is.


This is the error it is returning:

Test on EURUSD,H1 (netting)

2020.05.01 00:00:00 Unhandled exception 0xC0000094 2020.05.01 00:00:00 crash --> 000001DDF0EDA2E7 F7F9 idiv ecx 2020.05.01 00:00:00 000001DDF0EDA2E9 39CB cmp ebx, ecx 2020.05.01 00:00:00 000001DDF0EDA2EB 8985CD020000 mov [rbp+0x2cd], eax 2020.05.01 00:00:00 000001DDF0EDA2F1 7E1F jle 0x1ddf0eda312 2020.05.01 00:00:00 2020.05.01 00:00:00 000001DDF0EDA2F3 8B85D1020000 mov eax, [rbp+0x2d1] 2020.05.01 00:00:00 000001DDF0EDA2F9 0FAFC1 imul eax, ecx 2020.05.01 00:00:00 000001DDF0EDA2FC 01C1 add ecx, eax 2020.05.01 00:00:00 2020.05.01 00:00:00 00: 0x000001DDF0EDA2E7 2020.05.01 00:00:00 01: 0x000001DDE8C6CB20 2020.05.01 00:00:00 02: 0x00007FF6732D5F04 2020.05.01 00:00:00 03: 0x000001DDF0ACD720 2020.05.01 00:00:00 04: 0x0000000000000001 2020.05.01 00:00:00 05: 0x0000008DC69FEA10 2020.05.01 00:00:00 06: 0x000001DDE8C6CB20 2020.05.01 00:00:00 07: 0x000001DDF0ACD718 2020.05.01 00:00:00 08: 0x0000008DC69FE901 2020.05.01 00:00:00 09: 0x000001DDF0EC2F40 2020.05.01 00:00:00


Any bright ideas why this might happen?


Thanks,

Rob.

 
Robert Gerald Wood:

Hi,

I'm trying to add a new product, TheStrat Monitor MT5 (67376), and when I add the .ex5 file it keeps coming back with a compiler error. The Indicator works perfectly on two separate MT5 accounts, so I'm struggling to see what the problem is.


This is the error it is returning:

Test on EURUSD,H1 (netting)

2020.05.01 00:00:00 Unhandled exception 0xC0000094 2020.05.01 00:00:00 crash --> 000001DDF0EDA2E7 F7F9 idiv ecx 2020.05.01 00:00:00 000001DDF0EDA2E9 39CB cmp ebx, ecx 2020.05.01 00:00:00 000001DDF0EDA2EB 8985CD020000 mov [rbp+0x2cd], eax 2020.05.01 00:00:00 000001DDF0EDA2F1 7E1F jle 0x1ddf0eda312 2020.05.01 00:00:00 2020.05.01 00:00:00 000001DDF0EDA2F3 8B85D1020000 mov eax, [rbp+0x2d1] 2020.05.01 00:00:00 000001DDF0EDA2F9 0FAFC1 imul eax, ecx 2020.05.01 00:00:00 000001DDF0EDA2FC 01C1 add ecx, eax 2020.05.01 00:00:00 2020.05.01 00:00:00 00: 0x000001DDF0EDA2E7 2020.05.01 00:00:00 01: 0x000001DDE8C6CB20 2020.05.01 00:00:00 02: 0x00007FF6732D5F04 2020.05.01 00:00:00 03: 0x000001DDF0ACD720 2020.05.01 00:00:00 04: 0x0000000000000001 2020.05.01 00:00:00 05: 0x0000008DC69FEA10 2020.05.01 00:00:00 06: 0x000001DDE8C6CB20 2020.05.01 00:00:00 07: 0x000001DDF0ACD718 2020.05.01 00:00:00 08: 0x0000008DC69FE901 2020.05.01 00:00:00 09: 0x000001DDF0EC2F40 2020.05.01 00:00:00


Any bright ideas why this might happen?


Thanks,

Rob.


Trying again, just changed a print statement, and now I get this:


test on EURUSD,H1 (netting)

2019.05.01 00:00:00 Zero divide, check divider for zero to avoid this error in 'Tester\Agent-127.0.0.1-3000\MQL5\Indicators\TheStrat_Monitor.ex5' test67376 (EURUSD,H1) OnInit return code is -1 cannot initialize indicator disconnected


Note the date of the error message, 2019.05.01 00:00:00, something wierd going on in your compiler??


R.

 
Robert Gerald Wood #:


Trying again, just changed a print statement, and now I get this:


test on EURUSD,H1 (netting)

2019.05.01 00:00:00 Zero divide, check divider for zero to avoid this error in 'Tester\Agent-127.0.0.1-3000\MQL5\Indicators\TheStrat_Monitor.ex5' test67376 (EURUSD,H1) OnInit return code is -1 cannot initialize indicator disconnected


Note the date of the error message, 2019.05.01 00:00:00, something wierd going on in your compiler??


R.


File attached of error report.

Files:
 
Is anyone looking at these messages or am I shouting into thin air?
 
Robert Gerald Wood #:
Is anyone looking at these messages or am I shouting into thin air?
We can't help you here. Yopu have to contact the seller and programmer of this tool - but maybe you don't have enough RAM? Check F2 in the terminal.
 
Carl Schreiber #:
We can't help you here. Yopu have to contact the seller and programmer of this tool - but maybe you don't have enough RAM? Check F2 in the terminal.

Thank you Carl for responding.

I am the developer, the Indicator compiles perfectly on my PC, and runs on two separate PC's.

Where I have a problem is when I try to submit it as a new product on here, it comes back with that compiler error.

I can't see why it would fail, and I have no way to debug it.


Is there anywhere else I can get some help?


Thanks again,

Rob.

 

Adding an image of the compiler error, just in case someone happens to look at this and has an idea how to fix it.

Files:
Capture.PNG  29 kb
 

I am not sure that it helps ... but if it is related to "array out of range" error with OnInit() so I found it on this part of the article:
https://www.mql5.com/en/articles/2555#out_of_range

and there is small thread with the discussion here: About no ticks generated error for the same day back testing.

The checks a trading robot must pass before publication in the Market
The checks a trading robot must pass before publication in the Market
  • www.mql5.com
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
 
Sergey Golubev #:

I am not sure that it helps ... but if it is related to "array out of range" error with OnInit() so I found it on this part of the article:
https://www.mql5.com/en/articles/2555#out_of_range

Thanks Sergey, I will have a good trawl through that article, but as you say, I don't think its related.

Rob.

 
Robert Gerald Wood #:

Thanks Sergey, I will have a good trawl through that article, but as you say, I don't think its related.

Rob.

OK, so while that didn't directly solve the issue, it did lead me to try debugging in a different way.

Basically, I had to:

  1. Comment everything out in the OnInit method
  2. Rebuild the Indicator
  3. Check it ran, even though it does not do the whole job
  4. Upload to MQL5 product
  5. Wait for the report

then uncomment one line at a time and repeat steps 2 to 5 until I got the error message again.

After that, it was repeat until I found a way to make it work, even though I still have not identified any real issue, certainly no divide by zero error.

I hope that helps anyone who has the same/similar problem in the future.

Thanks again Sergey for your help.

 
Robert Gerald Wood #:

OK, so while that didn't directly solve the issue, it did lead me to try debugging in a different way.

Basically, I had to:

  1. Comment everything out in the OnInit method
  2. Rebuild the Indicator
  3. Check it ran, even though it does not do the whole job
  4. Upload to MQL5 product
  5. Wait for the report

then uncomment one line at a time and repeat steps 2 to 5 until I got the error message again.

After that, it was repeat until I found a way to make it work, even though I still have not identified any real issue, certainly no divide by zero error.

I hope that helps anyone who has the same/similar problem in the future.

Thanks again Sergey for your help.

Have you used #property strict - it could help?

Beside that can you give us a hint what was the problem?

Reason: