We have a chat client written in C# that occasionally throws the following
exceptions for our users (typically after prolonged use)...
ArgumentExcepti on: Invalid parameter used.
at System.Drawing. Graphics.GetHdc ()
at System.Windows. Forms.ImageList .GetBitmap(Int3 2 index)
at System.Windows. Forms.ImageColl ection.get_Item (Int32 index)
at System.Windows. Forms.Label.get _Image()
at System.Windows. Forms.Label.OnP aint(PaintEvent Args e)
at System.Windows. Forms.Control.P aintWithErrorHa ndling(PaintEve ntArgs e,
Int16 layer, Boolean disposeEventArg s)
at System.Windows. Forms.Control.W mPaint(Message& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Label.Wnd Proc(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)
This is occurring under 1.1.4322.573 of the .NET Framework. The GUI does
use a ListView that uses icons from an ImageList. We believe the ImageIndex
values are always within range when accessing the ImageList.
Are there known issues that can cause this exception?
exceptions for our users (typically after prolonged use)...
ArgumentExcepti on: Invalid parameter used.
at System.Drawing. Graphics.GetHdc ()
at System.Windows. Forms.ImageList .GetBitmap(Int3 2 index)
at System.Windows. Forms.ImageColl ection.get_Item (Int32 index)
at System.Windows. Forms.Label.get _Image()
at System.Windows. Forms.Label.OnP aint(PaintEvent Args e)
at System.Windows. Forms.Control.P aintWithErrorHa ndling(PaintEve ntArgs e,
Int16 layer, Boolean disposeEventArg s)
at System.Windows. Forms.Control.W mPaint(Message& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Label.Wnd Proc(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)
This is occurring under 1.1.4322.573 of the .NET Framework. The GUI does
use a ListView that uses icons from an ImageList. We believe the ImageIndex
values are always within range when accessing the ImageList.
Are there known issues that can cause this exception?