I have this multi-threaded WPF application and two different machines where I am testing it.
The first is a Windows 7 Professional, SP1 virtual machine on a VMware client. The second is a Win 7 Professional physical machine. No SP1.
On the first machine, the application runs normally, on the second machine the application outputs an AccessViolation exception when calling:
App.Current.Dispatcher.Invoke(() => { do stuff });
from a thread created in the following manner:
ThreadPool.QueueUserWorkItem( /* callback that calls the dispatcher */ );
Can you tell me why this is having a different behavior if the .Net framework version is the same? Is it because of the Service Pack? How can I solve this?