On Tuesday, 29 August 2017 01:10:53 PDT René J.V. Bertin wrote:
> Which we just rediscovered :) Funny though, apparently 1 misdirected
> startTimer() call can turn any application in a CPU hog that burns cycles
> without ever doing anything. Wouldn't it be safer for QObject::timerEvent()
> to kill any timer that triggers it, possibly even do an abort if it can do
> some kind of runtime debug mode detection? At least then it's set to a 0
> (zero) interval?

Sure. Please tell that to Eirik and Håvard back in the early 90s when they're 
designing Qt. 
        http://doc.qt.io/archives/2.3/qobject.html#4c6b67
        (Qt 1 docs not online)

Unfortunately, we can't change anymore.

> It took me an unreasonable amount of time trying to figure out the reason
> for the burning, the fact that QCocoaMenu::timerEvent() could be being
> called as fast as possible and for nothing occurred to me only after trying
> all other possibilities. And I knew only the timer change could be the
> culprit; I can only imagine how much more time I'd have spent if this bug
> had been latent for a few months.

i'm glad you found it.

How did you?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to