Bug 290531 - Kdevelop segmentation fault in background syntax processor [PreprocessJob::headerSectionEndedInternal]
Summary: Kdevelop segmentation fault in background syntax processor [PreprocessJob::he...
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 4.5.1
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 338653 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-03 20:55 UTC by Patrick Nicolas
Modified: 2017-07-07 09:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (29.35 KB, text/plain)
2013-09-21 05:20 UTC, Daniel Schaal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Nicolas 2012-01-03 20:55:28 UTC
Application: kdevelop (4.2.2)
KDE Platform Version: 4.7.3 (4.7.3)
Qt Version: 4.7.4
Operating System: Linux 3.1.6-gentoo x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
- Custom settings of the application:
The background syntax processor is enabled

The attached backtrace is without Gentoo's "debug" compilation option (apparently release configuration)
Enabling debug mode gives the following error:
ASSERT: "d" in file /usr/include/ksharedptr.h, line 126
ie: inline T* operator->() { Q_ASSERT(d); return d; }
Then kdevelop exits with signal 6, and I don't get a backtrace...

additional info:
kdelibs is version 4.7.3
qt is version 4.7.4

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fa96c8f1760 (LWP 17424))]

Thread 11 (Thread 0x7fa95ce6b700 (LWP 17425)):
#0  0x00007fa969a6db93 in poll () from /lib64/libc.so.6
#1  0x00007fa9647135c4 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fa964713dfa in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fa95d5bb886 in ?? () from /usr/lib64/libgio-2.0.so.0
#4  0x00007fa96473a536 in ?? () from /usr/lib64/libglib-2.0.so.0
#5  0x00007fa969784d0c in start_thread () from /lib64/libpthread.so.0
#6  0x00007fa969a7690d in clone () from /lib64/libc.so.6

Thread 10 (Thread 0x7fa9499f9700 (LWP 17428)):
#0  0x00007fa969a70193 in select () from /lib64/libc.so.6
#1  0x00007fa96ae2d6cc in ?? () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007fa96ad64fe5 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007fa969784d0c in start_thread () from /lib64/libpthread.so.0
#4  0x00007fa969a7690d in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7fa94224b700 (LWP 17472)):
#0  0x00007fa969a6db93 in poll () from /lib64/libc.so.6
#1  0x00007fa9647135c4 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fa964713a81 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fa96ae77cff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fa96ae4c182 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007fa96ae4c3c4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007fa96ad627a4 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007fa967400281 in KDevelop::CompletionWorkerThread::run (this=0x2930950) at /usr/src/debug/dev-util/kdevplatform-1.2.2/kdevplatform-1.2.2/language/codecompletion/codecompletionmodel.cpp:80
#8  0x00007fa96ad64fe5 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007fa969784d0c in start_thread () from /lib64/libpthread.so.0
#10 0x00007fa969a7690d in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7fa941a4a700 (LWP 17473)):
#0  0x00007fa969a6db93 in poll () from /lib64/libc.so.6
#1  0x00007fa9647135c4 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fa964713a81 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fa96ae77cff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fa96ae4c182 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007fa96ae4c3c4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007fa96ad627a4 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007fa967400281 in KDevelop::CompletionWorkerThread::run (this=0x287de00) at /usr/src/debug/dev-util/kdevplatform-1.2.2/kdevplatform-1.2.2/language/codecompletion/codecompletionmodel.cpp:80
#8  0x00007fa96ad64fe5 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007fa969784d0c in start_thread () from /lib64/libpthread.so.0
#10 0x00007fa969a7690d in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7fa93bfff700 (LWP 17511)):
#0  0x00007fa96978954c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fa94c5f9ad4 in ?? () from /usr/lib64/qt4/libQtScript.so.4
#2  0x00007fa94c5f9b09 in ?? () from /usr/lib64/qt4/libQtScript.so.4
#3  0x00007fa969784d0c in start_thread () from /lib64/libpthread.so.0
#4  0x00007fa969a7690d in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fa93b7fe700 (LWP 17538)):
#0  0x00007fa969a6db93 in poll () from /lib64/libc.so.6
#1  0x00007fa9647135c4 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fa964713a81 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fa96ae77cff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fa96ae4c182 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007fa96ae4c3c4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007fa96ad627a4 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007fa96ae2de08 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007fa96ad64fe5 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007fa969784d0c in start_thread () from /lib64/libpthread.so.0
#10 0x00007fa969a7690d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fa9321dd700 (LWP 17563)):
#0  0x00007fa96978954c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fa961cfa564 in ?? () from /usr/lib64/qt4/libQtWebKit.so.4
#2  0x00007fa969784d0c in start_thread () from /lib64/libpthread.so.0
#3  0x00007fa969a7690d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fa9318dc700 (LWP 17564)):
#0  0x00007fa969a6db93 in poll () from /lib64/libc.so.6
#1  0x00007fa9647135c4 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fa964713a81 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fa96ae77cff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fa96ae4c182 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007fa96ae4c3c4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007fa96ad627a4 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007fa96ad64fe5 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007fa969784d0c in start_thread () from /lib64/libpthread.so.0
#9  0x00007fa969a7690d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fa930350700 (LWP 17601)):
#0  0x00007fa96978954c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fa96ad656cb in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007fa962554fa4 in ?? () from /usr/lib64/libthreadweaver.so.4
#3  0x00007fa962557603 in ?? () from /usr/lib64/libthreadweaver.so.4
#4  0x00007fa96255761c in ?? () from /usr/lib64/libthreadweaver.so.4
#5  0x00007fa96255761c in ?? () from /usr/lib64/libthreadweaver.so.4
#6  0x00007fa96255640f in ?? () from /usr/lib64/libthreadweaver.so.4
#7  0x00007fa962556498 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#8  0x00007fa96ad64fe5 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007fa969784d0c in start_thread () from /lib64/libpthread.so.0
#10 0x00007fa969a7690d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fa92fb4f700 (LWP 17602)):
[KCrash Handler]
#6  0x00007fa942a8f29d in PreprocessJob::headerSectionEndedInternal (this=0x40fd730, stream=0x7fa92fb4d780) at /usr/src/debug/dev-util/kdevelop-4.2.2/kdevelop-4.2.2/languages/cpp/preprocessjob.cpp:387
#7  0x00007fa942a8ecdd in PreprocessJob::headerSectionEnded (this=0x40fd730, stream=...) at /usr/src/debug/dev-util/kdevelop-4.2.2/kdevelop-4.2.2/languages/cpp/preprocessjob.cpp:330
#8  0x00007fa942826046 in rpp::pp_macro_expander::operator() (this=0x7fa92fb4d898, input=..., output=..., substitute=false, table=0x0) at /usr/src/debug/dev-util/kdevelop-4.2.2/kdevelop-4.2.2/languages/cpp/parser/rpp/pp-macro-expander.cpp:302
#9  0x00007fa94282fd25 in rpp::pp::operator() (this=0x7fa92fb4d890, input=..., output=...) at /usr/src/debug/dev-util/kdevelop-4.2.2/kdevelop-4.2.2/languages/cpp/parser/rpp/pp-engine.cpp:281
#10 0x00007fa94282eac5 in rpp::pp::processFileInternal (this=0x7fa92fb4d890, fileName=..., fileContents=..., result=...) at /usr/src/debug/dev-util/kdevelop-4.2.2/kdevelop-4.2.2/languages/cpp/parser/rpp/pp-engine.cpp:98
#11 0x00007fa94282e976 in rpp::pp::processFile (this=0x7fa92fb4d890, fileName=..., data=...) at /usr/src/debug/dev-util/kdevelop-4.2.2/kdevelop-4.2.2/languages/cpp/parser/rpp/pp-engine.cpp:85
#12 0x00007fa942a8e2c8 in PreprocessJob::run (this=0x40fd730) at /usr/src/debug/dev-util/kdevelop-4.2.2/kdevelop-4.2.2/languages/cpp/preprocessjob.cpp:259
#13 0x00007fa962556ae1 in ?? () from /usr/lib64/libthreadweaver.so.4
#14 0x00007fa962556c1e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#15 0x00007fa962557ec3 in ?? () from /usr/lib64/libthreadweaver.so.4
#16 0x00007fa9625563df in ?? () from /usr/lib64/libthreadweaver.so.4
#17 0x00007fa962556498 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#18 0x00007fa96ad64fe5 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#19 0x00007fa969784d0c in start_thread () from /lib64/libpthread.so.0
#20 0x00007fa969a7690d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fa96c8f1760 (LWP 17424)):
#0  0x00007fa96978954c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fa96ad656cb in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007fa96ad64791 in QThread::wait(unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007fa96ae2d0c0 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fa9699d2471 in ?? () from /lib64/libc.so.6
#5  0x00007fa9699d24c5 in exit () from /lib64/libc.so.6
#6  0x00007fa957566c56 in ?? () from /usr/lib64/libgdk-x11-2.0.so.0
#7  0x00007fa96b64f358 in KApplication::xioErrhandler(_XDisplay*) () from /usr/lib64/libkdeui.so.5
#8  0x00007fa965fd226e in _XIOError () from /usr/lib64/libX11.so.6
#9  0x00007fa965fcfa6d in _XEventsQueued () from /usr/lib64/libX11.so.6
#10 0x00007fa965fc02df in XEventsQueued () from /usr/lib64/libX11.so.6
#11 0x00007fa96a2a259c in ?? () from /usr/lib64/qt4/libQtGui.so.4
#12 0x00007fa964712d7b in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#13 0x00007fa9647135e2 in ?? () from /usr/lib64/libglib-2.0.so.0
#14 0x00007fa964713a81 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#15 0x00007fa96ae77cff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#16 0x00007fa96a2a274e in ?? () from /usr/lib64/qt4/libQtGui.so.4
#17 0x00007fa96ae4c182 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#18 0x00007fa96ae4c3c4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#19 0x00007fa96ae5081b in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#20 0x000000000040b9d9 in main (argc=1, argv=0x7fff4506d808) at /usr/src/debug/dev-util/kdevelop-4.2.2/kdevelop-4.2.2/app/main.cpp:467

Possible duplicates by query: bug 236411.

Reported using DrKonqi
Comment 1 Patrick Nicolas 2012-01-14 16:36:28 UTC
The problem comes from a corrupt ~/.local/share/mime folder.
Unfortunately I have deleted the folder... I will see if I have a backup somewhere if you need to reproduce
Comment 2 Kevin Funk 2012-12-01 21:14:37 UTC
Marking as invalid for now, reopen if you wish.
Comment 3 Daniel Schaal 2013-09-21 05:20:23 UTC
Created attachment 82434 [details]
New crash information added by DrKonqi

kdevelop (4.5.1) on KDE Platform 4.10.5 using Qt 4.8.6

I have a similar backtrace when trying to open quassel sources (https://github.com/quassel/quassel) as a project.

-- Backtrace (Reduced):
#6  0x00007f6be88ac474 in PreprocessJob::headerSectionEndedInternal (this=0x55e6470, stream=0x7f6cc982ca40) at ../../../languages/cpp/preprocessjob.cpp:373
#7  0x00007f6be8657183 in rpp::pp_macro_expander::operator() (this=this@entry=0x7f6cc982cc08, input=..., output=..., substitute=substitute@entry=false, table=table@entry=0x0) at ../../../../../languages/cpp/parser/rpp/pp-macro-expander.cpp:302
#8  0x00007f6be8666237 in rpp::pp::operator() (this=this@entry=0x7f6cc982cc00, input=..., output=...) at ../../../../../languages/cpp/parser/rpp/pp-engine.cpp:287
#9  0x00007f6be8666610 in rpp::pp::processFileInternal (this=this@entry=0x7f6cc982cc00, fileName=..., fileContents=..., result=...) at ../../../../../languages/cpp/parser/rpp/pp-engine.cpp:98
#10 0x00007f6be8666986 in rpp::pp::processFile (this=this@entry=0x7f6cc982cc00, fileName=..., data=...) at ../../../../../languages/cpp/parser/rpp/pp-engine.cpp:85
Comment 4 Daniel Schaal 2013-09-21 05:22:53 UTC
Also tried deleting ~/.local/share/mime, which didn't help
Comment 5 Kevin Funk 2016-03-09 08:27:39 UTC
*** Bug 338653 has been marked as a duplicate of this bug. ***
Comment 6 Kevin Funk 2017-07-07 09:23:47 UTC
Hello!

We are working on a new clang-based C/C++ language plugin for KDevelop 5 which
supersedes the old C++ plugin in KDevelop 4. See e.g.:
https://www.kdevelop.org/news/first-beta-release-kdevelop-500-available

Due to a lack of manpower, we cannot fix bugs in the old C++ plugin. We rather
want to supply a good Clang based C++ experience for KDevelop 5 than wasting
our time on the legacy C++ support for KDevelop 4.

With the new clang-based C/C++ language plugin, the bug presented here does not
occur. In my testing. For these reasons, I'll close this bug. Please stay tuned
for KDevelop 5.

If you think this bug is applicable to Clang/KDevelop 5, please reopen the
report and add new information on how to reproduce the bug there.