Bug 247625 - kdevelop crashing during startup due to failed assert in kdevplatform/shell/documentationcontroller.cpp
Summary: kdevelop crashing during startup due to failed assert in kdevplatform/shell/d...
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: 4.0.1
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-13 11:01 UTC by Felix Tiede
Modified: 2010-12-24 12:23 UTC (History)
0 users

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 Felix Tiede 2010-08-13 11:01:03 UTC
Application: kdevelop (4.0.60)
KDE Platform Version: 4.5.00 (KDE 4.5.0) (Compiled from sources)
Qt Version: 4.6.3
Operating System: Linux 2.6.35-gentoo-r1 x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
- What I was doing when the application crashed:
Starting it via K-Menu entry.
Starting it from Konsole with '-s <sessionhash>' and '-cs test' commandline switches, all with the same result.

kdevplatform and kdevelop are just compiled from git:
kdevplatform: cda294b4326eb9dca8e51414288c879fe57af914 (branch master)
kdevelop: efa039adfcb68b47d5c4eb132a295164393aaec1 (branch master)

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Aborted
[Current thread is 1 (Thread 0x7ff309acf760 (LWP 28160))]

Thread 3 (Thread 0x7ff2f7f0a710 (LWP 28161)):
#0  0x00007ff306cfb599 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007ff308244e7e in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007ff3048a3fc7 in KDevelop::DUChainPrivate::CleanupThread::run (this=0x2428920) at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/language/duchain/duchain.cpp:286
#3  0x00007ff308243dd7 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007ff306cf6884 in start_thread () from /lib/libpthread.so.0
#5  0x00007ff306fdd27d in clone () from /lib/libc.so.6

Thread 2 (Thread 0x7ff2ec51f710 (LWP 28167)):
#0  0x00007ff306fd69e3 in select () from /lib/libc.so.6
#1  0x00007ff30835311c in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007ff3083568d9 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007ff308357605 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007ff30832d072 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007ff30832d3c3 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007ff3082417bf in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007ff308243dd7 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007ff306cf6884 in start_thread () from /lib/libpthread.so.0
#9  0x00007ff306fdd27d in clone () from /lib/libc.so.6

Thread 1 (Thread 0x7ff309acf760 (LWP 28160)):
[KCrash Handler]
#6  0x00007ff306f3e1b5 in raise () from /lib/libc.so.6
#7  0x00007ff306f3f5e0 in abort () from /lib/libc.so.6
#8  0x00007ff30823c84d in qt_message_output(QtMsgType, char const*) () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007ff30823ca05 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#10 0x00007ff30823cb80 in qFatal(char const*, ...) () from /usr/lib64/qt4/libQtCore.so.4
#11 0x00007ff308f8c6d9 in KDevelop::DocumentationController::documentationProviders (this=<value optimized out>)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/shell/documentationcontroller.cpp:131
#12 0x00007ff308f8d812 in ProvidersModel (this=0x3917b20, parent=<value optimized out>) at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/shell/documentationview.cpp:182
#13 0x00007ff308f8e176 in DocumentationView (this=0x390e890, parent=<value optimized out>) at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/shell/documentationview.cpp:55
#14 0x00007ff308f8d2a1 in DocumentationViewFactory::create (this=<value optimized out>, parent=0x39090c0)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/shell/documentationcontroller.cpp:47
#15 0x00007ff3045b32b1 in Sublime::View::widget (this=0x6e00, parent=0x6e00) at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/sublime/view.cpp:82
#16 0x00007ff3045b74f7 in Sublime::IdealMainWidget::addView (this=0x316ef80, area=<value optimized out>, view=0x3908ec0)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/sublime/ideal.cpp:622
#17 0x00007ff3045aeee7 in Sublime::MainWindowPrivate::IdealToolViewCreator::operator() (this=<value optimized out>, view=0x3908ec0, position=Sublime::Right)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/sublime/mainwindow_p.cpp:190
#18 0x00007ff3045b28f0 in void Sublime::Area::walkToolViews<Sublime::MainWindowPrivate::IdealToolViewCreator>(Sublime::MainWindowPrivate::IdealToolViewCreator&, QFlags<Sublime::Position>) ()
   from /usr/lib/libsublime.so.2
#19 0x00007ff3045aef30 in Sublime::MainWindowPrivate::toolViewAdded (this=0x2284e70, position=Sublime::Right)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/sublime/mainwindow_p.cpp:545
#20 0x00007ff3045a9cc9 in Sublime::MainWindow::qt_metacall (this=0x228a1e0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff8aa3cb70)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999_build/sublime/mainwindow.moc:126
#21 0x00007ff308f45cab in KDevelop::MainWindow::qt_metacall (this=0x6e00, _c=28160, _id=6, _a=0xffffffffffffffff)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999_build/shell/mainwindow.moc:90
#22 0x00007ff3083409eb in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#23 0x00007ff30459ccba in Sublime::Area::toolViewAdded (this=0x6e00, _t1=0x3908ec0, _t2=Sublime::Right)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999_build/sublime/area.moc:136
#24 0x00007ff30459d732 in Sublime::Area::addToolView (this=0x229aba0, view=0x3908ec0, defaultPosition=Sublime::Right)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/sublime/area.cpp:240
#25 0x00007ff308f547d2 in KDevelop::UiController::addToolViewToArea (this=0x2221060, factory=0x232ce60, doc=<value optimized out>, area=0x229aba0)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/shell/uicontroller.cpp:593
#26 0x00007ff308f55d95 in KDevelop::UiController::addToolView (this=0x2221060, name=<value optimized out>, factory=0x232ce60)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/shell/uicontroller.cpp:323
#27 0x00007ff308f8cb57 in KDevelop::DocumentationController::initialize (this=0x22c9fc0) at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/shell/documentationcontroller.cpp:67
#28 0x00007ff308f52c2c in KDevelop::CorePrivate::initialize (this=0x7fff8aa3cdf0, mode=<value optimized out>, session=<value optimized out>)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/shell/core.cpp:215
#29 0x00007ff308f53bcd in KDevelop::Core::initialize (splash=0x2203060, mode=KDevelop::Core::Default, session=<value optimized out>)
    at /var/tmp/portage/dev-util/kdevplatform-9999/work/kdevplatform-9999/shell/core.cpp:244
#30 0x000000000040675c in main (argc=<value optimized out>, argv=<value optimized out>) at /var/tmp/portage/dev-util/kdevelop-9999/work/kdevelop-9999/app/main.cpp:258

Reported using DrKonqi
Comment 1 Milian Wolff 2010-09-08 22:07:17 UTC
works fine for me, make sure you have up2date PHP-Docs, KDevelop and KDevplatform.
Comment 2 Milian Wolff 2010-12-24 12:23:15 UTC
commit e37c8086ad35b6654f7488f4fe88484c7c414eba
branch 1.2
Author: Milian Wolff <mail@milianw.de>
Date:   Fri Dec 24 12:22:24 2010 +0100

    don't assert when a plugin gets updated from ProviderProvider to Provider or vice versa and the user forgot to rerun kbuildsycoca4
    
    BUG: 247625

diff --git a/shell/documentationcontroller.cpp b/shell/documentationcontroller.cpp
index dab072e..a998302 100644
--- a/shell/documentationcontroller.cpp
+++ b/shell/documentationcontroller.cpp
@@ -130,14 +130,20 @@ QList< IDocumentationProvider* > DocumentationController::documentationProviders
     foreach(IPlugin* p, pluginsProvider)
     {
         IDocumentationProviderProvider *docProvider=p->extension<IDocumentationProviderProvider>();
-        Q_ASSERT(docProvider);
+        if (!docProvider) {
+            kWarning() << "plugin" << p << "does not implement ProviderProvider extension, rerun kbuildsycoca4";
+            continue;
+        }
         ret.append(docProvider->providers());
     }
     
     foreach(IPlugin* p, plugins)
     {
         IDocumentationProvider *doc=p->extension<IDocumentationProvider>();
-        Q_ASSERT(doc);
+        if (!doc) {
+            kWarning() << "plugin" << p << "does not implement Provider extension, rerun kbuildsycoca4";
+            continue;
+        }
         ret.append(doc);
     }