[Pidgin] #12440: perl Purple::timeout_add multiplites calls to given subroutine (using default plugin code from doxygen)
Pidgin
trac at pidgin.im
Thu Aug 5 11:38:51 EDT 2010
#12440: perl Purple::timeout_add multiplites calls to given subroutine (using
default plugin code from doxygen)
----------------------+-----------------------------------------------------
Reporter: marcelser | Type: defect
Status: new | Component: plugins
Version: 2.7.1 | Keywords: plugins bug
----------------------+-----------------------------------------------------
It seems like the "timeout_add" Function in the "Purple" perl library has
a bug. I used the "perl test plugin" from doxygen and added a timeout
(also the code-snippet from doxygen), the plugin does nothing else then
calling timeout_add each 5 seconds and printing a timeout message to the
debug log. But what happens is the following:
First time the timeout is reached the subroutine is called once (you see
one "Timeout reached" line in the debug log. Then you re-enable the
"timeout_add" function in the function itself.
Seconds time the timeout is reached the subroutine is called twice (two
log linges), re-enable again
Third time the timeout is reached the subroutine is called four times
(four log lines)
and so on...
The calls to the timeout function always duplicate themselves and at a
certain point pidgin hangs (especially if you decrease the timeout value
even more). I didn't find a solution to this problem, if you don't re-
enable the timeout nothing happens after timeout is reached (like the
documentation states its only called once), but if you re-enable it the
number of calls are duplicated on every timeout.
I've attached the "perl test plugin" from doxygen with the timeout code
snippet also from doxygen. Just enable the plugin and watch the debug log.
--
Ticket URL: <http://developer.pidgin.im/ticket/12440>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list