[Solved] Events corrupts the result of the function
As FelixCastor suggested, I checked the thread in which the function I’m calling is running and did not run on the same thread. The change I made in the code was very small. I declared the dispatcher in the code section that I know will be executed by the main thread. public static Dispatcher dispatcher … Read more