Bug 311663 - KMessageWidget triggers infinite loop in animatedShow
Summary: KMessageWidget triggers infinite loop in animatedShow
Status: RESOLVED DUPLICATE of bug 311336
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdeui (show other bugs)
Version: 4.9.4
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-13 23:55 UTC by Milian Wolff
Modified: 2012-12-14 02:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milian Wolff 2012-12-13 23:55:25 UTC
Kate and KDevelop use the KMessageWidget nowadays, but at least for me on QtCurve I can easily trigger crashes due to infinite recursion in KMessageWidget::animatedShow

Reproducible: Always

Steps to Reproduce:
1. cd /tmp
2. touch a b c
3. kate a b c
4. write some text into all three files, don't save any
5. killall -9 kate
6. kate a b c
7. press alt left or right a few times (i.e. switch between the three views)
Actual Results:  
crash due to infinite recursion:

(gdb) bt
#0  0x00007ffff5b2e9b4 in ?? () from /usr/lib/libQtGui.so.4
#1  0x00007ffff5b2fc79 in ?? () from /usr/lib/libQtGui.so.4
#2  0x00007ffff5b4a890 in QWidget::heightForWidth(int) const () from /usr/lib/libQtGui.so.4
#3  0x00007ffff68e61b1 in ?? () from /usr/lib/libkdeui.so.5
#4  0x00007ffff68e61f7 in KMessageWidget::resizeEvent(QResizeEvent*) () from /usr/lib/libkdeui.so.5
#5  0x00007ffff5b5bc15 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#6  0x00007ffff5f06d36 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
#7  0x00007ffff5b0c18c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#8  0x00007ffff5b1060a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#9  0x00007ffff6829df6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#10 0x00007ffff4e9c6ae in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#11 0x00007ffff5b561e6 in QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool) () from /usr/lib/libQtGui.so.4
#12 0x00007ffff5b5960b in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#13 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#14 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#15 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#16 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#17 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#18 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#19 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#20 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#21 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#22 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#23 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#24 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#25 0x00007ffff5b598d0 in QWidgetPrivate::prepareToRender(QRegion const&, QFlags<QWidget::RenderFlag>) () from /usr/lib/libQtGui.so.4
#26 0x00007ffff5b59a56 in QWidgetPrivate::render(QPaintDevice*, QPoint const&, QRegion const&, QFlags<QWidget::RenderFlag>, bool) () from /usr/lib/libQtGui.so.4
#27 0x00007ffff5b59e99 in QWidget::render(QPaintDevice*, QPoint const&, QRegion const&, QFlags<QWidget::RenderFlag>) () from /usr/lib/libQtGui.so.4
#28 0x00007ffff68e60db in ?? () from /usr/lib/libkdeui.so.5
#29 0x00007ffff68e6241 in KMessageWidget::resizeEvent(QResizeEvent*) () from /usr/lib/libkdeui.so.5
#30 0x00007ffff5b5bc15 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#31 0x00007ffff5f06d36 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
#32 0x00007ffff5b0c18c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#33 0x00007ffff5b1060a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#34 0x00007ffff6829df6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#35 0x00007ffff4e9c6ae in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#36 0x00007ffff5b561e6 in QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool) () from /usr/lib/libQtGui.so.4
#37 0x00007ffff5b5960b in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#38 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#39 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#40 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#41 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#42 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#43 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#44 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#45 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#46 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#47 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#48 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#49 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#50 0x00007ffff5b598d0 in QWidgetPrivate::prepareToRender(QRegion const&, QFlags<QWidget::RenderFlag>) () from /usr/lib/libQtGui.so.4
#51 0x00007ffff5b59a56 in QWidgetPrivate::render(QPaintDevice*, QPoint const&, QRegion const&, QFlags<QWidget::RenderFlag>, bool) () from /usr/lib/libQtGui.so.4
#52 0x00007ffff5b59e99 in QWidget::render(QPaintDevice*, QPoint const&, QRegion const&, QFlags<QWidget::RenderFlag>) () from /usr/lib/libQtGui.so.4
#53 0x00007ffff68e60db in ?? () from /usr/lib/libkdeui.so.5
#54 0x00007ffff68e6241 in KMessageWidget::resizeEvent(QResizeEvent*) () from /usr/lib/libkdeui.so.5
#55 0x00007ffff5b5bc15 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#56 0x00007ffff5f06d36 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
#57 0x00007ffff5b0c18c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#58 0x00007ffff5b1060a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#59 0x00007ffff6829df6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#60 0x00007ffff4e9c6ae in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#61 0x00007ffff5b561e6 in QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool) () from /usr/lib/libQtGui.so.4
#62 0x00007ffff5b5960b in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#63 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#64 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#65 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#66 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#67 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#68 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#69 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#70 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#71 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#72 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#73 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#74 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#75 0x00007ffff5b598d0 in QWidgetPrivate::prepareToRender(QRegion const&, QFlags<QWidget::RenderFlag>) () from /usr/lib/libQtGui.so.4
#76 0x00007ffff5b59a56 in QWidgetPrivate::render(QPaintDevice*, QPoint const&, QRegion const&, QFlags<QWidget::RenderFlag>, bool) () from /usr/lib/libQtGui.so.4
#77 0x00007ffff5b59e99 in QWidget::render(QPaintDevice*, QPoint const&, QRegion const&, QFlags<QWidget::RenderFlag>) () from /usr/lib/libQtGui.so.4
#78 0x00007ffff68e60db in ?? () from /usr/lib/libkdeui.so.5
#79 0x00007ffff68e6241 in KMessageWidget::resizeEvent(QResizeEvent*) () from /usr/lib/libkdeui.so.5
#80 0x00007ffff5b5bc15 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#81 0x00007ffff5f06d36 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
#82 0x00007ffff5b0c18c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#83 0x00007ffff5b1060a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#84 0x00007ffff6829df6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#85 0x00007ffff4e9c6ae in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#86 0x00007ffff5b561e6 in QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool) () from /usr/lib/libQtGui.so.4
#87 0x00007ffff5b5960b in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#88 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#89 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#90 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
#91 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
...
(gdb) up 1000000
#66373 0x00000000004008ee in main (argc=4, argv=0x7fffffffd1f8) at /home/milian/projects/.build/kde4/kate/kate/app/kate_dummy.cpp:3
3       int main(int argc, char* argv[]) { return kdemain(argc,argv); }
(gdb) dow
#66372 0x00007ffff7ff458a in kdemain (argc=4, argv=0x7fffffffd1f8) at /home/milian/projects/kde4/kate/kate/app/katemain.cpp:380
380       return app.exec();
(gdb) 
#66371 0x00007ffff4ea0328 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
(gdb) 
#66370 0x00007ffff4e9b688 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
(gdb) 
#66369 0x00007ffff4e9b3ff in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
(gdb) 
#66368 0x00007ffff5bac69e in ?? () from /usr/lib/libQtGui.so.4
(gdb) 
#66367 0x00007ffff4ecab66 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
(gdb) 
#66366 0x00007ffff065ec34 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
(gdb) 
#66365 0x00007ffff065eb78 in ?? () from /usr/lib/libglib-2.0.so.0
(gdb) 
#66364 0x00007ffff065e845 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
(gdb) 
#66363 0x00007ffff4eca9d3 in ?? () from /usr/lib/libQtCore.so.4
(gdb) 
#66362 0x00007ffff4ea0011 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
(gdb) 
#66361 0x00007ffff4e9c6ae in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
(gdb) 
#66360 0x00007ffff6829df6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
(gdb) 
#66359 0x00007ffff5b1060a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
(gdb) 
#66358 0x00007ffff5b0c18c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
(gdb) 
#66357 0x00007ffff5f06d36 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
(gdb) 
#66356 0x00007ffff5b5b18a in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
(gdb) 
#66355 0x00007ffff4eb106e in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
(gdb) 
#66354 0x00007ffff68e6d50 in KMessageWidget::animatedShow() () from /usr/lib/libkdeui.so.5
(gdb) 
#66353 0x00007ffff68e60db in ?? () from /usr/lib/libkdeui.so.5
(gdb) 
#66352 0x00007ffff5b59e99 in QWidget::render(QPaintDevice*, QPoint const&, QRegion const&, QFlags<QWidget::RenderFlag>) () from /usr/lib/libQtGui.so.4
(gdb) 
#66351 0x00007ffff5b59a56 in QWidgetPrivate::render(QPaintDevice*, QPoint const&, QRegion const&, QFlags<QWidget::RenderFlag>, bool) () from /usr/lib/libQtGui.so.4
(gdb) 
#66350 0x00007ffff5b598d0 in QWidgetPrivate::prepareToRender(QRegion const&, QFlags<QWidget::RenderFlag>) () from /usr/lib/libQtGui.so.4
(gdb) 
#66349 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66348 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66347 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66346 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66345 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66344 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66343 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66342 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66341 0x00007ffff5b59678 in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66340 0x00007ffff5b596ba in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66339 0x00007ffff5b596ba in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66338 0x00007ffff5b596ba in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66337 0x00007ffff5b5960b in QWidgetPrivate::activateChildLayoutsRecursively() () from /usr/lib/libQtGui.so.4
(gdb) 
#66336 0x00007ffff5b561e6 in QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool) () from /usr/lib/libQtGui.so.4
(gdb) 
#66335 0x00007ffff4e9c6ae in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
(gdb) 
#66334 0x00007ffff6829df6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
(gdb) 
#66333 0x00007ffff5b1060a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
(gdb) 
#66332 0x00007ffff5b0c18c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
(gdb) 
#66331 0x00007ffff5f06d36 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
(gdb) 
#66330 0x00007ffff5b5bc15 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
(gdb) 
#66329 0x00007ffff68e6241 in KMessageWidget::resizeEvent(QResizeEvent*) () from /usr/lib/libkdeui.so.5
(gdb) 
#66328 0x00007ffff68e60db in ?? () from /usr/lib/libkdeui.so.5
(gdb) 


Expected Results:  
no crash

I think it's related to not yet visible KMessageWidget's, at least I could trigger it in KDevelop that way, i.e. something similar to (the below is untested):

QWidget* w = new QWidget;
QHBoxLayout* l = new QHBoxLayout;
KMessageWidget* msg = new KMessageWidget;
l->addWidget(msg);
w->setLayout(l);
// don't call w->show()
msg->animatedShow();
Comment 1 Milian Wolff 2012-12-13 23:56:00 UTC
CC'ing Aurelien, afaik you wrote this?
Comment 2 Christoph Feck 2012-12-14 02:06:53 UTC

*** This bug has been marked as a duplicate of bug 311336 ***