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
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.
Thanks Alan for offering your help.
(1) I was asked to reproduce the bug and I was never able to --- this is very particular to this user.
(2) after investigation by Microsoft engineer on site for several weeks, it was determined to be another vendor's software bug on .Net Framework 4.0
So the problem was resolved and it is not Infragistics problem.
Thank you for following up with what the resolution for you was.