Invalid EX5 file - just like that - page 2

 
Alain Verleyen: I would suggest you to have 2 completely separate installation one using the last stable release, and 1 for beta (and I consider official new release less than 1 month still a beta).

I do that also. In fact I make a new instance folder for every new build, so that I can compare things when they start to act differently between builds.

 

Hey,


in the meanwhile I tried everything suggested, without success. I been sending also the executables to the support service and received the answer that it will be fixed with the next update.

 

Hi guys,

I just got the same strange terminal error "invalid EX5 file (4)" when I tried to attach a freshly compiled EA to the chart.

When I searched for this error I found this thread but this was not very helpful.

Fortunatly I have found the "root cause" for this issue. In my case it was this chunck of code:

      double duration_sec = (double)(TimeCurrent() - m_position.Time());
//      Print("duration_sec:"+DoubleToString(duration_sec)+" calc:" + DoubleToString(duration_sec/3600));
      double duration_min = duration_sec/60;
      double duration_hrs = duration_min/60;
      double duration_day = duration_hrs/24;
      string duration;

      if (duration_sec < 60) {
         duration = DoubleToString(duration_sec, 0)+" seconds";
      } else if (duration_min < 60) {
         duration = DoubleToString(duration_min, 1)+" minutes";
      } else if (duration_hrs < 24) {
         duration = DoubleToString(duration_hrs, 1)+" hours";
      } else {
         duration = DoubleToString(duration_day, 1)+" days";
      }

The compiler is absolutely happy with the code above but the resulting EX5 file is corrupted. I lost a lot of time debugging and was very surprised that my EA worked after I inserted the Print-statement in the second line.

At the moment I have no explanation about the real root cause. Maybe we can figure this out together and solve the quest...?!

Regards

Update: I am using build 1730 (21.Dec 2017)
 
Ivan Petkow:

Hi guys,

The compiler is absolutely happy with the code above 

It can't be happy with that code above.

Reason: