[BUG] MT5 Build 5440 (21 Nov 2025): Critical GUI Rendering Issue in Custom MQL Applications - page 3

 
Andrey Barinov #:

Can you please, try this one

Still no issue on my side.

Maybe something on your chart settings ? Send me a template from it.

 

Yes, got it. It depends of the chart settings.


 
Alain Verleyen #:

Yes, got it. It depends of the chart settings.


What kind of settings?

Here is my template, but I have the same issue on all default color schemes...

P.S. Color On White scheme also works fine on my side...
Files:
clean.tpl  3 kb
 
Andrey Barinov #:

What kind of settings?

Here is my template, but I have the same issue on all default color schemes...

Reproduced using this :


 
Alain Verleyen #:

Reproduce using this :


yeah, Color On White works fine, the other schemes not... Thanks for helping narrowing it down!

schemes

 

Here is all together summorized.

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
#property strict
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int OnInit(void)
   {
   ::EventSetTimer(1);
   
//===============
   const string canvasname   = "testcanvas";
   const string resoursename = "::"+canvasname+".bmp";
   const uint width          = 500;
   const uint height         = 500;
   const uchar alfa          = 0;
   const uint clr            = ::ColorToARGB(clrWhite,alfa);
//===============

//===============
   uint canvasdata[];
   ::ArrayResize(canvasdata,width*height,0);
   ::ArrayInitialize(canvasdata,clr);
//===============

//===============
   ::ResourceCreate(resoursename,canvasdata,width,height,0,0,width,COLOR_FORMAT_ARGB_RAW);
//===============

//===============
   ::ObjectCreate(0,canvasname,OBJ_BITMAP_LABEL,0,0,0);
//===============

//===============
   ::ObjectSetInteger(0,canvasname,OBJPROP_ZORDER,0);
   ::ObjectSetInteger(0,canvasname,OBJPROP_BACK,false);
   ::ObjectSetInteger(0,canvasname,OBJPROP_CORNER,CORNER_LEFT_UPPER);
   ::ObjectSetInteger(0,canvasname,OBJPROP_SELECTABLE,true);
   ::ObjectSetInteger(0,canvasname,OBJPROP_SELECTED,true);
   ::ObjectSetInteger(0,canvasname,OBJPROP_STATE,false);
   ::ObjectSetInteger(0,canvasname,OBJPROP_HIDDEN,true);
   ::ObjectSetString(0,canvasname,OBJPROP_TOOLTIP,NULL);
   ::ObjectSetInteger(0,canvasname,OBJPROP_XDISTANCE,100);
   ::ObjectSetInteger(0,canvasname,OBJPROP_YDISTANCE,100);
   ::ObjectSetInteger(0,canvasname,OBJPROP_ANCHOR,ANCHOR_LEFT_UPPER);
   ::ObjectSetString(0,canvasname,OBJPROP_BMPFILE,0,resoursename);
   ::ObjectSetString(0,canvasname,OBJPROP_BMPFILE,1,resoursename);
//===============

//===============
   ::ObjectSetInteger(0,canvasname,OBJPROP_XSIZE,width);
   ::ObjectSetInteger(0,canvasname,OBJPROP_YSIZE,height);
//===============

//===============
   ::ChartRedraw(0);
//===============

   return(INIT_SUCCEEDED);
   }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnTimer(void)
   {
   ::ChartRedraw(0);
   }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+


Behaviour in b5430. ALL CORRECT, as expected. Absolutely transparent canvas.

5430


build 5463. Correct only in color scheme Color on White. All other color schemes are wrong...

5463

 

Build 5464 is so bad it's pretty much unusable. This Blend2D attempt is causing so many problems!  Just leave the old proven GDI and move on.

I found more than 20 new bugs with the graphics and the platform UI.  Everything looks broken.  Objects, texts, fonts everything is incorrect or looking worse compared to b5430 and the platform freezes in some situations. For example very slow rendering of canvas text.  Rectangles with incorrect colors. Rectangle Labels with incorrect sizes. Trend Lines becoming invisible in some situations.  The fonts problem is still not solved. Boxy characters still appear on the button objects

But what is the point of reporting the new bugs if the they are not getting fixed?  The old one are still there.  We even found bugs reported many years ago and they are still there in the latest builds.  Nobody cares....

 
Tsvetan Tsvetanov #:

Build 5464 is so bad it's pretty much unusable. This Blend2D attempt is causing so many problems!  Just leave the old proven GDI and move on.

I found more than 20 new bugs with the graphics and the platform UI.  Everything looks broken.  Objects, texts, fonts everything is incorrect or looking worse compared to b5430 and the platform freezes in some situations. For example very slow rendering of canvas text.  Rectangles with incorrect colors. Rectangle Labels with incorrect sizes. Trend Lines becoming invisible in some situations.  The fonts problem is still not solved. Boxy characters still appear on the button objects

But what is the point of reporting the new bugs if the they are not getting fixed?  The old one are still there.  We even found bugs reported many years ago and they are still there in the latest builds.  Nobody cares....

You should not use a beta build then. Last official build is 5430.

Bugs are being fixed...when they are correctly reported.

 
Alain Verleyen #:

You should not use a beta build then. Last official build is 5430.

Bugs are being fixed...when they are correctly reported.

I'm on b5430.  But I also keep an eye on the beta builds.  Just trying to help.

Here you see the new bugs with OBJ_BUTTON and OBJ_RECTANGLE_LABEL.

bugs obj button obj rectangle label

//+------------------------------------------------------------------+
//|                                                         Bugs.mq5 |
//|                                  Copyright 2025, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2025, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"

string objid="bug";
string objname;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   EventSetMillisecondTimer(1000);

   objname=objid+"OBJ_BUTTON_1";
   ObjectCreate(0,objname,OBJ_BUTTON,0,0,0);
   ObjectSetInteger(0,objname,OBJPROP_BACK,false);
   ObjectSetInteger(0,objname,OBJPROP_HIDDEN,false);
   ObjectSetInteger(0,objname,OBJPROP_CORNER,CORNER_LEFT_UPPER);
   ObjectSetInteger(0,objname,OBJPROP_STATE,false);
   ObjectSetInteger(0,objname,OBJPROP_COLOR,clrBlack);
   ObjectSetInteger(0,objname,OBJPROP_BGCOLOR,clrSilver);
   ObjectSetInteger(0,objname,OBJPROP_BORDER_COLOR,clrGray);
   ObjectSetInteger(0,objname,OBJPROP_XDISTANCE,100);
   ObjectSetInteger(0,objname,OBJPROP_YDISTANCE,100);
   ObjectSetInteger(0,objname,OBJPROP_XSIZE,200);
   ObjectSetInteger(0,objname,OBJPROP_YSIZE,50);
   ObjectSetInteger(0,objname,OBJPROP_FONTSIZE,40);
   ObjectSetInteger(0,objname,OBJPROP_ZORDER,1);
   ObjectSetString(0,objname,OBJPROP_FONT,"Webdings");
   ObjectSetString(0,objname,OBJPROP_TEXT,"~");

   objname=objid+"OBJ_BUTTON_2";
   ObjectCreate(0,objname,OBJ_BUTTON,0,0,0);
   ObjectSetInteger(0,objname,OBJPROP_BACK,false);
   ObjectSetInteger(0,objname,OBJPROP_HIDDEN,false);
   ObjectSetInteger(0,objname,OBJPROP_CORNER,CORNER_LEFT_UPPER);
   ObjectSetInteger(0,objname,OBJPROP_STATE,false);
   ObjectSetInteger(0,objname,OBJPROP_COLOR,clrBlack);
   ObjectSetInteger(0,objname,OBJPROP_BGCOLOR,clrSilver);
   ObjectSetInteger(0,objname,OBJPROP_BORDER_COLOR,clrGray);
   ObjectSetInteger(0,objname,OBJPROP_XDISTANCE,100);
   ObjectSetInteger(0,objname,OBJPROP_YDISTANCE,150);
   ObjectSetInteger(0,objname,OBJPROP_XSIZE,200);
   ObjectSetInteger(0,objname,OBJPROP_YSIZE,50);
   ObjectSetInteger(0,objname,OBJPROP_FONTSIZE,40);
   ObjectSetString(0,objname,OBJPROP_FONT,"Webdings");
   ObjectSetString(0,objname,OBJPROP_TEXT,"5");

   objname=objid+"OBJ_BUTTON_3";
   ObjectCreate(0,objname,OBJ_BUTTON,0,0,0);
   ObjectSetInteger(0,objname,OBJPROP_BACK,false);
   ObjectSetInteger(0,objname,OBJPROP_HIDDEN,false);
   ObjectSetInteger(0,objname,OBJPROP_CORNER,CORNER_LEFT_UPPER);
   ObjectSetInteger(0,objname,OBJPROP_STATE,false);
   ObjectSetInteger(0,objname,OBJPROP_COLOR,clrBlack);
   ObjectSetInteger(0,objname,OBJPROP_BGCOLOR,clrSilver);
   ObjectSetInteger(0,objname,OBJPROP_BORDER_COLOR,clrGray);
   ObjectSetInteger(0,objname,OBJPROP_XDISTANCE,100);
   ObjectSetInteger(0,objname,OBJPROP_YDISTANCE,200);
   ObjectSetInteger(0,objname,OBJPROP_XSIZE,200);
   ObjectSetInteger(0,objname,OBJPROP_YSIZE,50);
   ObjectSetInteger(0,objname,OBJPROP_FONTSIZE,40);
   ObjectSetString(0,objname,OBJPROP_FONT,"Webdings");
   ObjectSetString(0,objname,OBJPROP_TEXT,"6");

   objname=objid+"OBJ_RECTANGLE_LABEL_1";
   ObjectCreate(0,objname,OBJ_RECTANGLE_LABEL,0,0,0);
   ObjectSetInteger(0,objname,OBJPROP_BACK,false);
   ObjectSetInteger(0,objname,OBJPROP_HIDDEN,false);
   ObjectSetInteger(0,objname,OBJPROP_CORNER,CORNER_LEFT_UPPER);
   ObjectSetInteger(0,objname,OBJPROP_COLOR,clrGray);
   ObjectSetInteger(0,objname,OBJPROP_BGCOLOR,clrSilver);
   ObjectSetInteger(0,objname,OBJPROP_BORDER_TYPE,BORDER_FLAT);
   ObjectSetInteger(0,objname,OBJPROP_XDISTANCE,100);
   ObjectSetInteger(0,objname,OBJPROP_YDISTANCE,250);
   ObjectSetInteger(0,objname,OBJPROP_XSIZE,200);
   ObjectSetInteger(0,objname,OBJPROP_YSIZE,50);

   ChartRedraw();

   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   EventKillTimer();
   ObjectsDeleteAll(0,objid);
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {

  }
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {

  }
//+------------------------------------------------------------------+
 

Another bug (build 5464) - the color of OBJ_RECTANGLE is also incorrectly affected by CHART_COLOR_BACKGROUND.

Compare the code example in build 5430 and 5464.

//+------------------------------------------------------------------+
//|                                                         Bugs.mq5 |
//|                                  Copyright 2025, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2025, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"

int timer=0;
string objid="bug ";
string objname;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   EventSetMillisecondTimer(1000);

   datetime time0=iTime(Symbol(),PERIOD_CURRENT,0);
   datetime time1=iTime(Symbol(),PERIOD_CURRENT,100);
   double price0=SymbolInfoDouble(Symbol(),SYMBOL_BID);
   double price1=price0+price0*0.002;

   objname=objid+"OBJ_RECTANGLE_1";
   ObjectCreate(0,objname,OBJ_RECTANGLE,0,0,0);
   ObjectSetInteger(0,objname,OBJPROP_BACK,true);
   ObjectSetInteger(0,objname,OBJPROP_HIDDEN,false);
   ObjectSetInteger(0,objname,OBJPROP_SELECTABLE,true);
   ObjectSetInteger(0,objname,OBJPROP_FILL,true);
   ObjectSetInteger(0,objname,OBJPROP_COLOR,clrBlue);
   ObjectSetInteger(0,objname,OBJPROP_TIME,0,time0);
   ObjectSetInteger(0,objname,OBJPROP_TIME,1,time1);
   ObjectSetDouble(0,objname,OBJPROP_PRICE,0,price0);
   ObjectSetDouble(0,objname,OBJPROP_PRICE,1,price1);

   ChartRedraw();

   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   EventKillTimer();
   ObjectsDeleteAll(0,objid);
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {

  }
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {
   timer++;

   if(timer==1)
     {
      ChartSetInteger(0,CHART_COLOR_BACKGROUND,clrWhite);
      ChartRedraw();
     }

   if(timer==2)
     {
      ChartSetInteger(0,CHART_COLOR_BACKGROUND,clrSilver);
      ChartRedraw();
     }

   if(timer==3)
     {
      timer=0;
      ChartSetInteger(0,CHART_COLOR_BACKGROUND,clrGray);
      ChartRedraw();
     }
  }
//+------------------------------------------------------------------+