Version: Kdevelop 3.0.90-CVS (using KDE KDE 3.2.0) Installed from: SuSE RPMs Compiler: gcc (GCC) 3.3.1 (SuSE Linux) ./configure --prefix=/opt/kde3 --sysconfdir=/etc --enable-autoproject --enable-scriptproject --enable-trollproject --enable-customproject --enable-cvs --with-qtdoc-dir=/usr/lib/qt3/doc/html --with-extra-libs=/srv/www/modules:/opt/kde3/lib:/usr/lib/qt3/lib --with-extra-includes=/opt/kde3/include:/usr/lib/qt3/include --enable-kate --enable-kdbg --enable-kwrite --enable-quanta --enable-perforce --enable-clearcase --enable-nmcheck --enable-closure OS: Linux Application crashes if onClick the Documentation SiteBar. [New Thread 16384 (LWP 28137)] [New Thread 32769 (LWP 28142)] [New Thread 16384 (LWP 28137)] [New Thread 32769 (LWP 28142)] [New Thread 16384 (LWP 28137)] [New Thread 32769 (LWP 28142)] [New Thread 16386 (LWP 28143)] 0x41912ab6 in waitpid () from /lib/i686/libpthread.so.0 #0 0x41912ab6 in waitpid () from /lib/i686/libpthread.so.0 #1 0x40e1ea7a in KCrash::defaultCrashHandler(int) () from /opt/kde3/lib/libkdecore.so.4 #2 0x4191196c in __pthread_sighandler () from /lib/i686/libpthread.so.0 #3 <signal handler called> #4 0x40f8650c in KStyle::drawComplexControl(QStyle::ComplexControl, QPainter*, QWidget const*, QRect const&, QColorGroup const&, unsigned, unsigned, unsigned, QStyleOption const&) const () from /opt/kde3/lib/libkdefx.so.4 #5 0x41c7f65e in LiquidStyle::drawComplexControl(QStyle::ComplexControl, QPainter*, QWidget const*, QRect const&, QColorGroup const&, unsigned, unsigned, unsigned, QStyleOption const&) const () from /opt/kde3/lib/kde3/plugins/styles/liquid.so #6 0x41334393 in QListViewItem::paintBranches(QPainter*, QColorGroup const&, int, int, int) () from /usr/lib/qt3/lib/libqt-mt.so.3 #7 0x41335e50 in QListView::drawContentsOffset(QPainter*, int, int, int, int, int, int) () from /usr/lib/qt3/lib/libqt-mt.so.3 #8 0x4136bd15 in QScrollView::viewportPaintEvent(QPaintEvent*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #9 0x40b65d24 in KListView::viewportPaintEvent(QPaintEvent*) () from /opt/kde3/lib/libkdeui.so.4 #10 0x4136b92c in QScrollView::eventFilter(QObject*, QEvent*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #11 0x41338b78 in QListView::eventFilter(QObject*, QEvent*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #12 0x4125403e in QObject::activate_filters(QEvent*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #13 0x41253f30 in QObject::event(QEvent*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #14 0x4128d97f in QWidget::event(QEvent*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #15 0x411f5776 in QApplication::internalNotify(QObject*, QEvent*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #16 0x411f4a9e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #17 0x40d9e464 in KApplication::notify(QObject*, QEvent*) () from /opt/kde3/lib/libkdecore.so.4 #18 0x411bc5e9 in QWidget::repaint(int, int, int, int, bool) () from /usr/lib/qt3/lib/libqt-mt.so.3 #19 0x4128ecdb in QWidget::repaint(bool) () from /usr/lib/qt3/lib/libqt-mt.so.3 #20 0x41337fc3 in QListView::handleSizeChange(int, int, int) () from /usr/lib/qt3/lib/libqt-mt.so.3 #21 0x415ab10f in QListView::qt_invoke(int, QUObject*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #22 0x40b69663 in KListView::qt_invoke(int, QUObject*) () from /opt/kde3/lib/libkdeui.so.4 #23 0x412568bb in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #24 0x415a4f2c in QHeader::sizeChange(int, int, int) () from /usr/lib/qt3/lib/libqt-mt.so.3 #25 0x41311821 in QHeader::adjustHeaderSize(int) () from /usr/lib/qt3/lib/libqt-mt.so.3 #26 0x41311656 in QHeader::resizeEvent(QResizeEvent*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #27 0x4128dec4 in QWidget::event(QEvent*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #28 0x411f5776 in QApplication::internalNotify(QObject*, QEvent*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #29 0x411f4a9e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #30 0x40d9e464 in KApplication::notify(QObject*, QEvent*) () from /opt/kde3/lib/libkdecore.so.4 #31 0x411f66a1 in QApplication::sendPostedEvents(QObject*, int) () from /usr/lib/qt3/lib/libqt-mt.so.3 #32 0x411f6426 in QApplication::sendPostedEvents() () from /usr/lib/qt3/lib/libqt-mt.so.3 #33 0x4119b4fd in QEventLoop::processEvents(unsigned) () from /usr/lib/qt3/lib/libqt-mt.so.3 #34 0x412081d0 in QEventLoop::enterLoop() () from /usr/lib/qt3/lib/libqt-mt.so.3 #35 0x412080c6 in QEventLoop::exec() () from /usr/lib/qt3/lib/libqt-mt.so.3 #36 0x411f5a0f in QApplication::exec() () from /usr/lib/qt3/lib/libqt-mt.so.3 #37 0x080649dc in main ()
Dupe *** This bug has been marked as a duplicate of 69441 ***
Ok, Sorry i didn't find it in Bug Search.
Opening again. Yes, this is another KStyle related problem, but at least I know how to fix it ;) If you replace DocTreeViewWidget::projectChanged method with void DocTreeViewWidget::projectChanged(KDevProject *project) { folder_project->setProject(project); QTimer::singleShot(0, this, SLOT(refresh())); } you will fix the bug :) The only reason I haven't commited yet is that this introduce a large delay during opening a project. Also it crashes only with Qt>=3.3beta. It seems that if we use QListView::takeItem then for some reason the crash in KStyle occurs when repainting the listview.
Reproducable for me when I open a project, close it, then open same or other project and click on documentation tool button.
*** Bug 77728 has been marked as a duplicate of this bug. ***
I've encountered a very similar problem except in QWindowsStyle::drawComplexControl(). Causes crashes on open or close of a new project only when the documentation tab is showing. The following patch (against Qt) is a band-aid for the problem. Please pass it on to the Trolltech guys if you think it worthwhile. (debug kernel 2.6.3.2.1.258-2-1, KDE 3.2.1, Fedora Core 2 test 1 Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --disable-libunwind-exceptions --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux Thread model: posix gcc version 3.3.3 20040311 (Red Hat Linux 3.3.3-3) --- qwindowsstyle.cpp 2004-02-18 08:22:55.000000000 -0500 +++ qwindowsstyle.cpp.backup 2004-03-20 20:09:52.576762328 -0500 @@ -1624,7 +1624,16 @@ } else { int linetop = 0, linebot = 0; + int numchildren = 0; // each branch needs at most two lines, ie. four end points dotoffset = (item->itemPos() + item->height() - y) %2; - dotlines.resize( item->childCount() * 4 ); + numchildren = item->childCount(); + if (numchildren < 0) { + printf("QWindowsStyle::drawComplexControl: Bogus number of child items (%d) in listview\n",numchildren); + numchildren = 0; + } + dotlines.resize( numchildren * 4 ); + if (numchildren == 0) { + child = NULL; + } c = 0;
Oop! I should also mention that was Qt 3.3.1.
*** Bug 78605 has been marked as a duplicate of this bug. ***
Was just looking at the other bug originally sited as a duplicate. I should add that the crash is happening because a bad ListViewItem is being passed down. The drawComplexControl() method retrieves a negative (or otherwise out-of-range) value for the item's number of children and blows up since it doesn't perform a check. My patch above fixes the blowup but it doesn't address the bad item that's being passed.
I think the problem is our use of the takeItem() method. (See http://doc.trolltech.com/3.3/qlistviewitem.html#takeItem ) The method is known to leave the listviewitem in an "unsafe state". Apparently, the style drawing code doesn't always (ever?) handle this safely. Maybe this is a bug in the drawing code, but we're not likely to get the fix into all 20+ qt/kde-styles that exist.. I guess our best option is to work around the problem in our code.
Created attachment 5454 [details] Patch from comment #6 as an attachment. After trying to reapply the above patch (I'd lost the original) I determined that pasting it in here caused it to be mangled into unusability so I provide it again as an attachment.
If any additional help: qt-3.3.1, KDE-3.2.1, kdevelop-HEAD-2004/03/30 Open/create simple c project (c++, qmake seem to work), open documentation, crash. -- gdb-- kdevelop (cpp support): newly parsing... kdevelop (cpp support): updating sourceinfo kdevelop: ClassViewPart::refresh kmdi: KMdiDockContainer::tabClicked() kmdi: KMdiFocusList::addWidgetTree: adding toplevel kmdi: KMdiFocusList::addWidgetTree: adding toplevel kmdi: KMdiFocusList::addWidgetTree: adding widget kmdi: KMdiFocusList::addWidgetTree: adding widget kmdi: KMdiFocusList::addWidgetTree: adding widget kmdi: KMdiFocusList::addWidgetTree: adding widget kmdi: KMdiFocusList::addWidgetTree: adding widget kmdi: KMdiFocusList::addWidgetTree: adding widget QGArray::at: Absolute index 0 out of range Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 9673)] 0x410acc53 in KStyle::drawComplexControl(QStyle::ComplexControl, QPainter*, QWidget const*, QRect const&, QColorGroup const&, unsigned, unsigned, unsigned, QStyleOption const&) const (this=0x8179ac0, control=CC_ListView, p=0xbfffe280, widget=0x82f2808, r=@0xbfffe010, cg=@0x8177c64, flags=1, controls=6, active=0, opt=@0xbfffdfd0) at kstyle.cpp:1215 1215 dotlines[c++] = QPoint( bx, linetop ); --backtrace (truncated)-- backtrace: #0 0x410acc53 in KStyle::drawComplexControl(QStyle::ComplexControl, QPainter*, QWidget const*, QRect const&, QColorGroup const&, unsigned, unsigned, unsigned, QStyleOption const&) const (this=0x8179ac0, control=CC_ListView, p=0xbfffe280, widget=0x82f2808, r=@0xbfffe010, cg=@0x8177c64, flags=1, controls=6, active=0, opt=@0xbfffdfd0) at kstyle.cpp:1215 #1 0x4206497b in KeramikStyle::drawComplexControl(QStyle::ComplexControl, QPainter*, QWidget const*, QRect const&, QColorGroup const&, unsigned, unsigned, unsigned, QStyleOption const&) const (this=0x8179ac0, control=CC_ListView, p=0xbfffe280, widget=0x82f2808, r=@0xbfffe010, cg=@0x8177c64, flags=1, controls=6, active=0, opt=@0xbfffdfd0) at keramik.cpp:2291 #2 0x414dc6f5 in QListViewItem::paintBranches(QPainter*, QColorGroup const&, int, int, int) (this=0x82f31a0, p=0xbfffe280, cg=@0x8177c64, w=20, y=0, h=108) at widgets/qlistview.cpp:2240 #3 0x414df4e4 in QListView::drawContentsOffset(QPainter*, int, int, int, int, int, int) (this=0x82f2808, p=0xbfffe280, ox=0, oy=0, cx=0, cy=0, cw=21, ch=750) at widgets/qlistview.cpp:3004 #4 0x4151e3bd in QScrollView::viewportPaintEvent(QPaintEvent*) ( this=0x82f2808, pe=0xbfffe970) at widgets/qscrollview.cpp:1704 #5 0x40c8f79d in KListView::viewportPaintEvent(QPaintEvent*) (this=0x82f2808, e=0xbfffe970) at klistview.cpp:1882 #6 0x4151db3f in QScrollView::eventFilter(QObject*, QEvent*) (this=0x82f2808, obj=0x82f66e8, e=0xbfffe970) at widgets/qscrollview.cpp:1490 #7 0x414e22b7 in QListView::eventFilter(QObject*, QEvent*) (this=0x82f2808, o=0x82f66e8, e=0xbfffe970) at widgets/qlistview.cpp:3827 #8 0x413cd465 in QObject::activate_filters(QEvent*) (this=0x82f66e8, e=0xbfffe970) at kernel/qobject.cpp:902
If anable all documents in all colections in "Project options"->"Project Documentation" this bug disapire. Kdevelop crashes onli if some documentation disabled.
*** Bug 76921 has been marked as a duplicate of this bug. ***
I must confirm this. My KDevelop 3.0.1 on KDE 3.2.0 (Mandrake Linux 10) craches when I: open new project - "Sample KDE Application" close that project open new project - "Sample KDE Application" click Documentation on the left side -> CRASH
*** Bug 79672 has been marked as a duplicate of this bug. ***
Fixed in HEAD. New documentation viewer is not vulnerable to this problem.
*** Bug 69441 has been marked as a duplicate of this bug. ***
*** Bug 81997 has been marked as a duplicate of this bug. ***
*** Bug 82490 has been marked as a duplicate of this bug. ***