Bug 353905 - SIGSEGV in operator() (topData=0x9e3f0f30, __closure=<synthetic pointer>) at /usr/src/debug/kdevplatform-1.7.2/language/duchain/topducontextdynamicdata.cpp:512
Summary: SIGSEGV in operator() (topData=0x9e3f0f30, __closure=<synthetic pointer>) at ...
Status: RESOLVED DUPLICATE of bug 334487
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: general (show other bugs)
Version: 1.7.1
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-14 19:28 UTC by Piotr Mierzwinski
Modified: 2015-11-09 17:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
gdb full log from kdevelop session when crash was happened (53.95 KB, text/plain)
2015-10-14 19:31 UTC, Piotr Mierzwinski
Details
gdb full log from kdevelop session when crash was happened (2) (53.68 KB, text/plain)
2015-10-14 19:35 UTC, Piotr Mierzwinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2015-10-14 19:28:15 UTC
Use "Show uses" on some function made CRASH. This is happen just after run KDevelop. First invoke of "Show uses" makes CRASH.
I tested the newest "stable" KDevelop on my own project. And CRASH happened when I tried to see the uses of some function (here this is: "currentFileName()", located in the same file where I invoked "Show uses"). Below you can find related line:
m_sLastSelectedItemName = currentFileName();
Above line is placed in "void FileListView::slotOpenSelected()", file qtcmd2/src/filelistview.cpp
Public repository is located at: git://git.qtcmd.org/qtcmd2.git

Below issue I've reproduced twice. Yesterday and today on freshly running KDevelop.
Before KDevelop has been run, I've removed its cache: "kdevduchain".
Full dbglog (including backtrace) is attached. Below, I think, one of most interesting part:

Thread 15 (Thread 0x978ffb40 (LWP 3483)):
#0  0xffffffff in KDevelop::TopDUContextDynamicData::loadImports(unsigned int) (topData=0x9e3f0f30, __closure=<synthetic pointer>)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/topducontextdynamicdata.cpp:512
#1  0xffffffff in KDevelop::TopDUContextDynamicData::loadImports(unsigned int) (callback=..., topContextIndex=308) at /usr/src/debug/kdevplatform-1.7.2/language/duchain/topducontextdynamicdata.cpp:173
#2  0xffffffff in KDevelop::TopDUContextDynamicData::loadImports(unsigned int) (topContextIndex=308) at /usr/src/debug/kdevplatform-1.7.2/language/duchain/topducontextdynamicdata.cpp:515
#3  0xffffffff in KDevelop::ParsingEnvironmentFile::imports() const (this=0xa817840) at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:180
#4  0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0xa817840, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:245
#5  0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0x962a6bb8, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:246
#6  0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0x963aca18, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:246
#7  0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0x963ae140, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:246
#8  0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0x96291430, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:246
#9  0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0x9ea14330, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:246
#10 0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0x9ea0a950, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:246
#11 0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0x9f9df818, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:246
#12 0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0x9ea231d8, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:246
#13 0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0xa1ee6638, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:246
#14 0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0x9edf5018, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:246
#15 0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0x9f9101e0, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:246
#16 0xffffffff in KDevelop::ParsingEnvironmentFile::featuresMatch(KDevelop::TopDUContext::Features, QSet<KDevelop::ParsingEnvironmentFile const*>&) const (this=0x9f679210, minimumFeatures=70, checked=...)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:246
#17 0xffffffff in KDevelop::ParsingEnvironmentFile::featuresSatisfied(KDevelop::TopDUContext::Features) const (this=0x9f679210, minimumFeatures=70)
    at /usr/src/debug/kdevplatform-1.7.2/language/duchain/parsingenvironment.cpp:321
#18 0xffffffff in PreprocessJob::sourceNeeded(QString&, rpp::Preprocessor::IncludeType, int, bool) (this=0xad0a790, _fileName=..., type=rpp::Preprocessor::IncludeLocal, sourceLine=35, skipCurrentPath=false)
    at /usr/src/debug/kdevelop-4.7.2/languages/cpp/preprocessjob.cpp:517
#19 0xffffffff in rpp::pp::handle_include(bool, rpp::Stream&, rpp::Stream&) (this=0x978fe0e4, skip_current_path=false, input=..., output=...)
    at /usr/src/debug/kdevelop-4.7.2/languages/cpp/parser/rpp/pp-engine.cpp:219
#20 0xffffffff in rpp::pp::handle_directive(unsigned int, rpp::Stream&, rpp::Stream&) (this=0x978fe0e4, directive=163651, input=..., output=...)
    at /usr/src/debug/kdevelop-4.7.2/languages/cpp/parser/rpp/pp-engine.cpp:137
#21 0xffffffff in rpp::pp::operator()(rpp::Stream&, rpp::Stream&) (this=0x978fe0e4, input=..., output=...) at /usr/src/debug/kdevelop-4.7.2/languages/cpp/parser/rpp/pp-engine.cpp:272
#22 0xffffffff in rpp::pp::processFileInternal(QString const&, QByteArray const&, QVector<unsigned int>&) (this=0x978fe0e4, fileName=..., fileContents=..., result=...)
    at /usr/src/debug/kdevelop-4.7.2/languages/cpp/parser/rpp/pp-engine.cpp:98
#23 0xffffffff in rpp::pp::processFile(QString const&, QByteArray const&) (this=0x978fe0e4, fileName=..., data=...) at /usr/src/debug/kdevelop-4.7.2/languages/cpp/parser/rpp/pp-engine.cpp:85
#24 0xffffffff in PreprocessJob::run() (this=0xad0a790) at /usr/src/debug/kdevelop-4.7.2/languages/cpp/preprocessjob.cpp:249
#25 0xffffffff in ThreadWeaver::JobRunHelper::runTheJob(ThreadWeaver::Thread*, ThreadWeaver::Job*) () at /lib/libthreadweaver.so.4
#26 0xffffffff in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () at /lib/libthreadweaver.so.4
#27 0xffffffff in ThreadWeaver::JobCollectionJobRunner::execute(ThreadWeaver::Thread*) () at /lib/libthreadweaver.so.4
#28 0xffffffff in ThreadWeaver::JobCollection::execute(ThreadWeaver::Thread*) () at /lib/libthreadweaver.so.4
#29 0xffffffff in ThreadWeaver::Thread::run() () at /lib/libthreadweaver.so.4
#30 0xffffffff in QThreadPrivate::start(void*) () at /lib/libQtCore.so.4
#31 0xffffffff in start_thread () at /lib/i686/libpthread.so.0
#32 0xffffffff in clone () at /lib/i686/libc.so.6

Reproducible: Always

Steps to Reproduce:
1. Run KDevelop with my project qtcmd2 and opened filelistview.cpp
   In the moment of a test I had opened only above file.
   Probably CRASH happen even file has been opened after run of KDevelop (didn't tested).
2. Find (using shortcut Ctrl+Alt+N) following method: slotOpenSelected
3. Find mentioned above line: "m_sLastSelectedItemName = currentFileName();"
  In this function ("slotOpenSelected") there are two occurrences: "currentFileName". In my test I used second one.
4. And put cursor on "currentFileName()"
5. Invoke "Show used"


Actual Results:  
CRASH

Expected Results:  
Shows the results of using "Show used" for selected function


Bug is referring to version 4.7.2 (this version is missing in this form)
This bug is the most likely related with 334487 [https://bugs.kde.org/show_bug.cgi?id=334487], because is also happening in KDevelop::TopDUContextDynamicData::loadImports(unsigned int)
Comment 1 Piotr Mierzwinski 2015-10-14 19:31:56 UTC
Created attachment 94995 [details]
gdb full log from kdevelop session when crash was happened
Comment 2 Piotr Mierzwinski 2015-10-14 19:35:26 UTC
Created attachment 94996 [details]
gdb full log from kdevelop session when crash was happened (2)
Comment 3 Milian Wolff 2015-11-09 17:35:14 UTC

*** This bug has been marked as a duplicate of bug 334487 ***