Bug 183966 - Crashes when adding "#include <" at top of source.
Summary: Crashes when adding "#include <" at top of source.
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-10 23:53 UTC by Peter Fors
Modified: 2009-02-14 00:50 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Fors 2009-02-10 23:53:04 UTC
Version:           KDevelop from trunk #924498 (using Devel)
Compiler:          gcc 4.3.2 added headers for SDL.h and fmod.hpp
OS:                Linux
Installed from:    Compiled sources

I start KDevelop, open up my main.cpp try to add:
#include <
there it crashes, crashdump below.



(gdb) run                                                                 
Starting program: /usr/bin/kdevelop                                       
[Thread debugging using libthread_db enabled]                             
<unknown program name>(1800)/ KDevelop::allocateRepository: The process holding "/home/vital/.kdevduchain/0" with pid 1751 does not exists any more. Re-using the directory.                                                                                                                                                              
<unknown program name>(1800)/ KDevelop::allocateRepository: picked duchain directory "/home/vital/.kdevduchain/0"                                                    
Calling appendChild() on a null node does nothing.                                                                                                                   
Calling appendChild() on a null node does nothing.                                                                                                                   
Calling appendChild() on a null node does nothing.                                                                                                                   
Calling appendChild() on a null node does nothing.                                                                                                                   
Calling appendChild() on a null node does nothing.                                                                                                                   
Calling appendChild() on a null node does nothing.                                                                                                                   
[New Thread 0x7fffe2f92950 (LWP 1803)]                                                                                                                               
[New Thread 0x7fffe16cd950 (LWP 1804)]                                                                                                                               
[New Thread 0x7fffe0ecc950 (LWP 1805)]                                                                                                                               
QObject: Cannot create children for a parent that is in a different thread.                                                                                          
(Parent is CppCodeCompletionModel(0x1461420), parent's thread is QThread(0x60e460), current thread is QThread(0x1449110)                                             
QObject: Cannot create children for a parent that is in a different thread.                                                                                          
(Parent is MissingIncludeCompletionModel(0x145d600), parent's thread is QThread(0x60e460), current thread is QThread(0x14605a0)                                      
[New Thread 0x7fffdbfff950 (LWP 1806)]                                                                                                                               
[New Thread 0x7fffdb7fe950 (LWP 1811)]                                                                                                                               
Calling appendChild() on a null node does nothing.                                                                                                                   
Calling appendChild() on a null node does nothing.                                                                                                                   
Calling appendChild() on a null node does nothing.                                                                                                                   
Calling appendChild() on a null node does nothing.                                                                                                                   
Calling appendChild() on a null node does nothing.                                                                                                                   
Calling appendChild() on a null node does nothing.                                                                                                                   
[New Thread 0x7fffda715950 (LWP 1814)]                                                                                                                               
[New Thread 0x7fffd9f14950 (LWP 1815)]                                                                                                                               
 
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffda715950 (LWP 1814)]     
0x00007ffff1e4f8d0 in KDevelop::TopDUContext::parsingEnvironmentFile() const () from /usr/lib64/libkdevplatformlanguage.so.1
(gdb) thread apply all bt                                                                                                   
 
Thread 8 (Thread 0x7fffd9f14950 (LWP 1815)):
#0  0x00007ffff4aa5d59 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ffff4d15829 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff651c644 in ?? () from /usr/lib64/libthreadweaver.so.4                                    
#3  0x00007ffff651eda3 in ?? () from /usr/lib64/libthreadweaver.so.4                                    
#4  0x00007ffff651edbc in ?? () from /usr/lib64/libthreadweaver.so.4                                    
#5  0x00007ffff651edbc in ?? () from /usr/lib64/libthreadweaver.so.4                                    
#6  0x00007ffff651edbc in ?? () from /usr/lib64/libthreadweaver.so.4                                    
#7  0x00007ffff651d36f in ?? () from /usr/lib64/libthreadweaver.so.4                                    
#8  0x00007ffff651d7c9 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4           
#9  0x00007ffff4d14732 in ?? () from /usr/lib64/libQtCore.so.4                                          
#10 0x00007ffff4aa2070 in start_thread () from /lib64/libpthread.so.0                                   
#11 0x00007ffff326d10d in clone () from /lib64/libc.so.6                                                
#12 0x0000000000000000 in ?? ()                                                                         
 
Thread 7 (Thread 0x7fffda715950 (LWP 1814)):
#0  0x00007ffff1e4f8d0 in KDevelop::TopDUContext::parsingEnvironmentFile() const () from /usr/lib64/libkdevplatformlanguage.so.1
#1  0x00007fffe20abebb in contentFromProxy (ctx={context = {m_topContext = 0x7fffda714a90}, sourceLine = -630109552, temporary = 255})
    at /data/sources/kde4/kdevelop/plugins/languages/cpp/cppparsejob.cpp:353                                                          
#2  0x00007fffe20ace44 in CPPInternalParseJob::run (this=0x23da810) at /data/sources/kde4/kdevelop/plugins/languages/cpp/cppparsejob.cpp:448
#3  0x00007ffff651e04d in ?? () from /usr/lib64/libthreadweaver.so.4                                                                        
#4  0x00007ffff651e351 in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4                         
#5  0x00007ffff651f6f3 in ?? () from /usr/lib64/libthreadweaver.so.4                                                                        
#6  0x00007ffff651d33f in ?? () from /usr/lib64/libthreadweaver.so.4                                                                        
#7  0x00007ffff651d7c9 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4                                               
#8  0x00007ffff4d14732 in ?? () from /usr/lib64/libQtCore.so.4                                                                              
#9  0x00007ffff4aa2070 in start_thread () from /lib64/libpthread.so.0                                                                       
#10 0x00007ffff326d10d in clone () from /lib64/libc.so.6                                                                                    
#11 0x0000000000000000 in ?? ()                                                                                                             
 
Thread 6 (Thread 0x7fffdb7fe950 (LWP 1811)):
#0  0x00007ffff4aa5fdd in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ffff4d14415 in ?? () from /usr/lib64/libQtCore.so.4                              
#2  0x00007ffff4d1457e in QThread::msleep(unsigned long) () from /usr/lib64/libQtCore.so.4  
---Type <return> to continue, or q <return> to quit---                                      
#3  0x00007fffe2098731 in UIBlockTester::UIBlockTesterThread::run (this=0x146aec0) at /data/sources/kde4/kdevelop/plugins/languages/cpp/cpplanguagesupport.cpp:933
#4  0x00007ffff4d14732 in ?? () from /usr/lib64/libQtCore.so.4                                                                                                    
#5  0x00007ffff4aa2070 in start_thread () from /lib64/libpthread.so.0                                                                                             
#6  0x00007ffff326d10d in clone () from /lib64/libc.so.6                                                                                                          
#7  0x0000000000000000 in ?? ()                                                                                                                                   
 
Thread 5 (Thread 0x7fffdbfff950 (LWP 1806)):
#0  0x00007ffff3266662 in select () from /lib64/libc.so.6
#1  0x00007ffff4ddbfe6 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff4d14732 in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007ffff4aa2070 in start_thread () from /lib64/libpthread.so.0
#4  0x00007ffff326d10d in clone () from /lib64/libc.so.6             
#5  0x0000000000000000 in ?? ()                                      
 
Thread 4 (Thread 0x7fffe0ecc950 (LWP 1805)):
#0  0x00007ffff3266662 in select () from /lib64/libc.so.6
#1  0x00007ffff4e2778b in QEventDispatcherUNIX::select(int, fd_set*, fd_set*, fd_set*, timeval*) () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff4e28130 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib64/libQtCore.so.4
#3  0x00007ffff4e2969d in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4            
#4  0x00007ffff4dfc162 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4                      
#5  0x00007ffff4dfc52d in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4                               
#6  0x00007ffff4d11a48 in QThread::exec() () from /usr/lib64/libQtCore.so.4                                                                       
#7  0x00007ffff4d14732 in ?? () from /usr/lib64/libQtCore.so.4                                                                                    
#8  0x00007ffff4aa2070 in start_thread () from /lib64/libpthread.so.0                                                                             
#9  0x00007ffff326d10d in clone () from /lib64/libc.so.6                                                                                          
#10 0x0000000000000000 in ?? ()                                                                                                                   
 
Thread 3 (Thread 0x7fffe16cd950 (LWP 1804)):
#0  0x00007ffff3266662 in select () from /lib64/libc.so.6
#1  0x00007ffff4e2778b in QEventDispatcherUNIX::select(int, fd_set*, fd_set*, fd_set*, timeval*) () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff4e28130 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib64/libQtCore.so.4
#3  0x00007ffff4e2969d in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4            
#4  0x00007ffff4dfc162 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4                      
#5  0x00007ffff4dfc52d in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4                               
#6  0x00007ffff4d11a48 in QThread::exec() () from /usr/lib64/libQtCore.so.4                                                                       
---Type <return> to continue, or q <return> to quit---                                                                                            
#7  0x00007ffff4d14732 in ?? () from /usr/lib64/libQtCore.so.4                                                                                    
#8  0x00007ffff4aa2070 in start_thread () from /lib64/libpthread.so.0                                                                             
#9  0x00007ffff326d10d in clone () from /lib64/libc.so.6                                                                                          
#10 0x0000000000000000 in ?? ()                                                                                                                   
 
Thread 2 (Thread 0x7fffe2f92950 (LWP 1803)):
#0  0x00007ffff4aa5fdd in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ffff4d15807 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007ffff1e39068 in ?? () from /usr/lib64/libkdevplatformlanguage.so.1                            
#3  0x00007ffff4d14732 in ?? () from /usr/lib64/libQtCore.so.4                                          
#4  0x00007ffff4aa2070 in start_thread () from /lib64/libpthread.so.0                                   
#5  0x00007ffff326d10d in clone () from /lib64/libc.so.6                                                
#6  0x0000000000000000 in ?? ()                                                                         
 
Thread 1 (Thread 0x7ffff7fb4750 (LWP 1800)):
#0  0x00007ffff4044025 in ?? () from /usr/lib64/libQtGui.so.4
#1  0x00007ffff40454c9 in QTextEngine::itemize() const () from /usr/lib64/libQtGui.so.4
#2  0x00007ffff404ba5c in QTextLayout::beginLayout() () from /usr/lib64/libQtGui.so.4  
#3  0x00007fffe033cea4 in ?? () from /usr/lib64/kde4/katepart.so                       
#4  0x00007ffff43524a4 in QItemDelegate::paint(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const () from /usr/lib64/libQtGui.so.4
#5  0x00007fffe033c3bb in ?? () from /usr/lib64/kde4/katepart.so                                                                                 
#6  0x00007ffff433e3d8 in QTreeView::drawRow(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const () from /usr/lib64/libQtGui.so.4  
#7  0x00007fffe033de73 in ?? () from /usr/lib64/kde4/katepart.so                                                                                 
#8  0x00007ffff43453b6 in QTreeView::drawTree(QPainter*, QRegion const&) const () from /usr/lib64/libQtGui.so.4                                  
#9  0x00007ffff4345e07 in QTreeView::paintEvent(QPaintEvent*) () from /usr/lib64/libQtGui.so.4                                                   
#10 0x00007ffff3e5aa24 in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4                                                               
#11 0x00007ffff430db3d in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib64/libQtGui.so.4                                             
#12 0x00007ffff43444f0 in QTreeView::viewportEvent(QEvent*) () from /usr/lib64/libQtGui.so.4                                                     
#13 0x00007ffff4dfcbc8 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4            
#14 0x00007ffff3e09c8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4                                 
#15 0x00007ffff3e11eca in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4                                               
#16 0x00007ffff556699b in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#17 0x00007ffff4dfd8cc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#18 0x00007ffff3e61cd5 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /usr/lib64/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#19 0x00007ffff4003f2e in ?? () from /usr/lib64/libQtGui.so.4
#20 0x00007ffff3e533a0 in QWidgetPrivate::syncBackingStore() () from /usr/lib64/libQtGui.so.4
#21 0x00007ffff3e5a8bd in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#22 0x00007ffff3e09cbd in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#23 0x00007ffff3e11eca in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#24 0x00007ffff556699b in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#25 0x00007ffff4dfd8cc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#26 0x00007ffff4dfe48a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQtCore.so.4
#27 0x00007ffff3ea08fd in ?? () from /usr/lib64/libQtGui.so.4
#28 0x00007ffff4dfc162 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#29 0x00007ffff4dfc52d in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#30 0x00007ffff4dfe754 in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#31 0x0000000000407d22 in main (argc=1, argv=0x7fffffffdce8) at /data/sources/kde4/kdevelop/src/main.cpp:203
(gdb)
Comment 1 David Nolden 2009-02-11 00:41:57 UTC
The crash happens deep within Qt. Is it possible that you're using Qt 4.5?
Comment 2 Andreas Pakulat 2009-02-11 07:10:39 UTC
@David: Thats what I thought first too, but the segfault is apparently happening in thread 7 in parsingEnvironmentFile(). At least thats what visible in the output right before the "thread apply all bt".
Comment 3 Peter Fors 2009-02-11 08:02:36 UTC
(In reply to comment #1)
> The crash happens deep within Qt. Is it possible that you're using Qt 4.5?

Yes, I'm running Qt4.5 from OpenSUSE's buildserver.
Comment 4 Julian Bäume 2009-02-13 12:02:19 UTC
I got this crash, too. Using Qt4.5 from openSUSE Build Service. But IIRC this happened to me before I did the upgrade to Qt4.5, too.

What I did is adding <code>#include ""</code> to one of my files. It doesn't crash when it contains an existing file.

Backtrace:
[New Thread 0xae7e8b90 (LWP 27417)]
[New Thread 0xadfe7b90 (LWP 27418)]
9: -1
9: -1
develop(27351)/kdevelop (cpp support) PreprocessJob::run: Could not open file "/home/jb/projects/ktechlab.git/src/dataengines/documentengine/" (path "/home/jb/projects/ktechlab.git/src/dataengines/documentengine/" )

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xae7e8b90 (LWP 27417)]
0xb5de3b19 in KDevelop::TopDUContext::parsingEnvironmentFile() const () from /usr/lib/libkdevplatformlanguage.so.1
(gdb) bt
#0  0xb5de3b19 in KDevelop::TopDUContext::parsingEnvironmentFile() const () from /usr/lib/libkdevplatformlanguage.so.1
#1  0xb1a0cdb8 in contentFromProxy (ctx={context = {m_topContext = 0xae7e8140}, sourceLine = -1367441012, temporary = true})
    at /usr/src/debug/kdevelop-3.9.91/plugins/languages/cpp/cppparsejob.cpp:353
#2  0xb1a10073 in CPPInternalParseJob::run (this=0x9312120) at /usr/src/debug/kdevelop-3.9.91/plugins/languages/cpp/cppparsejob.cpp:448
#3  0xb798d03d in ThreadWeaver::JobRunHelper::runTheJob (this=0xae7e82b8, th=0x8be5a70, job=0x9312120) at /usr/src/debug/kdelibs-4.2.0/threadweaver/Weaver/Job.cpp:106
#4  0xb798d3b9 in ThreadWeaver::Job::execute (this=0x9312120, th=0x8be5a70) at /usr/src/debug/kdelibs-4.2.0/threadweaver/Weaver/Job.cpp:135
#5  0xb798ed43 in ThreadWeaver::JobCollectionJobRunner::execute (this=0x8e44168, t=0x8be5a70) at /usr/src/debug/kdelibs-4.2.0/threadweaver/Weaver/JobCollection.cpp:82
#6  0xb798bfda in ThreadWeaver::ThreadRunHelper::run (this=0xae7e8340, parent=0x81f6710, th=0x8be5a70) at /usr/src/debug/kdelibs-4.2.0/threadweaver/Weaver/Thread.cpp:95
#7  0xb798c64b in ThreadWeaver::Thread::run (this=0x8be5a70) at /usr/src/debug/kdelibs-4.2.0/threadweaver/Weaver/Thread.cpp:142
#8  0xb6df751e in ?? () from /usr/lib/libQtCore.so.4
#9  0xb6d951b5 in start_thread () from /lib/libpthread.so.0
#10 0xb61d23be in clone () from /lib/libc.so.6
Comment 5 Andreas Pakulat 2009-02-13 14:07:48 UTC
Can either of you two please re-test with latest trunk/, David fixed an issue with C++ support last night which tried to access a directory like a header file.
Comment 6 David Nolden 2009-02-14 00:50:40 UTC
As of r924867, this should be impossible to happen.