Version: 3.1 (using KDE Devel) Installed from: Compiled sources Compiler: gcc (GCC) 3.3.4 OS: Linux Well, this one is certainly strange: If I close any project by
Whoops, pressed tab+space. If I close any project by - closing kdevelop - opening a new project - choosing "close project" from the project menu kdevelop hangs. Plus some other apps like konqueror. I also tried dcop - it also hangs. Killing kdevelop (temporarily) solves the problem and everything else starts working again.
I can confirm this in HEAD.
Recompiled kdevelop HEAD with debug and everything; this is the output I get (I hope it formats well...): kdevelop (core): dcop emitting project closed kio (KDirWatch): WARNING: KDirWatch::removeDir can't handle '' kdevelop (cpp support): projectClosed( ) kdevelop (core): [void PartController::slotActivePartChanged(KParts::Part*)] kdevelop (abbrev): AbbrevPart::slotActivePartChanged() kdevelop: KonsoleViewWidget::activePartChanged() kdevelop: ===> Changing dir to /work/programming/siedler/ksiedler kdevelop: KonsoleViewWidget::setDirectory() kdevelop: ===> part is 0 qeditor: CppSupportPart::activePartChanged() kdevelop: ClassViewPart::activePartChanged() kdevelop (cpp support): CppCodeCompletion::slotActivePartChanged() kdevelop (debugger): GDBController::slotStopDebugger() called kdevelop (debugger): Disassemble widget active: false kdevelop (cpp support): DistpartPart::~DistpartPart() kdevelop (core): [virtual void NewMainWindow::removeView(QWidget*)] - view: [BookmarksWidget pointer (0x8621b78) to widget bookmarks widget, geometry=118x80+0+12] kdevelop (core): parentWidget: [KDockWidget pointer (0x85bd648) to widget bookmarks widget, geometry=118x92+0+0] kdevelop (core): [virtual void NewMainWindow::removeView(QWidget*)] - view: [ClassViewWidget pointer (0x863c538) to widget ClassViewWidget, geometry=118x80+0+12] kdevelop (core): parentWidget: [KDockWidget pointer (0x8625970) to widget ClassViewWidget, geometry=118x92+0+0] kdevelop (core): [virtual void NewMainWindow::removeView(QWidget*)] - view: [FileGroupsWidget pointer (0x8662668) to widget file view widget, geometry=118x80+0+12] kdevelop (core): parentWidget: [KDockWidget pointer (0x86676c8) to widget file view widget, geometry=118x92+0+0] kdevelop (core): [virtual void NewMainWindow::removeView(QWidget*)] - view: [GDBDebugger::VariableWidget pointer (0x8672348) to widget variablewidget, geometry=172x135+0+12] kdevelop (core): parentWidget: [KDockWidget pointer (0x86713e8) to widget variablewidget, geometry=172x147+0+0] kdevelop (core): [virtual void NewMainWindow::removeView(QWidget*)] - view: [GDBDebugger::GDBBreakpointWidget pointer (0x8686ed0) to widget gdbBreakpointWidget, geometry=140x84+0+12] kdevelop (core): parentWidget: [KDockWidget pointer (0x868a6f0) to widget gdbBreakpointWidget, geometry=140x96+0+0] kdevelop (core): [virtual void NewMainWindow::removeView(QWidget*)] - view: [GDBDebugger::FramestackWidget pointer (0x8694378) to widget framestackWidget, geometry=800x480+0+0] kdevelop (core): [virtual void NewMainWindow::removeView(QWidget*)] - view: [GDBDebugger::DisassembleWidget pointer (0x869b0e0) to widget disassembleWidget, geometry=800x480+0+0] kdevelop (core): [virtual void NewMainWindow::removeView(QWidget*)] - view: [GDBDebugger::GDBOutputWidget pointer (0x86bf370) to widget gdbOutputWidget, geometry=800x480+0+0] kdevelop (core): [virtual void NewMainWindow::removeView(QWidget*)] - view: [CTags2Widget pointer (0x86da2a8) to widget CTags2WidgetBase, geometry=483x118+0+12] kdevelop (core): parentWidget: [KDockWidget pointer (0x86e0548) to widget CTags2WidgetBase, geometry=483x130+0+0] kdevelop (core): [virtual void NewMainWindow::removeView(QWidget*)] - view: [PartWidget pointer (0x870b0f0) to widget fileviewpartwidget, geometry=118x106+0+12] kdevelop (core): parentWidget: [KDockWidget pointer (0x87152b8) to widget fileviewpartwidget, geometry=118x118+0+0] kdevelop (file view): FileTreeWidget::~FileTreeWidget() kdevelop (file view): StdFileTreeWidgetImpl::~StdFileTreeWidgetImpl() kdevelop (file view): FileTreeViewWidgetImpl::~FileTreeViewWidgetImpl() kdevelop (core): Language support for KDevCppSupport unloading... kdevelop (cpp support): !!!!!!!!!!!!!!!!!! BG PARSER DESTROYED !!!!!!!!!!!! After that, it hangs. I haven't looked at the code yet, but I think the excessive exclamation marks might indicate a problem ;)
In src/projectmanager.cpp, ~line 351 in the public slot bool closeProject( bool exiting = false ) execution does not return from the function call unloadLanguageSupport(); ...investigating further.
This seems to be caused by some kind of deadlock in languages/cpp/backgroundparser.cpp in the public member function void close() In particular, we are stuck in this loop: while (running()) { sleep(1); } Can somebody who wrote this, comment on it? Thanks in advance
I have exactly the same bug with version kdevelop 3.1.0 have any idea how to workaround this bug? It is really annoying. Thanks
Whilst playing around and adding more random kdDebug() statements, it suddenly worked. Consider this an ultra-dodgy workaround - I have no idea why is should work. Perhaps a compiler bug; the extra kdDebug() force gcc to generate different code? I really have no idea. I guess (I haven't tried yet) you need to configure with --enable-debug for this to work...
Created attachment 7324 [details] Black magic patch, do not apply for real I somebody could confirm if this works for other configurations, and more importantly, WHY...
Created attachment 7325 [details] Sane Patch Calling QThread::exit() at the end of run() is unnecessary, I think. The QT docs state that returning is enough to terminate the thread and will also wake up anybody waiting for that. This makes it work, even without debug. Somebody with cvs access, please review & apply.
no, my kdevelop still crash even with this patch applied :(
after --enable-debug and recompile, no crash any more when closing project! Even without the patch!
The Patch fixed the problem for me. I think i still had --enable-debug=full on though, not sure if that matters.
With a week (or so) old SVN co from branch 3.5 I have this freeze problem upon exit/close project too. Here's my bt: #0 0x0029c402 in ?? () #1 0x0040da1c in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0x0234fb80 in QThread::exit () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #3 0x0234fbee in QThread::sleep () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #4 0x0107b5c6 in BackgroundParser::close () from /opt/kde/cvs/lib/kde3/libkdevcppsupport.so #5 0x01049db2 in CppSupportPart::~CppSupportPart$delete () from /opt/kde/cvs/lib/kde3/libkdevcppsupport.so #6 0x069b357c in ProjectManager::unloadLanguageSupport () from /opt/kde/cvs/lib/libkdevshell.so.0 #7 0x069b502f in ProjectManager::closeProject () from /opt/kde/cvs/lib/libkdevshell.so.0 #8 0x069b8d31 in ProjectManager::qt_invoke () from /opt/kde/cvs/lib/libkdevshell.so.0 #9 0x023bbdb4 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #10 0x023bc274 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #11 0x063f4eb3 in KAction::activated (this=0x97ba028) at /home/engin/kdev/kde-svn/KDE/3.5/kdelibs/kdeui/kaction.moc:176 #12 0x063f5cd9 in KAction::slotActivated (this=0x97ba028) at /home/engin/kdev/kde-svn/KDE/3.5/kdelibs/kdeui/kaction.cpp:1102 #13 0x063f8e71 in KAction::slotPopupActivated (this=0x97ba028) at /home/engin/kdev/kde-svn/KDE/3.5/kdelibs/kdeui/kaction.cpp:1129 #14 0x063f91f5 in KAction::qt_invoke (this=0x97ba028, _id=16, _o=0xbfc6a134) at /home/engin/kdev/kde-svn/KDE/3.5/kdelibs/kdeui/kaction.moc:219 #15 0x023bbdb4 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #16 0x02730796 in QSignal::signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #17 0x023d9633 in QSignal::activate () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #18 0x024d0582 in QPopupMenu::mouseReleaseEvent () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #19 0x063e34f3 in KPopupMenu::mouseReleaseEvent (this=0x97d66e0, e=0xbfc6a664) at /home/engin/kdev/kde-svn/KDE/3.5/kdelibs/kdeui/kpopupmenu.cpp:511 #20 0x023fa127 in QWidget::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #21 0x0235708d in QApplication::internalNotify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #22 0x02357fef in QApplication::notify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #23 0x060ecf1e in KApplication::notify (this=0xbfc6aa14, receiver=0x97d66e0, event=0xbfc6a664) at /home/engin/kdev/kde-svn/KDE/3.5/kdelibs/kdecore/kapplication.cpp:550 #24 0x022eeb0d in QETWidget::translateMouseEvent () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #25 0x022eceb3 in QApplication::x11ProcessEvent () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #26 0x02300fc8 in QEventLoop::processEvents () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #27 0x0236f732 in QEventLoop::enterLoop () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #28 0x0236f656 in QEventLoop::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #29 0x02356a59 in QApplication::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #30 0x0804e157 in main ()
I just downloaded and built kdevelop 3.3 and kde 3.5 via konstruct using standard all default garconf build options/flags. I have the same problem with kdevelop hanging after closing a C project or quiting kdevelop with an open C project. Applying the "Sane Patch" and rebuilding kdevelop fixed hanging problem. Case closed in my book, I can continue on to enjoy kde3.5 & kdevelop. Kashif
SVN commit 518688 by dymo: Applied patch from Florian Schanda: don't crash at exit. BUG: 88091 M +2 -1 backgroundparser.cpp --- branches/kdevelop/3.4/languages/cpp/backgroundparser.cpp #518687:518688 @@ -399,7 +399,8 @@ kdDebug( 9007 ) << "!!!!!!!!!!!!!!!!!! BG PARSER DESTROYED !!!!!!!!!!!!" << endl; - QThread::exit(); +// adymo: commented to fix #88091 +// QThread::exit(); } //kate: indent-mode csands; tab-width 4; space-indent off;