0

I attached one delegate to Dispatcher timer Tick event which runs in every 500 ms its Working fine on my computer but when I run same application on another computer it's start for first time but never gets a hit on tick event again. it's just running for one time only. I want know is it possible if I have some exception in my delegate can it cause timer to misbehave? How can I solve this problem?

This Timer runs throughout the lifecyle of application and stop only when application is stoped.

        tmr = new DispatcherTimer();
        tmr.Interval = TimeSpan.FromMilliseconds(500);
        tmr.Tick += delegate
        {
            FaceRecognizer_Advanced.GetInstance.GetFacesFromImage();
        };
        tmr.Start();          

I expect this timer should get hit the way it suppose to be.

  • " but when I run same application on another computer " what are the differences between the 2 computers? – Mong Zhu Jul 26 '19 at 06:36
  • Do you have same logger to get sure it is not called? Maybe it is called but it fails with exception / does nothing. – pwas Jul 26 '19 at 06:38
  • 1
    @MongZhu The second computer have bigger specifications. it was working fine before, it's just started misbehaving, when I run previous exe it runs fine. and whatever change we made are not even near that code. – Mansur Patel Jul 26 '19 at 07:37
  • @pwas Yes I am using a logger which update after every step or execption. – Mansur Patel Jul 26 '19 at 07:39

0 Answers0