Bug 52585 - Related to bug 51652 more null check in configure
Summary: Related to bug 51652 more null check in configure
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: kdevelop 2.x (obsolete) (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: KDevelop-Devel List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-04 03:19 UTC by Johan Thelmen
Modified: 2003-01-04 04:08 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 Johan Thelmen 2003-01-04 03:19:07 UTC
Version:           gideon (using KDE KDE 3.0.99)
Installed from:    Debian testing/unstable Packages
Compiler:          gcc version 2.95.4 20011002 (Debian prerelease) 
OS:          Linux

Hej

Thanks for finding my bug http://bugs.kde.org/show_bug.cgi?id=51652
But.. when pressing OK in configure with no Project loaded..

Program received signal SIGSEGV, Segmentation fault
#0  0x40e11036 in QDomDocument::documentElement () from /usr/lib/libqt-mt.so.3
#1  0x4038a225 in DomUtil::elementByPath (doc=@0x0, path=@0xbffff62c) at ../../../lib/util/domutil.cpp:31
#2  0x4038a604 in DomUtil::readListEntry (doc=@0x0, path=@0xbffff62c, tag=@0xbffff628) at ../../../lib/util/domutil.cpp:87
#3  0x417b86ce in DocTreeViewWidget::refresh (this=0x81e06d8) at ../../../parts/doctreeview/doctreeviewwidget.cpp:1169
#4  0x417b90d9 in DocTreeViewWidget::qt_invoke (this=0x81e06d8, _id=45, _o=0xbffff700) at doctreeviewwidget.moc:121
#5  0x40c52a59 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#6  0x40eb2d53 in QSignal::signal () from /usr/lib/libqt-mt.so.3
#7  0x40c68105 in QSignal::activate () from /usr/lib/libqt-mt.so.3
#8  0x40c6d583 in QSingleShotTimer::event () from /usr/lib/libqt-mt.so.3
#9  0x40c00a93 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#10 0x40c00894 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#11 0x408bee5a in KApplication::notify () from /usr/lib/libkdecore.so.4
#12 0x40be3303 in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#13 0x40bc533c in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#14 0x40c121fe in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#15 0x40c1215b in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#16 0x40c00bea in QApplication::exec () from /usr/lib/libqt-mt.so.3
#17 0x08063b09 in main (argc=1, argv=0xbffffc84) at ../../src/main.cpp:79

It works when there is a project. Searching for that refresh, this looks familiar.
Trying to patch..

--- doctreeviewwidget.cpp.org   2003-01-04 00:20:57.000000000 +0100
+++ doctreeviewwidget.cpp       2003-01-04 00:28:11.000000000 +0100
@@ -1166,7 +1166,9 @@

     KStandardDirs *dirs = DocTreeViewFactory::instance()->dirs();
     QStringList tocs = dirs->findAllResources("doctocs", QString::null, false, true);
-    QStringList ignore( DomUtil::readListEntry(*m_part->projectDom(), "/kdevdoctreeview/ignoretocs", "toc") );
+    QDomDocument d;
+    if(m_part->projectDom()) d = *m_part->projectDom();
+    QStringList ignore( DomUtil::readListEntry(d, "/kdevdoctreeview/ignoretocs", "toc") );

     for (QStringList::Iterator tit = tocs.begin(); tit != tocs.end(); ++tit)
     {

dpkg-buildpackage -b -us -uc && cd .. && dpkg -i gideon*.deb
Testing, works for me. Maybe a nullcheck in readListEntry instead?

-- 
Johan Thelm
Comment 1 Caleb Tennis 2003-01-04 04:08:06 UTC
Okay, I patched it in DomUtil.  Hopefully this resolves any related problem.