[wxPython-users] Re: wxTimer never times out sometimes

Josiah Carlson jcarlson at uci.edu
Thu Aug 17 14:07:48 PDT 2006


Jeffrey Barish <jeff_barish at earthlink.net> wrote:
[snip]
> Thanks for your comments.  You raise a good point, but there is only one
> thread.  I was thinking that the actions that result in calls to
> wxTimer.Start() happen asynchronously to the timer.  Accordingly, it could
> be possible that the timer is running code for dealing with actions the
> timer takes at the end of the timer period at the moment it receives the
> Start() call.  If so, perhaps it goes into a state in which it does not
> transmit the timer event and does not properly reset the timer.  The
> critical section would be the code that handles the timeout to be sure that
> the timer does everything that needs to be done before it responds to the
> new Start() call.  It's also possible that I am completely wrong, but I
> have no other theory for explaining why I never get a timer event
> sometimes.  I know that the timer was triggered because I display a static
> bitmap at the same time.  When the timer times out, the static bitmap
> should disappear and I should see a message indicating that I made it to
> the timer event handler.  Neither thing happens.  Also, it is not possible
> to trigger the timer again.

Have you tried .Stop() then .Start()?

 - Josiah





More information about the wxpython-users mailing list