It seems a threading issue with your polling loop. All API objects must be created by the main thread or threads created by the main thread. Accessing API objects from other system threads such as Worker Thread, System Timer might produce undesirable result.