A simple WinForms application crashes on start when JustMock(2019.1.115.2) profiler is enabled.
Steps to reproduce:
1. Create a new WinForms Application.
2. Start the application. In Debug it is most visible.
3. After the application is started move the mouse in the middle of the application. The exact location is not important.
4. A
FieldAccessExceptionis is thrown.
System.FieldAccessException: Attempt by method 'System.Windows.Forms.SafeNativeMethods._TrackMouseEvent(TRACKMOUSEEVENT)' to access field 'System.AccessibilityImprovements.useLegacyAccessibilityFeatures' failed.
at System.Windows.Forms.SafeNativeMethods._TrackMouseEvent(TRACKMOUSEEVENT tme)
at System.Windows.Forms.SafeNativeMethods.TrackMouseEvent(TRACKMOUSEEVENT tme)
at System.Windows.Forms.Control.HookMouseEvent()
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Temporary workaround: disable the JustMock Profiler from the JustMock menu while developing the application and enable it while running the tests.
A fix can be expected with the next official release. You can follow this item in order to receive status updates.