Bug 204399 - crash in QAbstractItemView::sizeHintForRow / FocusedTreeView
Summary: crash in QAbstractItemView::sizeHintForRow / FocusedTreeView
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 205206 209935 212949 220427 226067 243803 262870 263447 267559 293467 299445 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-19 13:28 UTC by Maxim Prohorenko
Modified: 2012-08-07 11:55 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Prohorenko 2009-08-19 13:28:32 UTC
Application that crashed: kdevelop
Version of the application: 3.9.94 (using KDevPlatform 0.9.94)
KDE Version: 4.3.00 (KDE 4.3.0)
Qt Version: 4.5.2
Operating System: Linux 2.6.29.6-217.2.7.fc11.x86_64 x86_64
Distribution: "Fedora release 11 (Leonidas)"

 -- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f98c32aa820 (LWP 4939))]

Thread 10 (Thread 0x7f98b8db1910 (LWP 4940)):
#0  0x0000003f0a00b57d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000385885ace2 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f98c3c2b08e in KDevelop::DUChainPrivate::CleanupThread::run (this=0x2f66220) at /home/maxim/src/KDE4/all-for-kdevelop/kdevplatform/language/duchain/duchain.cpp:280
#3  0x0000003858859cd5 in ?? () from /usr/lib64/libQtCore.so.4
#4  0x0000003f0a00686a in start_thread () from /lib64/libpthread.so.0
#5  0x0000003f094de39d in clone () from /lib64/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7f98a6102910 (LWP 4973)):
#0  0x0000003f0a00b2f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000385885ad7b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x000000386300aaf6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x000000386300cc33 in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x000000386300cc4c in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x000000386300b22f in ?? () from /usr/lib64/libthreadweaver.so.4
#6  0x000000386300b688 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#7  0x0000003858859cd5 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x0000003f0a00686a in start_thread () from /lib64/libpthread.so.0
#9  0x0000003f094de39d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f989ffff910 (LWP 5080)):
#0  0x0000003f0c03ae2d in ?? () from /lib64/libglib-2.0.so.0
#1  0x00007f9894002040 in ?? ()
#2  0x00007f989fffef90 in ?? ()
#3  0x00007f9894002040 in ?? ()
#4  0x00007f989fffef90 in ?? ()
#5  0x000000385893e9c4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x0000003858856f6b in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x0000003858859cd5 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x0000003f0a00686a in start_thread () from /lib64/libpthread.so.0
#9  0x0000003f094de39d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f989f5fe910 (LWP 5081)):
#0  0x0000003f094d50b3 in poll () from /lib64/libc.so.6
#1  0x0000003f0c03b05c in ?? () from /lib64/libglib-2.0.so.0
#2  0x0000003f0c03b3a0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x000000385896840e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x000000385893e5f2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x000000385893e9c4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x0000003858856f6b in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x0000003858859cd5 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x0000003f0a00686a in start_thread () from /lib64/libpthread.so.0
#9  0x0000003f094de39d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f989ebfd910 (LWP 5084)):
#0  0x0000003f0a00b57d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000003858859765 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00000038588598d0 in QThread::msleep(unsigned long) () from /usr/lib64/libQtCore.so.4
#3  0x00007f98a4a67ae1 in UIBlockTester::UIBlockTesterThread::run (this=0x4699230) at /home/maxim/src/KDE4/all-for-kdevelop/kdevelop/languages/cpp/cpplanguagesupport.cpp:661
#4  0x0000003858859cd5 in ?? () from /usr/lib64/libQtCore.so.4
#5  0x0000003f0a00686a in start_thread () from /lib64/libpthread.so.0
#6  0x0000003f094de39d in clone () from /lib64/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f989e1fc910 (LWP 5085)):
#0  0x0000003f0a00b2f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000385885ad7b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x000000386300aaf6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x000000386300cc33 in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x000000386300b22f in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x000000386300b688 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x0000003858859cd5 in ?? () from /usr/lib64/libQtCore.so.4
#7  0x0000003f0a00686a in start_thread () from /lib64/libpthread.so.0
#8  0x0000003f094de39d in clone () from /lib64/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f989d7fb910 (LWP 5086)):
#0  0x0000003f0a00b2f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000385885ad7b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x000000386300aaf6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x000000386300cc33 in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x000000386300cc4c in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x000000386300b22f in ?? () from /usr/lib64/libthreadweaver.so.4
#6  0x000000386300b688 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#7  0x0000003858859cd5 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x0000003f0a00686a in start_thread () from /lib64/libpthread.so.0
#9  0x0000003f094de39d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f98a5701910 (LWP 5511)):
#0  0x0000003f0a00b2f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000385885ad7b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x000000386300aaf6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x000000386300cc33 in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x000000386300b22f in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x000000386300b688 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x0000003858859cd5 in ?? () from /usr/lib64/libQtCore.so.4
#7  0x0000003f0a00686a in start_thread () from /lib64/libpthread.so.0
#8  0x0000003f094de39d in clone () from /lib64/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f987f9be910 (LWP 14507)):
#0  0x0000003f0a00b2f9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000385885ad7b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x000000386300aaf6 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x000000386300cc33 in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x000000386300b22f in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x000000386300b688 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#6  0x0000003858859cd5 in ?? () from /usr/lib64/libQtCore.so.4
#7  0x0000003f0a00686a in start_thread () from /lib64/libpthread.so.0
#8  0x0000003f094de39d in clone () from /lib64/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f98c32aa820 (LWP 4939)):
[KCrash Handler]
#5  0x000000385a06954b in QAbstractItemView::sizeHintForRow(int) const () from /usr/lib64/libQtGui.so.4
#6  0x000000385a0a13af in QTreeView::scrollContentsBy(int, int) () from /usr/lib64/libQtGui.so.4
#7  0x0000003859fc7fc0 in QAbstractScrollArea::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libQtGui.so.4
#8  0x000000385a064bb5 in QAbstractItemView::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libQtGui.so.4
#9  0x000000385a0a76f5 in QTreeView::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libQtGui.so.4
#10 0x00007f98c3712af8 in KDevelop::FocusedTreeView::qt_metacall (this=0x7fff1fb8c870, _c=84513728, _id=0, _a=0x0)
    at /home/maxim/src/KDE4/all-for-kdevelop/build/kdevplatform/util/focusedtreeview.moc:62
#11 0x0000003858954fdc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQtCore.so.4
#12 0x000000385a18d8be in QAbstractSlider::valueChanged(int) () from /usr/lib64/libQtGui.so.4
#13 0x000000385a09ba77 in ?? () from /usr/lib64/libQtGui.so.4
#14 0x000000385a09c024 in QTreeView::updateGeometries() () from /usr/lib64/libQtGui.so.4
#15 0x0000003859bddf14 in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#16 0x0000003859f38276 in QFrame::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#17 0x000000385a06a90b in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib64/libQtGui.so.4
#18 0x000000385a0a0c20 in QTreeView::viewportEvent(QEvent*) () from /usr/lib64/libQtGui.so.4
#19 0x000000385893f007 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#20 0x0000003859b8f66c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#21 0x0000003859b966ce in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#22 0x000000385b210546 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#23 0x000000385893fcbc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#24 0x0000003859bdce6b in QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool) () from /usr/lib64/libQtGui.so.4
#25 0x0000003859be30a3 in QWidgetPrivate::show_helper() () from /usr/lib64/libQtGui.so.4
#26 0x0000003859be42ea in QWidget::setVisible(bool) () from /usr/lib64/libQtGui.so.4
#27 0x0000003859be3536 in QWidgetPrivate::showChildren(bool) () from /usr/lib64/libQtGui.so.4
#28 0x0000003859be30bf in QWidgetPrivate::show_helper() () from /usr/lib64/libQtGui.so.4
#29 0x0000003859be34a1 in QWidgetPrivate::showChildren(bool) () from /usr/lib64/libQtGui.so.4
#30 0x0000003859be30bf in QWidgetPrivate::show_helper() () from /usr/lib64/libQtGui.so.4
#31 0x0000003859be42ea in QWidget::setVisible(bool) () from /usr/lib64/libQtGui.so.4
#32 0x0000003859be3536 in QWidgetPrivate::showChildren(bool) () from /usr/lib64/libQtGui.so.4
#33 0x0000003859be30bf in QWidgetPrivate::show_helper() () from /usr/lib64/libQtGui.so.4
#34 0x0000003859be42ea in QWidget::setVisible(bool) () from /usr/lib64/libQtGui.so.4
#35 0x0000003859be3536 in QWidgetPrivate::showChildren(bool) () from /usr/lib64/libQtGui.so.4
#36 0x0000003859be30bf in QWidgetPrivate::show_helper() () from /usr/lib64/libQtGui.so.4
#37 0x0000003859be34a1 in QWidgetPrivate::showChildren(bool) () from /usr/lib64/libQtGui.so.4
#38 0x0000003859be30bf in QWidgetPrivate::show_helper() () from /usr/lib64/libQtGui.so.4
#39 0x0000003859be42ea in QWidget::setVisible(bool) () from /usr/lib64/libQtGui.so.4
#40 0x00007f98c39623b3 in Sublime::IdealMainLayout::DockArea::setVisible (this=0x60ee540, visible=true, showMainSplitter=true, maximizedWidget=0x0)
    at /home/maxim/src/KDE4/all-for-kdevelop/kdevplatform/sublime/ideallayout.cpp:908
#41 0x00007f98c3966ab6 in Sublime::IdealMainLayout::addWidget (this=0x6a8f520, widget=0x548d560, role=Sublime::IdealMainLayout::Bottom)
    at /home/maxim/src/KDE4/all-for-kdevelop/kdevplatform/sublime/ideallayout.cpp:707
#42 0x00007f98c395c358 in Sublime::IdealMainWidget::showDockWidget (this=0x6d66d70, dock=0x548d560, show=true) at /home/maxim/src/KDE4/all-for-kdevelop/kdevplatform/sublime/ideal.cpp:780
#43 0x00007f98c395c492 in Sublime::IdealButtonBarWidget::showWidget (this=0x5499cc0, checked=false) at /home/maxim/src/KDE4/all-for-kdevelop/kdevplatform/sublime/ideal.cpp:252
#44 0x00007f98c395c5a8 in Sublime::IdealButtonBarWidget::qt_metacall (this=0x5499cc0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff1fb8e250)
    at /home/maxim/src/KDE4/all-for-kdevelop/build/kdevplatform/sublime/ideal.moc:171
#45 0x0000003858954fdc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQtCore.so.4
#46 0x0000003859b89892 in QAction::toggled(bool) () from /usr/lib64/libQtGui.so.4
#47 0x0000003859b8abbb in QAction::setChecked(bool) () from /usr/lib64/libQtGui.so.4
#48 0x0000003859b8d99f in QAction::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libQtGui.so.4
#49 0x0000003859be7b95 in QWidgetAction::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libQtGui.so.4
#50 0x000000385b140838 in KAction::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libkdeui.so.5
#51 0x0000003858954fdc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQtCore.so.4
#52 0x000000385a18d2a2 in QAbstractButton::toggled(bool) () from /usr/lib64/libQtGui.so.4
#53 0x0000003859ef3338 in QAbstractButton::setChecked(bool) () from /usr/lib64/libQtGui.so.4
#54 0x0000003859ef2ffa in ?? () from /usr/lib64/libQtGui.so.4
#55 0x0000003859ef3285 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQtGui.so.4
#56 0x0000003859fc1c0a in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQtGui.so.4
#57 0x0000003859bde100 in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#58 0x0000003859b8f69c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#59 0x0000003859b96dc1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#60 0x000000385b210546 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#61 0x000000385893fcbc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#62 0x0000003859b96080 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&) () from /usr/lib64/libQtGui.so.4
#63 0x0000003859bfbece in ?? () from /usr/lib64/libQtGui.so.4
#64 0x0000003859bfaf6a in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4
#65 0x0000003859c22c7c in ?? () from /usr/lib64/libQtGui.so.4
#66 0x0000003f0c037abe in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#67 0x0000003f0c03b278 in ?? () from /lib64/libglib-2.0.so.0
#68 0x0000003f0c03b3a0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#69 0x00000038589683b6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#70 0x0000003859c2242e in ?? () from /usr/lib64/libQtGui.so.4
#71 0x000000385893e5f2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#72 0x000000385893e9c4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#73 0x0000003858940b79 in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#74 0x0000000000407b67 in main (argc=<value optimized out>, argv=<value optimized out>) at /home/maxim/src/KDE4/all-for-kdevelop/kdevelop/app/main.cpp:181

Reported using DrKonqi
Comment 1 Andreas Pakulat 2009-08-19 13:53:53 UTC
looking at the backtrace its either a broken Qt build or a bug in Qt. Apart from that no clear reproduction steps.
Comment 2 Andreas Pakulat 2009-08-26 20:58:20 UTC
*** Bug 205206 has been marked as a duplicate of this bug. ***
Comment 3 Andreas Pakulat 2009-10-09 09:55:56 UTC
*** Bug 209935 has been marked as a duplicate of this bug. ***
Comment 4 Andreas Pakulat 2009-12-28 19:57:58 UTC
*** Bug 220427 has been marked as a duplicate of this bug. ***
Comment 5 Milian Wolff 2010-09-28 21:06:40 UTC
*** Bug 226067 has been marked as a duplicate of this bug. ***
Comment 6 Milian Wolff 2010-09-28 21:06:54 UTC
*** Bug 243803 has been marked as a duplicate of this bug. ***
Comment 7 Milian Wolff 2010-09-28 21:07:14 UTC
*** Bug 212949 has been marked as a duplicate of this bug. ***
Comment 8 Milian Wolff 2010-09-28 21:08:39 UTC
we have to do something about this one, quite a few duplicate reports.
Comment 9 Milian Wolff 2010-09-28 21:12:45 UTC
Better backtrace from bug 243803:
Application: kdevelop (4.0.0 (using KDevPlatform 1.0.0))
KDE Platform Version: 4.4.2 (KDE 4.4.2)
Qt Version: 4.6.2
Operating System: Linux 2.6.32-23-generic-pae i686
Distribution: Ubuntu 10.04 LTS

Thread 1 (Thread 0xb478f710 (LWP 19570)):
[KCrash Handler]
#6  0xb6b3dc15 in QAbstractItemView::sizeHintForRow (this=0x9ad23f8, row=0) at
itemviews/qabstractitemview.cpp:2905
#7  0xb6b805e3 in QTreeView::scrollContentsBy (this=0x9ad23f8, dx=0, dy=1) at
itemviews/qtreeview.cpp:2349
#8  0xb6a89d65 in QAbstractScrollAreaPrivate::_q_vslide (this=0x9ad8ea0, y=1)
at widgets/qabstractscrollarea.cpp:1310
#9  0xb6a8b3d2 in QAbstractScrollArea::qt_metacall (this=0x9ad23f8,
_c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbf953f18) at
.moc/release-shared/moc_qabstractscrollarea.cpp:85
#10 0xb6b3948a in QAbstractItemView::qt_metacall (this=0x9ad23f8,
_c=QMetaObject::InvokeMetaMethod, _id=29, _a=0xbf953f18) at
.moc/release-shared/moc_qabstractitemview.cpp:213
#11 0xb6b8798a in QTreeView::qt_metacall (this=0x9ad23f8,
_c=QMetaObject::InvokeMetaMethod, _id=29, _a=0xbf953f18) at
.moc/release-shared/moc_qtreeview.cpp:119
#12 0xb522ba5a in KDevelop::FocusedTreeView::qt_metacall (this=0x9ad23f8,
_c=QMetaObject::InvokeMetaMethod, _id=29, _a=0xbf953f18) at
./focusedtreeview.moc:68
#13 0xb7049c9a in QMetaObject::metacall (object=0x9ad23f8, cl=3214228564,
idx=29, argv=0xbf953f18) at kernel/qmetaobject.cpp:237
#14 0xb70583d5 in QMetaObject::activate (sender=0x9ad9d50, m=0xb6ed09f4,
local_signal_index=0, argv=0xbf953f18) at kernel/qobject.cpp:3293
#15 0xb6cc0be3 in QAbstractSlider::valueChanged (this=0x9ad9d50, _t1=1) at
.moc/release-shared/moc_qabstractslider.cpp:182
#16 0xb69a30e7 in QAbstractSlider::setValue (this=0x9ad9d50, value=1) at
widgets/qabstractslider.cpp:542
#17 0xb69a3acc in QAbstractSlider::setRange (this=0x9ad9d50, min=0, max=1) at
widgets/qabstractslider.cpp:251
#18 0xb6b7a5a0 in QTreeViewPrivate::updateScrollBars (this=0x9ad8ea0) at
itemviews/qtreeview.cpp:3492
#19 0xb6b7aaa5 in QTreeView::updateGeometries (this=0x9ad23f8) at
itemviews/qtreeview.cpp:2745
#20 0xb6b2fd64 in QAbstractItemView::resizeEvent (this=0x9ad23f8,
event=0xbf954918) at itemviews/qabstractitemview.cpp:2338
#21 0xb65f3643 in QWidget::event (this=0x9ad23f8, event=0xbf954918) at
kernel/qwidget.cpp:8152
#22 0xb69effd3 in QFrame::event (this=0x9ad23f8, e=0xbf954918) at
widgets/qframe.cpp:557
#23 0xb6a8a382 in QAbstractScrollArea::viewportEvent (this=0xbf953c54,
e=0xbf953bb8) at widgets/qabstractscrollarea.cpp:1036
#24 0xb6b3ebd7 in QAbstractItemView::viewportEvent (this=0x9ad23f8,
event=0xbf954918) at itemviews/qabstractitemview.cpp:1610
#25 0xb6b7ff7c in QTreeView::viewportEvent (this=0x9ad23f8, event=0xbf954918)
at itemviews/qtreeview.cpp:1248
#26 0xb6a8cc65 in QAbstractScrollAreaPrivate::viewportEvent (this=0x9ada2a0,
o=0x9ad4658, e=0xbf954918) at widgets/qabstractscrollarea_p.h:100
#27 QAbstractScrollAreaFilter::eventFilter (this=0x9ada2a0, o=0x9ad4658,
e=0xbf954918) at widgets/qabstractscrollarea_p.h:116
#28 0xb7043cda in QCoreApplicationPrivate::sendThroughObjectEventFilters
(this=0x847c558, receiver=0x9ad4658, event=0xbf954918) at
kernel/qcoreapplication.cpp:819
#29 0xb65954b9 in QApplicationPrivate::notify_helper (this=0x847c558,
receiver=0x9ad4658, e=0xbf954918) at kernel/qapplication.cpp:4296
#30 0xb659c0f9 in QApplication::notify (this=0xbf955958, receiver=0x9ad4658,
e=0xbf954918) at kernel/qapplication.cpp:4265
#31 0xb7339f2a in KApplication::notify (this=0xbf955958, receiver=0x9ad4658,
event=0xbf954918) at ../../kdeui/kernel/kapplication.cpp:302
#32 0xb7044a3b in QCoreApplication::notifyInternal (this=0xbf955958,
receiver=0x9ad4658, event=0xbf954918) at kernel/qcoreapplication.cpp:704
#33 0xb65f2719 in QCoreApplication::sendEvent (this=0x9ad9260, recursive=true,
disableUpdates=true) at
../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#34 QWidgetPrivate::sendPendingMoveAndResizeEvents (this=0x9ad9260,
recursive=true, disableUpdates=true) at kernel/qwidget.cpp:7086
#35 0xb65f2687 in QWidgetPrivate::sendPendingMoveAndResizeEvents
(this=0x9ad8ea0, recursive=true, disableUpdates=true) at
kernel/qwidget.cpp:7098
#36 0xb65f2687 in QWidgetPrivate::sendPendingMoveAndResizeEvents
(this=0x9a93e18, recursive=true, disableUpdates=true) at
kernel/qwidget.cpp:7098
#37 0xb65f2687 in QWidgetPrivate::sendPendingMoveAndResizeEvents
(this=0x9a93b60, recursive=true, disableUpdates=true) at
kernel/qwidget.cpp:7098
#38 0xb65f2687 in QWidgetPrivate::sendPendingMoveAndResizeEvents
(this=0xa0d04d8, recursive=true, disableUpdates=true) at
kernel/qwidget.cpp:7098
#39 0xb65f2687 in QWidgetPrivate::sendPendingMoveAndResizeEvents
(this=0x9149628, recursive=true, disableUpdates=true) at
kernel/qwidget.cpp:7098
#40 0xb65f2687 in QWidgetPrivate::sendPendingMoveAndResizeEvents
(this=0xa098f58, recursive=true, disableUpdates=true) at
kernel/qwidget.cpp:7098
#41 0xb65f2687 in QWidgetPrivate::sendPendingMoveAndResizeEvents
(this=0x8559d50, recursive=true, disableUpdates=true) at
kernel/qwidget.cpp:7098
#42 0xb65f8481 in QWidgetPrivate::prepareToRender (this=0x8559d50, region=...,
renderFlags=...) at kernel/qwidget.cpp:5163
#43 0xb65fd92d in QWidget::render (this=0x8559bd8, target=0xbf954f4c,
targetOffset=..., sourceRegion=..., renderFlags=...) at kernel/qwidget.cpp:4871
#44 0xb668daf2 in QPixmap::grabWidget (widget=0x8559bd8, rect=...) at
image/qpixmap.cpp:1085
#45 0xb2f76078 in Oxygen::TransitionWidget::grab (this=0x887ab00,
widget=0x8761888, rect=...) at
../../../kstyles/oxygen/transitions/oxygentransitionwidget.cpp:86
#46 0xb2f70e1e in Oxygen::LineEditData::timerEvent (this=0x887aa10,
event=0xbf955550) at
../../../kstyles/oxygen/transitions/oxygenlineeditdata.cpp:87
#47 0xb7055254 in QObject::event (this=0x887aa10, e=0xbf953bb8) at
kernel/qobject.cpp:1212
#48 0xb65954dc in QApplicationPrivate::notify_helper (this=0x847c558,
receiver=0x887aa10, e=0xbf955550) at kernel/qapplication.cpp:4300
#49 0xb659c05e in QApplication::notify (this=0xbf955958, receiver=0x887aa10,
e=0xbf955550) at kernel/qapplication.cpp:3704
#50 0xb7339f2a in KApplication::notify (this=0xbf955958, receiver=0x887aa10,
event=0xbf955550) at ../../kdeui/kernel/kapplication.cpp:302
#51 0xb7044a3b in QCoreApplication::notifyInternal (this=0xbf955958,
receiver=0x887aa10, event=0xbf955550) at kernel/qcoreapplication.cpp:704
#52 0xb7073d66 in QCoreApplication::sendEvent (this=0x847f634) at
../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#53 QTimerInfoList::activateTimers (this=0x847f634) at
kernel/qeventdispatcher_unix.cpp:603
#54 0xb70708e4 in timerSourceDispatch (source=0x847f600) at
kernel/qeventdispatcher_glib.cpp:184
#55 0xb4f255e5 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#56 0xb4f292d8 in ?? () from /lib/libglib-2.0.so.0
#57 0xb4f294b8 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#58 0xb70705d5 in QEventDispatcherGlib::processEvents (this=0x84371f0,
flags=...) at kernel/qeventdispatcher_glib.cpp:412
#59 0xb6655135 in QGuiEventDispatcherGlib::processEvents (this=0x84371f0,
flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#60 0xb7043059 in QEventLoop::processEvents (this=0xbf955814, flags=) at
kernel/qeventloop.cpp:149
#61 0xb70434aa in QEventLoop::exec (this=0xbf955814, flags=...) at
kernel/qeventloop.cpp:201
#62 0xb704769f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#63 0xb6595577 in QApplication::exec () at kernel/qapplication.cpp:3579
#64 0x08050023 in _start ()
Comment 10 Milian Wolff 2010-09-28 21:17:35 UTC
the last bug points to this line in qabstractitemview.cpp:

int hint = d->delegateForIndex(index)->sizeHint(option, index).height();

we probably need a way to reproduce it and run valgrind on it...
Comment 11 Milian Wolff 2011-01-11 18:37:55 UTC
*** Bug 262870 has been marked as a duplicate of this bug. ***
Comment 12 Milian Wolff 2011-01-24 12:19:09 UTC
*** Bug 263447 has been marked as a duplicate of this bug. ***
Comment 13 Milian Wolff 2011-02-28 11:15:56 UTC
*** Bug 267187 has been marked as a duplicate of this bug. ***
Comment 14 Milian Wolff 2011-03-03 17:00:36 UTC
*** Bug 267559 has been marked as a duplicate of this bug. ***
Comment 15 Christoph Feck 2011-08-05 14:50:02 UTC
If this is a duplicate of 267187, it could be closed, too.
Comment 16 Olivier.jg 2011-08-20 02:21:35 UTC
This hasn't been reported in a long time and appears to have been fixed along with https://bugs.kde.org/show_bug.cgi?id=267187
Comment 17 Milian Wolff 2012-05-07 12:08:07 UTC
*** Bug 299445 has been marked as a duplicate of this bug. ***
Comment 18 Milian Wolff 2012-05-07 12:08:49 UTC
still happened with 4.2.3 - reopening...

we need a reproducible way to trigger this crash in order to fix it, or a valgrind log...
Comment 19 Milian Wolff 2012-08-06 17:22:06 UTC
I just reproduced this issue:

- open a single project in kdev that uses the make builder
- trigger a make job (i.e. build the project)
- close the project

closing the last project results in:

kdevelop(26345)/kdevplatform (shell) KDevelop::PluginControllerPrivate::canUnload: checking can unload for: "Make Project Builder" QVariant(, )
kdevelop(26345)/kdevplatform (shell) KDevelop::PluginControllerPrivate::canUnload: checking dependencies: ("org.kdevelop.IMakeBuilder")
kdevelop(26345)/kdevplatform (shell) KDevelop::PluginController::unloadPlugin: Unloading plugin: "KDevMakeBuilder" ? MakeBuilder(0x6126460) true
kdevelop(26345)/kdevplatform (shell) KDevelop::PluginController::unloadPlugin: unloading plugin: MakeBuilder(0x6126460) "Make Project Builder"

which then also deletes the output delegate and thus crashes...

This means we either have to use shared pointers for the delegates or prevent unloading of plugins which might have still jobs running...
Comment 20 Milian Wolff 2012-08-06 17:22:41 UTC
*** Bug 293467 has been marked as a duplicate of this bug. ***
Comment 21 Andreas Pakulat 2012-08-06 18:53:00 UTC
Two questions come to mind:

a) Why is the outputview still referencing the delegate?
b) If its ok the view is still there, why does the make plugin want to keep ownership of the delegate?

This looks like mis-management of ownership of the delegate and/or not unregistering the outputview. I guess for a safer API it would be good to either make sure all views that a plugin are de-registered and the corresponding widgets deleted before the plugin is unloaded (this requires keeping track of the plugin <-> view/widgets) or remove the ownership-feature and have the framework always take ownership of the delegates and possibly also the models.
Comment 22 Milian Wolff 2012-08-07 08:33:46 UTC
a) The outputview is still referencing the delegate, because the view showing the build-output is still there. The makebuilder plugin itself does not explicitly register a view or anything, it just runs an outputjob (the makejob). The job sets the delegate and the view uses that. And the view does not really now anything about any plugin, it just nows something about an OutputJob that will finish at some point. Even if the job has finished though, we still want to show its output until the user deletes the view.

b) Imo it "wants" to keep the ownership because the API says that this is the default and one gets the impression that it is thus the recommended way of doing it. There is even the DelegateHolder in kdevplatform/outputview ...

All in all I think this is pretty wrong on the KDevplatform side. Afaik, a delegate should actually have a one-to-one relation to a view, i.e. one should not reuse a delegate for multiple views. That is done though, as far as I can see. Every time you run an app, or a script, it will create a new view and reuse the same delegate. And of course, unloading a plugin will then crash kdevplatform.

For 4.4 this is probably too late to fix properly, yet I think for 4.5 I'll remove the ownership feature and will put the ownership always to the view. So far, I have not seen a single reason why the plugin should hold the ownership here.
Comment 23 Andreas Pakulat 2012-08-07 08:50:29 UTC
I don't agree with your assessment about having a 1:1 relation between view and delegate. In particular it doesn't match the Qt api docs which would usually take ownership of things when they require a 1:1 relation anyway. But the itemview API docs explicitly don't do this. And frankly not re-using the delegate here would mean a lot of wasted memory since each delegate would need to keep its own set of brushes IIRC.

I agree though that given the plugin never sees anything about the GUI side of the outputview, it should not be allowed to take ownership of the delegate either. The delegate clearly belongs to the view.

I assume the job is not necessary to keep around and the model's ownership is already in the framework and not the plugin? Then removing the flag and moving ownership of the delegate always into the framework  should be all thats needed to fix these crashes.
Comment 24 Milian Wolff 2012-08-07 11:16:46 UTC
Git commit f5e397be7a8088a94814a488133d572dc4167f14 by Milian Wolff.
Committed on 07/08/2012 at 13:09.
Pushed by mwolff into branch 'master'.

Let the OutputView take ownership of a job's model and delegate.

This is required to ensure proper functionality of the views
when e.g. a plugin gets unloaded. Previously, this would trigger
crashes due to access of invalid model or delegate pointers.

Now the view will stay functioning even if e.g. the MakeBuilder
gets plugin gets unloaded after a project was compiled, or even
if you close a project while it is being built.

It is still safe to access both, the model and the delegate,
from inside a job as long as the job is running. When a view
gets closed, the job gets cancelled anyways.

Sadly, this is an ABI break and thus cannot be backported to
the KDevplatform 1.4 branch...
Related: bug 207669

M  +0    -1    outputview/CMakeLists.txt
D  +0    -38   outputview/delegateholder.cpp
D  +0    -44   outputview/delegateholder.h
M  +8    -18   outputview/ioutputview.h
M  +1    -1    outputview/outputdelegate.h
M  +4    -10   outputview/outputjob.cpp
M  +20   -4    outputview/outputjob.h
M  +1    -1    outputview/outputmodel.h
M  +1    -1    plugins/execute/nativeappjob.cpp
M  +1    -1    plugins/executescript/executescriptoutputmodel.h
M  +1    -2    plugins/executescript/executescriptplugin.cpp
M  +1    -2    plugins/executescript/executescriptplugin.h
M  +3    -3    plugins/executescript/scriptappjob.cpp
M  +0    -1    plugins/executescript/scriptappjob.h
M  +4    -3    plugins/externalscript/externalscriptjob.cpp
M  +0    -1    plugins/externalscript/externalscriptplugin.cpp
M  +1    -2    plugins/externalscript/externalscriptplugin.h
M  +1    -5    plugins/standardoutputview/outputwidget.cpp
M  +4    -4    plugins/standardoutputview/standardoutputview.cpp
M  +2    -2    plugins/standardoutputview/standardoutputview.h
M  +10   -20   plugins/standardoutputview/tests/standardoutputviewtest.cpp
M  +0    -4    plugins/standardoutputview/tests/standardoutputviewtest.h
M  +13   -8    plugins/standardoutputview/toolviewdata.cpp
M  +3    -5    plugins/standardoutputview/toolviewdata.h
M  +2    -2    vcs/dvcs/dvcsjob.cpp

http://commits.kde.org/kdevplatform/f5e397be7a8088a94814a488133d572dc4167f14
Comment 25 Milian Wolff 2012-08-07 11:55:41 UTC
Git commit 71ebc3a46cbae8dbf4f728f83ac4bfcfc3bca8bc by Milian Wolff.
Committed on 07/08/2012 at 13:50.
Pushed by mwolff into branch '4.4'.

Let the OutputView take ownership of the make output delegate.

This is basically the fix for the two bugs below that does not
require any ABI break and can thus be done in the 1.4 branch.
Related: bug 207669

M  +0    -7    projectbuilders/makebuilder/makebuilder.cpp
M  +0    -7    projectbuilders/makebuilder/makebuilder.h
M  +2    -1    projectbuilders/makebuilder/makejob.cpp
M  +1    -1    projectbuilders/makebuilder/makeoutputdelegate.h

http://commits.kde.org/kdevelop/71ebc3a46cbae8dbf4f728f83ac4bfcfc3bca8bc