Infinite sleep under server 2k3 64bit

 

Under build 355, my EA works fine with windows vista home premium x32 however on windows server 2003 x64 an infinite sleep error is detected. Below is a snippet for my data access. Is this a bug?


   bool Cssneye::InitBuffer(int handle,double &buffer[],int bufferindex,int bufferstart,int buffersize){ 
      tries=0;
      while(CopyBuffer(handle,bufferindex,bufferstart,buffersize,buffer)<buffersize && ++tries<10){
         Sleep(1000);}
      if(tries>=10){Print(" Buffer copy failed, err # ",GetLastError());ResetLastError();}
      return(tries<10);}
 
Hello that is my alias :)...
Can I please have some response from metaquotes?
 
When do you get this error - during back testing or when EA works on a chart?

 
 
ssn:
when backtesting
I suggest you call function
Cssneye::InitBuffer()

into OnInit(), do you?


PS. Can you provide your source code? For example, through Private message?

MQL5.community - User Memo
  • 2010.02.25
  • MetaQuotes Software Corp.
  • www.mql5.com
You have just registered and most likely you have questions such as, "How do I insert a picture to my a message?" "How do I format my MQL5 source code?" "Where are my personal messages kept?" You may have many other questions. In this article, we have prepared some hands-on tips that will help you get accustomed in MQL5.community and take full advantage of its available features.
 
Hi Rosh,

am at work and away from my notebook so I cannot try what you are suggesting however initbuffer is used for loading a variety of indicators depending on the EA's input parameters... so calling it once oninit may not be feasible.

Additionally there are times I need to simply update a an array and this will also involve calling initbuffer at runtime...
 
Ok, I hope to receive source code from you when you can do it.