Discussion:
[Interest] QTimer stops triggering
Vannoote, Frederik
2012-06-04 07:04:44 UTC
Permalink
Hey all,







I'm having a weird thing about Qtimer which I can't explain until now.

We are using a dedicated application to kick the processor watchdog.
This application is based on a QTimer. Basically, it only has to call an
ioctl once every 30 seconds. This is the only thing the application
does.



We see that after a random time, the QTimer stops triggering. We have
proven that it does not get stuck somewhere, it just does not get
scheduled any more.

I've replaced the code with a while loop instead of the QT event loop.
That seems to be running fine.





Can anyone help me explain how this is possible?







Thanks,

Frederik



Frederik Vannoote

Sr. Development Engineer Software



Barco nv

Pres.Kennedypark 35

B-8500 Kortrijk (Belgium)





DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.
Syam Krishnan
2012-06-04 14:04:09 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 06/04/2012 12:34 PM, Vannoote, Frederik wrote:
<blockquote
cite="mid:***@kndmex01.barco.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 11 (filtered
medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:Verdana;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
{page:Section1;}
-->
</style>
<div class="Section1">
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial">Hey all,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">I&#8217;m having a weird
thing about Qtimer which I
can&#8217;t explain until now.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">We are using a
dedicated application to kick the
processor watchdog. This application is based on a QTimer.
Basically, it only
has to call an ioctl once every 30 seconds. This is the
only thing the application
does.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial" lang="EN-GB">We see that after a
random time, the QTimer stops
triggering. We have proven that it does not get stuck
somewhere, it just does
not get scheduled any more.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-GB">I&#8217;ve
replaced the code with a while loop
instead of the QT event loop. That seems to be running
fine.</span></font></p>
</div>
</blockquote>
<br>
Do you mean to say that you have set the QTimer to have a time-out
of 30 seconds?<br>
And what is the order of time after which the timer seems to stop
working - minutes, hours?<br>
<br>
Also, (a wild shot) are you by any chance creating the timer objects
afresh everytime?<br>
<br>
Syam<br>
</body>
</html>
Vannoote, Frederik
2012-06-04 14:06:47 UTC
Permalink
Hi Syam,







The Qtimer object is only created once and lives on for ever.

It has an interval of 30 seconds.



Most of the times they stop triggering after 1 or 2 days.









Kind regards,

Frederik



Frederik Vannoote

Sr. Development Engineer Software



Barco nv

Pres.Kennedypark 35

B-8500 Kortrijk (Belgium)



________________________________

From: interest-bounces+frederik.vannoote=***@qt-project.org
[mailto:interest-bounces+frederik.vannoote=***@qt-project.org] On
Behalf Of Syam Krishnan
Sent: 04jun12 16:04
To: ***@qt-project.org
Subject: Re: [Interest] QTimer stops triggering



On 06/04/2012 12:34 PM, Vannoote, Frederik wrote:

Hey all,







I'm having a weird thing about Qtimer which I can't explain until now.

We are using a dedicated application to kick the processor watchdog.
This application is based on a QTimer. Basically, it only has to call an
ioctl once every 30 seconds. This is the only thing the application
does.



We see that after a random time, the QTimer stops triggering. We have
proven that it does not get stuck somewhere, it just does not get
scheduled any more.

I've replaced the code with a while loop instead of the QT event loop.
That seems to be running fine.


Do you mean to say that you have set the QTimer to have a time-out of 30
seconds?
And what is the order of time after which the timer seems to stop
working - minutes, hours?

Also, (a wild shot) are you by any chance creating the timer objects
afresh everytime?

Syam



DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.
Pritam
2012-06-04 14:19:17 UTC
Permalink
Post by Vannoote, Frederik
Hi Syam,
The Qtimer object is only created once and lives on for ever.
It has an interval of 30 seconds.
Most of the times they stop triggering after 1 or 2 days.
I dont know what timer API is used by Qt. If its posix timers
underneath, Can you try a simple app with posix timers and see if they
also misbehave.
That way, we will know whether its a platform problem or qt problem.
Post by Vannoote, Frederik
Kind regards,
Frederik
Frederik Vannoote
Sr. Development Engineer Software
Barco nv
Pres.Kennedypark 35
B-8500 Kortrijk (Belgium)
------------------------------------------------------------------------
*On Behalf Of *Syam Krishnan
*Sent:* 04jun12 16:04
*Subject:* Re: [Interest] QTimer stops triggering
Hey all,
I’m having a weird thing about Qtimer which I can’t explain until now.
We are using a dedicated application to kick the processor watchdog.
This application is based on a QTimer. Basically, it only has to call
an ioctl once every 30 seconds. This is the only thing the application
does.
We see that after a random time, the QTimer stops triggering. We have
proven that it does not get stuck somewhere, it just does not get
scheduled any more.
I’ve replaced the code with a while loop instead of the QT event loop.
That seems to be running fine.
Do you mean to say that you have set the QTimer to have a time-out of
30 seconds?
And what is the order of time after which the timer seems to stop
working - minutes, hours?
Also, (a wild shot) are you by any chance creating the timer objects
afresh everytime?
Syam
Unless indicated otherwise, the information contained in this message
is privileged and confidential, and is intended only for the use of
the addressee(s) named above and others who have been specifically
authorized to receive it. If you are not the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this message and/or attachments is strictly prohibited. The company
accepts no liability for any damage caused by any virus transmitted by
this email. Furthermore, the company does not warrant a proper and
complete transmission of this information, nor does it accept
liability for any delays. If you have received this message in error,
please contact the sender and delete the message. Thank you.
--
Regards,
Pritam


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
André Somers
2012-06-04 14:25:34 UTC
Permalink
Post by Pritam
Post by Vannoote, Frederik
Hi Syam,
The Qtimer object is only created once and lives on for ever.
It has an interval of 30 seconds.
Most of the times they stop triggering after 1 or 2 days.
I dont know what timer API is used by Qt. If its posix timers
underneath, Can you try a simple app with posix timers and see if they
also misbehave.
That way, we will know whether its a platform problem or qt problem.
Seems to me that no matter what technology Qt uses under the hood, it is
always a Qt problem. Qt does not advertise any limitations on this
front, so it should not suffer any. If the platform does not support the
functionality directly, it is up to Qt to work around that IMHO.

André
Post by Pritam
Post by Vannoote, Frederik
Kind regards,
Frederik
Frederik Vannoote
Sr. Development Engineer Software
Barco nv
Pres.Kennedypark 35
B-8500 Kortrijk (Belgium)
------------------------------------------------------------------------
*On Behalf Of *Syam Krishnan
*Sent:* 04jun12 16:04
*Subject:* Re: [Interest] QTimer stops triggering
Hey all,
I'm having a weird thing about Qtimer which I can't explain until now.
We are using a dedicated application to kick the processor watchdog.
This application is based on a QTimer. Basically, it only has to call
an ioctl once every 30 seconds. This is the only thing the
application does.
We see that after a random time, the QTimer stops triggering. We have
proven that it does not get stuck somewhere, it just does not get
scheduled any more.
I've replaced the code with a while loop instead of the QT event
loop. That seems to be running fine.
Do you mean to say that you have set the QTimer to have a time-out of
30 seconds?
And what is the order of time after which the timer seems to stop
working - minutes, hours?
Also, (a wild shot) are you by any chance creating the timer objects
afresh everytime?
Syam
Unless indicated otherwise, the information contained in this message
is privileged and confidential, and is intended only for the use of
the addressee(s) named above and others who have been specifically
authorized to receive it. If you are not the intended recipient, you
are hereby notified that any dissemination, distribution or copying
of this message and/or attachments is strictly prohibited. The
company accepts no liability for any damage caused by any virus
transmitted by this email. Furthermore, the company does not warrant
a proper and complete transmission of this information, nor does it
accept liability for any delays. If you have received this message in
error, please contact the sender and delete the message. Thank you.
--
Regards,
Pritam
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
Atlant Schmidt
2012-06-05 11:04:29 UTC
Permalink
Post by André Somers
I don't know what timer API is used by Qt. If it's Posix timers underneath,
can you try a simple app with Posix timers and see if they also misbehave.
That way, we will know whether it's a platform problem or qt problem.
Seems to me that no matter what technology Qt uses under the hood, it is
always a Qt problem. Qt does not advertise any limitations on this front,
so it should not suffer any. If the platform does not support the functionality
directly, it is up to Qt to work around that IMHO.
Absolutely true.

But still, it would be valuable to know whether one needs to design a
work-around to a platform problem or just fix a Qt bug.

Atlant


From: interest-bounces+aschmidt=***@qt-project.org [mailto:interest-bounces+aschmidt=***@qt-project.org] On Behalf Of André Somers
Sent: Monday, June 04, 2012 10:26
To: ***@qt-project.org
Subject: Re: [Interest] QTimer stops triggering

Op 4-6-2012 16:19, Pritam schreef:
On Monday 04 June 2012 07:36 PM, Vannoote, Frederik wrote:
Hi Syam,



The Qtimer object is only created once and lives on for ever.
It has an interval of 30 seconds.

Most of the times they stop triggering after 1 or 2 days.


I dont know what timer API is used by Qt. If its posix timers underneath, Can you try a simple app with posix timers and see if they also misbehave.
That way, we will know whether its a platform problem or qt problem.
Seems to me that no matter what technology Qt uses under the hood, it is always a Qt problem. Qt does not advertise any limitations on this front, so it should not suffer any. If the platform does not support the functionality directly, it is up to Qt to work around that IMHO.

André




Kind regards,
Frederik


Frederik Vannoote

Sr. Development Engineer Software



Barco nv

Pres.Kennedypark 35

B-8500 Kortrijk (Belgium)

________________________________
From: interest-bounces+frederik.vannoote=***@qt-project.org<mailto:interest-bounces+frederik.vannoote=***@qt-project.org> [mailto:interest-bounces+frederik.vannoote=***@qt-project.org] On Behalf Of Syam Krishnan
Sent: 04jun12 16:04
To: ***@qt-project.org<mailto:***@qt-project.org>
Subject: Re: [Interest] QTimer stops triggering

On 06/04/2012 12:34 PM, Vannoote, Frederik wrote:
Hey all,



I'm having a weird thing about Qtimer which I can't explain until now.
We are using a dedicated application to kick the processor watchdog. This application is based on a QTimer. Basically, it only has to call an ioctl once every 30 seconds. This is the only thing the application does.

We see that after a random time, the QTimer stops triggering. We have proven that it does not get stuck somewhere, it just does not get scheduled any more.
I've replaced the code with a while loop instead of the QT event loop. That seems to be running fine.

Do you mean to say that you have set the QTimer to have a time-out of 30 seconds?
And what is the order of time after which the timer seems to stop working - minutes, hours?

Also, (a wild shot) are you by any chance creating the timer objects afresh everytime?

Syam

DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.




--

Regards,

Pritam

**************** CAUTION - Disclaimer *****************

This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely

for the use of the addressee(s). If you are not the intended recipient, please

notify the sender by e-mail and delete the original message. Further, you are not

to copy, disclose, or distribute this e-mail or its contents to any other person and

any such actions are unlawful. This e-mail may contain viruses. Infosys has taken

every reasonable precaution to minimize this risk, but is not liable for any damage

you may sustain as a result of any virus in this e-mail. You should carry out your

own virus checks before opening the e-mail or attachment. Infosys reserves the

right to monitor and review the content of all messages sent to or from this e-mail

address. Messages sent to or from this e-mail address may be stored on the

Infosys e-mail system.

***INFOSYS******** End of Disclaimer ********INFOSYS***





_______________________________________________

Interest mailing list

***@qt-project.org<mailto:***@qt-project.org>

http://lists.qt-project.org/mailman/listinfo/interest



Click here<https://www.mailcontrol.com/sr/VVkTl+FUyrjTndxI!oX7Us7Qlo!t9IHtW+9TjXILuKbcQlEenDkMNQf+Ix9WPNjNE277h01lFrrFX!XDabuzkg==> to report this email as spam.

________________________________
This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.
Pritam
2012-06-05 11:10:03 UTC
Permalink
Post by André Somers
Post by Pritam
Post by Vannoote, Frederik
Hi Syam,
The Qtimer object is only created once and lives on for ever.
It has an interval of 30 seconds.
Most of the times they stop triggering after 1 or 2 days.
I dont know what timer API is used by Qt. If its posix timers
underneath, Can you try a simple app with posix timers and see if
they also misbehave.
That way, we will know whether its a platform problem or qt problem.
Seems to me that no matter what technology Qt uses under the hood, it
is always a Qt problem. Qt does not advertise any limitations on this
front, so it should not suffer any. If the platform does not support
the functionality directly, it is up to Qt to work around that IMHO.
I was just trying to rule out the possibility of a platform bugs. May be
your platform vendor has not done a good job at creating/porting
platform software on the
hardware that you use.
Post by André Somers
André
Post by Pritam
Post by Vannoote, Frederik
Kind regards,
Frederik
Frederik Vannoote
Sr. Development Engineer Software
Barco nv
Pres.Kennedypark 35
B-8500 Kortrijk (Belgium)
------------------------------------------------------------------------
*On Behalf Of *Syam Krishnan
*Sent:* 04jun12 16:04
*Subject:* Re: [Interest] QTimer stops triggering
Hey all,
I’m having a weird thing about Qtimer which I can’t explain until now.
We are using a dedicated application to kick the processor watchdog.
This application is based on a QTimer. Basically, it only has to
call an ioctl once every 30 seconds. This is the only thing the
application does.
We see that after a random time, the QTimer stops triggering. We
have proven that it does not get stuck somewhere, it just does not
get scheduled any more.
I’ve replaced the code with a while loop instead of the QT event
loop. That seems to be running fine.
Do you mean to say that you have set the QTimer to have a time-out
of 30 seconds?
And what is the order of time after which the timer seems to stop
working - minutes, hours?
Also, (a wild shot) are you by any chance creating the timer objects
afresh everytime?
Syam
Unless indicated otherwise, the information contained in this
message is privileged and confidential, and is intended only for the
use of the addressee(s) named above and others who have been
specifically authorized to receive it. If you are not the intended
recipient, you are hereby notified that any dissemination,
distribution or copying of this message and/or attachments is
strictly prohibited. The company accepts no liability for any damage
caused by any virus transmitted by this email. Furthermore, the
company does not warrant a proper and complete transmission of this
information, nor does it accept liability for any delays. If you
have received this message in error, please contact the sender and
delete the message. Thank you.
--
Regards,
Pritam
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
--
Regards,
Pritam


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
Thiago Macieira
2012-06-05 13:10:06 UTC
Permalink
Post by Pritam
I was just trying to rule out the possibility of a platform bugs. May be
your platform vendor has not done a good job at creating/porting
platform software on the
hardware that you use.
On Windows, Qt uses system timers, which deliver events to the Qt event
window. There are two types of timers in use: the ones created with SetTimer
for anything above 20 ms or timeSetEvent (multimedia timers) for anything
below.

On Mac with GUI, Qt uses a CoreFoundation timer (created
CFRunLoopTimerCreate).

On Unix systems and on Mac without GUI, Qt does not use system timers. The
timers are kept in a sorted list and the shortest timeout is the timeout for
the the select(2) or poll(2) call.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
Loading...