Fixing krunner's threading
Thiago Macieira
thiago at kde.org
Tue Mar 2 14:49:18 GMT 2010
Em Segunda-feira 22 Fevereiro 2010, às 19:18:15, Andreas Hartmetz escreveu:
> Now that many of the more prominent crashes in krunner have been fixed
> I think it's time to attack something more "theoretic": runners run in
> threads and often don't pay any attention to thread-safety of API they
> use. Two weeks ago I've added a warning to KIO::Scheduler() to warn
> about its use from non-main threads, but so far nobody paid attention.
I'm actually raising the bar here.
I'm turning on QT_FATAL_WARNINGS by default in Qt debug builds (starting with
Qt 4.7).
It's time people stopped ignoring Qt warnings, which indicate that there are
problems in your code. I can see these warnings coming out of plasma:
Object::disconnect: Unexpected null parameter
QGraphicsScene::removeItem: cannot remove 0-item
This from krunner:
QObject::killTimer: timers cannot be stopped from another thread
QObject::startTimer: timers cannot be started from another thread
These from khtml:
QPainter::font: Painter not active
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QWidget::repaint: Recursive repaint detected
QPainter::begin: Widget painting can only begin as a result of a paintEvent
QPainter::translate: Painter not active
QPainter::setClipRect: Painter not active
QPainter::setPen: Painter not active
QPainter::worldTransform: Painter not active
QPainter::font: Painter not active
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QWidget::repaint: Recursive repaint detected
etc.
This means applications triggering Qt warnings will result in SIGABRT and Dr
Konqi popping up.
I'm hoping to finally bring these warnings to attention. Because clearly filling
up people's $HOME/.xsession-errors isn't enough (mine was over 4GB the other
day).
If the warning is a problem in Qt or cannot be fixed without Qt help, says so!
I don't care who's to blame, just as long as those warnings stop showing up.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100302/092f1fa7/attachment.sig>
More information about the kde-core-devel
mailing list