Why do I get different threading behaviors in WPF with Windows 7 with and without SP1?

104 Views Asked by At

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?

1

There are 1 best solutions below

0
On

Apparently I was using HookManager and not closing one before launching a second one... why that worked in the Virtual Machine and not on the Physical Machine is beyond me...