Latest MT4 update 1421 has a very SERIOUS BUG!!! - page 2

 
Carl Emil Bograd #:

I did not.
Would I need to?

The issue is with MT4 build 1421, so I didn't think I would need to put the test.dll into the MQL5 library folder.
I did however, as stated put it into MQL4 library folder!

No, not need to copy into the MQL5

So, to make sure the <data> folder is correct, open it from the menu "Terminal -> File -> Open Data Folder"
Does the folder <data>\MQL4\Libraries contain test.dll?

 
Ilyas #:

No, not need to copy into the MQL5

So, to make sure the <data> folder is correct, open it from the menu "Terminal -> File -> Open Data Folder"

Right, yes.

I did that, double checked multiple times before posting, asking for help.

 
Try recompiled version, I change C++ runtime version from /MTd to /MT
Files:
test.zip  44 kb
 
Ilyas #:
Try recompiled version, I change C++ runtime version from /MTd to /MT

Now it'll allow me to import.

It returns a 1, instead of a 0 as before
 

Try this code please

#import "test.dll"
double fround(double x);
#import

#define PRN(expr) Print(#expr "=",expr);

void OnStart()
  {
   PRN(fround(1.23));
   PRN(MathRound(1.23));
   PRN(MathCeil(1.23));
   PRN(MathFloor(1.23));
  }
 
Ilyas #:

Try this code please


Seems like the MathRound is the problem.

 
Carl Emil Bograd #:


Seems like the MathRound is the problem.

OMG

I forget about optimizer!
If you see this, it means MQL compiler has the same behaviour!

To be sure in call function MathRound at runtime, run this

#import "test.dll"
double fround(double x);
#import

#define PRN(expr) Print(#expr "=",expr);

input double X=1.23;

void OnStart()
  {
   PRN(fround(X));
   PRN(MathRound(X));
   PRN(MathCeil(X));
   PRN(MathFloor(X));
  }
 
Ilyas #:

OMG

I forget about optimizer!
If you see this, it means MQL compiler has the same behaviour!

To be sure in call function MathRound at runtime, run this

The results of your most recent code.

 

I don't see nothing strange in the MT4 & MQL4 native codes.

What exactly CPU do you use?

 
Ilyas #:

I don't see nothing strange in the MT4 & MQL4 native codes.

What exactly CPU do you use?

It's from my VPS, it's the only place where the issue is happening.
As threadstarter (Or Mikkelsen?) mentioned, its a windows server-related issue, most likely.


Device name WIN-3IHC0SQ4OTL

Processor QEMU Virtual CPU version 2.5+   2.19 GHz  (2 processors)

Installed RAM 3.00 GB

Device ID C32165BC-6BFB-4B6B-B1DF-48F0497BCF8D

Product ID 00456-50302-20523-AA702

System type 64-bit operating system, x64-based processor

Pen and touch No pen or touch input is available for this display

Edition Windows Server 2022 Datacenter
Version 21H2
Installed on ‎11/‎25/‎2023
OS build 20348.2113