Hello,
after upgrade to 19.1.6. version we encouter the exception "parameter is not valid" when bandedgrid is being painted.
It happens occasionally I cant reproduce.
But never happens with 18.2.
Exception is thrown at SkinImageColorizer.CalcLightness methods, as I can compare c# source code of 18.2 and 19.1 - > the CalcLightness method is new one.
Parametr není platný. ("parameter is not valid")
Exception Type:
System.ArgumentException
Source: System.Drawing
StackTrace:
v System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)
v DevExpress.Skins.SkinImageColorizer.CalcLightness(Image sourceImage)
v DevExpress.Skins.SkinImageColorizer.GetSmartColorizedImage(Image image, Color color)
v DevExpress.Skins.SkinImage.GetColoredImages(Image image)
v DevExpress.Skins.SkinImage.GetColoredImage(Image image)
v DevExpress.Utils.Text.ContrastColor.CalcDefaultForeColor(Color foreColor)
v DevExpress.Utils.Drawing.HeaderObjectPainter.DrawObject(ObjectInfoArgs e)
v DevExpress.Utils.Drawing.UltraFlatHeaderObjectPainter.DrawObject(ObjectInfoArgs e)
v DevExpress.XtraGrid.Views.BandedGrid.Drawing.BandedGridPainter.<>c__DisplayClass10_0.<DrawBandCore>b__0()
v DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs.DefaultDraw()
v DevExpress.XtraGrid.Views.BandedGrid.Drawing.BandedGridPainter.DrawBandCore(BandedGridViewDrawArgs e, GridBandInfoArgs bi)
v DevExpress.XtraGrid.Views.BandedGrid.Drawing.BandedGridPainter.DrawBand(BandedGridViewDrawArgs e, GridBandInfoArgs bi)
v DevExpress.XtraGrid.Views.BandedGrid.Drawing.BandedGridPainter.DrawBandPanel(BandedGridViewDrawArgs e)
v DevExpress.XtraGrid.Views.BandedGrid.Drawing.BandedGridPainter.DrawColumnPanel(GridViewDrawArgs e)
v DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.DrawContentsCore(GridViewDrawArgs e)
v DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.DrawCore(GridViewDrawArgs e)
v DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.Draw(ViewDrawArgs ee)
v DevExpress.XtraGrid.Views.Base.BaseView.Draw(GraphicsCache e)
v DevExpress.XtraGrid.Views.Grid.GridView.Draw(GraphicsCache e)
v DevExpress.XtraGrid.GridControl.OnPaintCore(PaintEventArgs e)
v DevExpress.Utils.Drawing.ControlPaintHelper.PaintWithErrorHandling(PaintEventArgs paintEventArgs, Int32 layer)
v DevExpress.Utils.Drawing.ControlPaintHelper.ProcessWMPaintCore(Boolean beginPaint, IntPtr hdc, Rectangle rectangle, Rectangle[] clipBounds)
v DevExpress.Utils.Drawing.ControlPaintHelper.ProcessWMPaint(Message& m)
v DevExpress.XtraGrid.GridControl.CheckProcessMsg(Message& m)
v DevExpress.XtraGrid.GridControl.WndProc(Message& m)
v System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
TargetSite:
Void .ctor(Int32, Int32, System.Drawing.Imaging.PixelFormat)
Hi Stanislav,
I couldn't reproduce this behavior. Nevertheless, we have found a possible reason why this exception is thrown and are planning to fix the issue. Please test the hotfix when it is ready.
I look forward to your results.
We will test, can I ask download hotfix?
I've requested this hotfix for you. We usually deliver a hotfix within a week after it is requested.