Intermittent Error Involving Dispatch

Intermittent Error Involving Dispatch

drobertsY4GL3
Enthusiast Enthusiast
358 Views
0 Replies
Message 1 of 1

Intermittent Error Involving Dispatch

drobertsY4GL3
Enthusiast
Enthusiast

All,

I have a C# plugin using a non-modal WPF window that sets the color of entities based on a status string member in a custom class. During UI testing, I will get the following intermittent error. (After about 50 or so uses of the plugin.) The debugger in this case is not useful for pinpointing the area in code when the exception occurs.

Is anyone familiar with the chain of events in the stack trace below who might be able to provide an educated guess as to what might be causing the problem?

System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
   at System.Windows.Threading.Dispatcher.VerifyAccess()
   at System.Windows.DependencyObject.GetValue(DependencyProperty dp)
   at Autodesk.Windows.RibbonControl.get_Dock()
   at Autodesk.AutoCAD.Ribbon.RibbonPaletteSet.AcadApplication_Idle(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at Autodesk.AutoCAD.ApplicationServices.Core.Application.raise_Idle(Object value0, EventArgs value1)
   at Autodesk.AutoCAD.ApplicationServices.Core.Application.OnIdle()



0 Likes
359 Views
0 Replies
Replies (0)