Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
95
Possible Threading bug
posted

Hi,

On a user machine (multi-core, 3-monitors, various app + our custom app), I frequently got the following error wit stack trace indicating Infragistic "UltraToolbarsDockAreaget"  involved:

Error Message: Object is currently in use elsewhere.

Stack Trace:
   at System.Drawing.Image.get_RawFormat()
   at System.Drawing.Graphics.IgnoreMetafileErrors(Image image, Int32& errorStatus)
   at System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y)
   at System.Drawing.Graphics.DrawImageUnscaled(Image image, Point point)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.OnPaint(PaintEventArgs pe)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Does this looks like a threading bug ? If yes, where do I start in my code to lock thread or Infragistic need to fix code tor UltraToolbar for multi-core ?
Any other suggestion would be appreciated as well.

 

Thanks

James

Parents
  • 22852
    Offline posted

    James,

    Windows forms controls aren't thread safe so if you are using threading any updates to the controls or what they are bound to needs to be done on the UI thread.  You can see more details on this in the thread safety section of the Control class on MSDN.

    If you aren't doing any threading, please provide me with a sample that reproduces the issue and I will look into this further to see if there is an issue in the Infragistics code.

    Let me know if you have any questions with this matter.

     

Reply Children