Bug 263095 - KDevelop PHP parsing crash after adding "if " inside a class method
Summary: KDevelop PHP parsing crash after adding "if " inside a class method
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 4.1.60
Platform: openSUSE Linux
: NOR crash
Target Milestone: 4.2.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-14 02:59 UTC by unix1
Modified: 2011-01-14 10:42 UTC (History)
1 user (show)

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 unix1 2011-01-14 02:59:04 UTC
Application: kdevelop (4.1.60)
KDE Platform Version: 4.5.95 (4.6 RC2)
Qt Version: 4.7.1
Operating System: Linux 2.6.34.7-0.5-desktop x86_64
Distribution: "openSUSE 11.3 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:

scrolled to the class method I needed to edit, created a blank line with carriage return, tabbed several times for indentation, entered "if " (with space without quotes), KDevelop suggestions drop-down appeared, 1 second later KDevelop crashed.

The crash can be reproduced every time.

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

Thread 13 (Thread 0x7f502b586710 (LWP 23192)):
#0  0x00007f503f9ed709 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5040f8a072 in wait (this=<value optimized out>, mutex=0xacce00, time=1000) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0xacce00, time=1000) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f503d6283eb in KDevelop::DUChainPrivate::CleanupThread::run (this=0xaccde0) at /usr/src/debug/kdevplatform/language/duchain/duchain.cpp:283
#4  0x00007f5040f89a1e in QThreadPrivate::start (arg=0xaccde0) at thread/qthread_unix.cpp:285
#5  0x00007f503f9e8a4f in start_thread () from /lib64/libpthread.so.0
#6  0x00007f503fccf82d in clone () from /lib64/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 12 (Thread 0x7f5024bd3710 (LWP 23200)):
#0  0x00007f503f9ed39c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5040f8a10b in wait (this=<value optimized out>, mutex=0xb45870, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0xb45870, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f5037dfb254 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xb5d310, th=0xb45390) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f5037dfe2a5 in waitForAvailableJob (this=0xb45960, th=0xb45390) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WeaverImpl.cpp:356
#5  ThreadWeaver::WorkingHardState::applyForWork (this=0xb45960, th=0xb45390) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WorkingHardState.cpp:71
#6  0x00007f5037dfe2be in ThreadWeaver::WorkingHardState::applyForWork (this=0xb45960, th=0xb45390) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00007f5037dfe2be in ThreadWeaver::WorkingHardState::applyForWork (this=0xb45960, th=0xb45390) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WorkingHardState.cpp:74
#8  0x00007f5037dfb64f in ThreadWeaver::ThreadRunHelper::run (this=0x7f5024bd2e30, parent=0xb5d310, th=0xb45390) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Thread.cpp:87
#9  0x00007f5037dfb6d8 in ThreadWeaver::Thread::run (this=0xb45390) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Thread.cpp:142
#10 0x00007f5040f89a1e in QThreadPrivate::start (arg=0xb45390) at thread/qthread_unix.cpp:285
#11 0x00007f503f9e8a4f in start_thread () from /lib64/libpthread.so.0
#12 0x00007f503fccf82d in clone () from /lib64/libc.so.6
#13 0x0000000000000000 in ?? ()

Thread 11 (Thread 0x7f50241d5710 (LWP 23207)):
#0  0x00007f503f9ed39c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5040f8a10b in wait (this=<value optimized out>, mutex=0xb45870, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0xb45870, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f5037dfb254 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xb5d310, th=0xb3c080) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f5037dfe2a5 in waitForAvailableJob (this=0xb45960, th=0xb3c080) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WeaverImpl.cpp:356
#5  ThreadWeaver::WorkingHardState::applyForWork (this=0xb45960, th=0xb3c080) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WorkingHardState.cpp:71
#6  0x00007f5037dfb64f in ThreadWeaver::ThreadRunHelper::run (this=0x7f50241d4e30, parent=0xb5d310, th=0xb3c080) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Thread.cpp:87
#7  0x00007f5037dfb6d8 in ThreadWeaver::Thread::run (this=0xb3c080) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Thread.cpp:142
#8  0x00007f5040f89a1e in QThreadPrivate::start (arg=0xb3c080) at thread/qthread_unix.cpp:285
#9  0x00007f503f9e8a4f in start_thread () from /lib64/libpthread.so.0
#10 0x00007f503fccf82d in clone () from /lib64/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7f50239d4710 (LWP 23209)):
#0  0x00007f503f9ed39c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5040f8a10b in wait (this=<value optimized out>, mutex=0xb45870, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0xb45870, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f5037dfb254 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xb5d310, th=0xb68a60) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f5037dfe2a5 in waitForAvailableJob (this=0xb45960, th=0xb68a60) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WeaverImpl.cpp:356
#5  ThreadWeaver::WorkingHardState::applyForWork (this=0xb45960, th=0xb68a60) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WorkingHardState.cpp:71
#6  0x00007f5037dfe2be in ThreadWeaver::WorkingHardState::applyForWork (this=0xb45960, th=0xb68a60) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00007f5037dfb64f in ThreadWeaver::ThreadRunHelper::run (this=0x7f50239d3e30, parent=0xb5d310, th=0xb68a60) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Thread.cpp:87
#8  0x00007f5037dfb6d8 in ThreadWeaver::Thread::run (this=0xb68a60) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Thread.cpp:142
#9  0x00007f5040f89a1e in QThreadPrivate::start (arg=0xb68a60) at thread/qthread_unix.cpp:285
#10 0x00007f503f9e8a4f in start_thread () from /lib64/libpthread.so.0
#11 0x00007f503fccf82d in clone () from /lib64/libc.so.6
#12 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7f50231d3710 (LWP 23219)):
#0  0x00007f503f9ed39c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5040f8a10b in wait (this=<value optimized out>, mutex=0xb45870, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0xb45870, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f5037dfb254 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xb5d310, th=0xc4cb80) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f5037dfe2a5 in waitForAvailableJob (this=0xb45960, th=0xc4cb80) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WeaverImpl.cpp:356
#5  ThreadWeaver::WorkingHardState::applyForWork (this=0xb45960, th=0xc4cb80) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WorkingHardState.cpp:71
#6  0x00007f5037dfe2be in ThreadWeaver::WorkingHardState::applyForWork (this=0xb45960, th=0xc4cb80) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00007f5037dfe2be in ThreadWeaver::WorkingHardState::applyForWork (this=0xb45960, th=0xc4cb80) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WorkingHardState.cpp:74
#8  0x00007f5037dfb64f in ThreadWeaver::ThreadRunHelper::run (this=0x7f50231d2e30, parent=0xb5d310, th=0xc4cb80) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Thread.cpp:87
#9  0x00007f5037dfb6d8 in ThreadWeaver::Thread::run (this=0xc4cb80) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Thread.cpp:142
#10 0x00007f5040f89a1e in QThreadPrivate::start (arg=0xc4cb80) at thread/qthread_unix.cpp:285
#11 0x00007f503f9e8a4f in start_thread () from /lib64/libpthread.so.0
#12 0x00007f503fccf82d in clone () from /lib64/libc.so.6
#13 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f50220a7710 (LWP 23222)):
#0  0x00007f503f9ec68e in __pthread_mutex_unlock_usercnt () from /lib64/libpthread.so.0
#1  0x00007f503a6affc8 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f503a6b0510 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f504109fae6 in QEventDispatcherGlib::processEvents (this=0xd6a630, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f5041074262 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f5041074475 in QEventLoop::exec (this=0x7f50220a6e20, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007f5040f871a4 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007f5040f89a1e in QThreadPrivate::start (arg=0xd86af0) at thread/qthread_unix.cpp:285
#8  0x00007f503f9e8a4f in start_thread () from /lib64/libpthread.so.0
#9  0x00007f503fccf82d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f50218a6710 (LWP 23223)):
[KCrash Handler]
#6  0x00007f503d630083 in KDevelop::DUContext::findDeclarations (this=0x0, identifier=<value optimized out>, position=..., dataType=..., topContext=0x0, flags=...)
    at /usr/src/debug/kdevplatform/language/duchain/ducontext.cpp:862
#7  0x00007f502256da7a in Php::ExpressionVisitor::visitEncapsVar (this=0x7f50218a43f0, node=0x7f5015ec80f0) at /usr/src/debug/kdevelop-php/duchain/expressionvisitor.cpp:486
#8  0x00007f5022308c1d in Php::DefaultVisitor::visitEncapsList (this=0x7f50218a43f0, node=<value optimized out>) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:412
#9  0x00007f50225695de in Php::ExpressionVisitor::visitScalar (this=0x7f50218a43f0, node=0x7f5015ec7f18) at /usr/src/debug/kdevelop-php/duchain/expressionvisitor.cpp:418
#10 0x00007f5022309e67 in Php::DefaultVisitor::visitVarExpressionNormal (this=0x7f50218a43f0, node=0x7f5015ec7e70) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:1051
#11 0x00007f5022569211 in Php::ExpressionVisitor::visitVarExpressionNormal (this=0x7f50218a43f0, node=0x7f5015ec7e70) at /usr/src/debug/kdevelop-php/duchain/expressionvisitor.cpp:200
#12 0x00007f5022309cf4 in Php::DefaultVisitor::visitUnaryExpressionNotPlusminus (this=0x7f50218a43f0, node=0x7f5015ec7e00) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:1014
#13 0x00007f502256a351 in Php::ExpressionVisitor::visitUnaryExpression (this=0x7f50218a43f0, node=0x7f5015ec7db0) at /usr/src/debug/kdevelop-php/duchain/expressionvisitor.cpp:604
#14 0x00007f50223091a4 in Php::DefaultVisitor::visitMultiplicativeExpression (this=0x7f50218a43f0, node=0x7f5015ec7d80) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:623
#15 0x00007f50223080b4 in Php::DefaultVisitor::visitAdditiveExpression (this=0x7f50218a43f0, node=0x7f5015ec7d50) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:11
#16 0x00007f5022309624 in Php::DefaultVisitor::visitShiftExpression (this=0x7f50218a43f0, node=0x7f5015ec7d20) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:794
#17 0x00007f502230953a in Php::DefaultVisitor::visitRelationalExpression (this=0x7f50218a43f0, node=0x7f5015ec7ce8) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:762
#18 0x00007f5022308ca4 in Php::DefaultVisitor::visitEqualityExpression (this=0x7f50218a43f0, node=0x7f5015ec7cb8) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:433
#19 0x00007f502230835d in Php::DefaultVisitor::visitBitAndExpression (this=0x7f50218a43f0, node=<value optimized out>) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:102
#20 0x00007f50223083fd in Php::DefaultVisitor::visitBitXorExpression (this=0x7f50218a43f0, node=<value optimized out>) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:130
#21 0x00007f50223083ad in Php::DefaultVisitor::visitBitOrExpression (this=0x7f50218a43f0, node=<value optimized out>) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:116
#22 0x00007f502230844d in Php::DefaultVisitor::visitBooleanAndExpression (this=0x7f50218a43f0, node=<value optimized out>) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:144
#23 0x00007f502230849d in Php::DefaultVisitor::visitBooleanOrExpression (this=0x7f50218a43f0, node=<value optimized out>) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:158
#24 0x00007f502230891e in Php::DefaultVisitor::visitConditionalExpression (this=0x7f50218a43f0, node=0x7f5015ec7bb8) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:305
#25 0x00007f5022569394 in Php::ExpressionVisitor::visitAssignmentExpression (this=0x7f50218a43f0, node=0x7f5015ec7b78) at /usr/src/debug/kdevelop-php/duchain/expressionvisitor.cpp:139
#26 0x00007f50223090cd in Php::DefaultVisitor::visitLogicalAndExpression (this=0x7f50218a43f0, node=<value optimized out>) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:581
#27 0x00007f502230916d in Php::DefaultVisitor::visitLogicalXorExpression (this=0x7f50218a43f0, node=<value optimized out>) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:609
#28 0x00007f502230911d in Php::DefaultVisitor::visitLogicalOrExpression (this=0x7f50218a43f0, node=<value optimized out>) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:595
#29 0x00007f502256e2b1 in Php::ExpressionParser::evaluateType (this=0x7f50218a4530, ast=0x7f5015ec7aa8, editor=0x7f50218a5b40, offset=...)
    at /usr/src/debug/kdevelop-php/duchain/expressionparser.cpp:93
#30 0x00007f502256e4ff in Php::ExpressionParser::evaluateType (this=<value optimized out>, ast=<value optimized out>, editor=<value optimized out>)
    at /usr/src/debug/kdevelop-php/duchain/expressionparser.cpp:78
#31 0x00007f502256224c in Php::TypeBuilder::getTypeForNode (this=0x7f50218a56a0, node=0x7f5015ec7aa8) at /usr/src/debug/kdevelop-php/duchain/builders/typebuilder.cpp:247
#32 0x00007f5022563a47 in Php::TypeBuilder::visitExpr (this=0x7f50218a56a0, node=0x7f5015ec7aa8) at /usr/src/debug/kdevelop-php/duchain/builders/typebuilder.cpp:424
#33 0x00007f50223098db in Php::DefaultVisitor::visitStatement (this=0x7f50218a5700, node=0x7f5015ec7970) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:872
#34 0x00007f50225665d0 in Php::TypeBuilder::visitStatement (this=0x7f50218a56a0, node=0x7f5015ec7970) at /usr/src/debug/kdevelop-php/duchain/builders/typebuilder.cpp:442
#35 0x00007f5022556d0c in Php::DeclarationBuilder::visitStatement (this=0x7f50218a56a0, node=0x7f5015ec7970) at /usr/src/debug/kdevelop-php/duchain/builders/declarationbuilder.cpp:1022
#36 0x00007f5022309c06 in Php::DefaultVisitor::visitTopStatement (this=0x7f50218a5700, node=0x7f5015ec7930) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:987
#37 0x00007f5022308fcd in Php::DefaultVisitor::visitInnerStatementList (this=0x7f50218a5700, node=<value optimized out>) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:541
#38 0x00007f502255c32b in Php::ContextBuilder::visitClassStatement (this=0x7f50218a56a0, node=0x7f5015ec41c8) at /usr/src/debug/kdevelop-php/duchain/builders/contextbuilder.cpp:236
#39 0x00007f5022566019 in Php::TypeBuilder::visitClassStatement (this=0x7f50218a56a0, node=<value optimized out>) at /usr/src/debug/kdevelop-php/duchain/builders/typebuilder.cpp:296
#40 0x00007f5022551be7 in Php::DeclarationBuilder::visitClassStatement (this=0x7f50218a56a0, node=0x7f5015ec41c8) at /usr/src/debug/kdevelop-php/duchain/builders/declarationbuilder.cpp:340
#41 0x00007f50223085cd in Php::DefaultVisitor::visitClassBody (this=0x7f50218a5700, node=<value optimized out>) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:199
#42 0x00007f502255cf50 in Php::ContextBuilder::visitClassDeclarationStatement (this=0x7f50218a56a0, node=0x7f5015e71e18) at /usr/src/debug/kdevelop-php/duchain/builders/contextbuilder.cpp:200
#43 0x00007f502254f9c8 in Php::DeclarationBuilder::visitClassDeclarationStatement (this=0x7f50218a56a0, node=0x7f5015e71e18) at /usr/src/debug/kdevelop-php/duchain/builders/declarationbuilder.cpp:168
#44 0x00007f5022309c20 in Php::DefaultVisitor::visitTopStatement (this=0x7f50218a5700, node=0x7f5015e71dd8) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:989
#45 0x00007f502254d644 in Php::DeclarationBuilder::visitOuterTopStatement (this=0x7f50218a56a0, node=0x7f5015e71da8) at /usr/src/debug/kdevelop-php/duchain/builders/declarationbuilder.cpp:657
#46 0x00007f50223096bd in Php::DefaultVisitor::visitStart (this=0x7f50218a5700, node=<value optimized out>) at /usr/src/debug/kdevelop-php/build/parser/phpdefaultvisitor.cpp:819
#47 0x00007f502255de54 in Php::ContextBuilder::startVisiting (this=0x7f50218a56a0, node=0x75fdbd0) at /usr/src/debug/kdevelop-php/duchain/builders/contextbuilder.cpp:116
#48 0x00007f502255ab49 in supportBuild (this=0x7f50218a56a0, node=0x75fdbd0, context=<value optimized out>) at /usr/include/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:133
#49 supportBuild (this=0x7f50218a56a0, node=0x75fdbd0, context=<value optimized out>) at /usr/include/kdevplatform/language/duchain/builders/abstracttypebuilder.h:85
#50 Php::DeclarationBuilder::supportBuild (this=0x7f50218a56a0, node=0x75fdbd0, context=<value optimized out>) at /usr/src/debug/kdevelop-php/duchain/builders/declarationbuilder.cpp:1178
#51 0x00007f5022552fe5 in build (this=0x7f50218a56a0, url=<value optimized out>, node=0x75fdbd0, updateContext=...) at /usr/include/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:113
#52 Php::DeclarationBuilder::build (this=0x7f50218a56a0, url=<value optimized out>, node=0x75fdbd0, updateContext=...) at /usr/src/debug/kdevelop-php/duchain/builders/declarationbuilder.cpp:136
#53 0x00007f50227ca856 in Php::ParseJob::run (this=0x7698c20) at /usr/src/debug/kdevelop-php/phpparsejob.cpp:146
#54 0x00007f5037dfbbd1 in ThreadWeaver::JobRunHelper::runTheJob (this=0x7f50218a5da0, th=0xcfc990, job=0x7698c20) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Job.cpp:106
#55 0x00007f5037dfbd0e in ThreadWeaver::Job::execute (this=0x7698c20, th=0xcfc990) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Job.cpp:135
#56 0x00007f5037dfb61f in ThreadWeaver::ThreadRunHelper::run (this=0x7f50218a5e30, parent=0x9fd030, th=0xcfc990) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Thread.cpp:95
#57 0x00007f5037dfb6d8 in ThreadWeaver::Thread::run (this=0xcfc990) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Thread.cpp:142
#58 0x00007f5040f89a1e in QThreadPrivate::start (arg=0xcfc990) at thread/qthread_unix.cpp:285
#59 0x00007f503f9e8a4f in start_thread () from /lib64/libpthread.so.0
#60 0x00007f503fccf82d in clone () from /lib64/libc.so.6
#61 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f50210a5710 (LWP 23229)):
#0  0x00007f503f9ed39c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5040f8a10b in wait (this=<value optimized out>, mutex=0x912800, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x912800, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f5037dfb254 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x9fd030, th=0xd86f40) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f5037dfe2a5 in waitForAvailableJob (this=0x8d6fd0, th=0xd86f40) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WeaverImpl.cpp:356
#5  ThreadWeaver::WorkingHardState::applyForWork (this=0x8d6fd0, th=0xd86f40) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WorkingHardState.cpp:71
#6  0x00007f5037dfe2be in ThreadWeaver::WorkingHardState::applyForWork (this=0x8d6fd0, th=0xd86f40) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00007f5037dfb64f in ThreadWeaver::ThreadRunHelper::run (this=0x7f50210a4e30, parent=0x9fd030, th=0xd86f40) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Thread.cpp:87
#8  0x00007f5037dfb6d8 in ThreadWeaver::Thread::run (this=0xd86f40) at /usr/src/debug/kdelibs-4.5.95/threadweaver/Weaver/Thread.cpp:142
#9  0x00007f5040f89a1e in QThreadPrivate::start (arg=0xd86f40) at thread/qthread_unix.cpp:285
#10 0x00007f503f9e8a4f in start_thread () from /lib64/libpthread.so.0
#11 0x00007f503fccf82d in clone () from /lib64/libc.so.6
#12 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f501a7bb710 (LWP 23289)):
#0  0x00007f503f9ed39c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f502c544634 in ?? () from /usr/lib64/libQtScript.so.4
#2  0x00007f502c544669 in ?? () from /usr/lib64/libQtScript.so.4
#3  0x00007f503f9e8a4f in start_thread () from /lib64/libpthread.so.0
#4  0x00007f503fccf82d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f501afbc710 (LWP 23300)):
#0  0x00007f503f9ec660 in __pthread_mutex_unlock_usercnt () from /lib64/libpthread.so.0
#1  0x00007f503a6aef72 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f503a6afe69 in ?? () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f503a6b0510 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f504109fae6 in QEventDispatcherGlib::processEvents (this=0x5683640, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007f5041074262 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f5041074475 in QEventLoop::exec (this=0x7f501afbbde0, flags=...) at kernel/qeventloop.cpp:201
#7  0x00007f5040f871a4 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#8  0x00007f5041055918 in QInotifyFileSystemWatcherEngine::run (this=0x5680fb0) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007f5040f89a1e in QThreadPrivate::start (arg=0x5680fb0) at thread/qthread_unix.cpp:285
#10 0x00007f503f9e8a4f in start_thread () from /lib64/libpthread.so.0
#11 0x00007f503fccf82d in clone () from /lib64/libc.so.6
#12 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f5017724710 (LWP 23375)):
#0  0x00007f503fcc66b3 in poll () from /lib64/libc.so.6
#1  0x00007f503a6affd4 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f503a6b0510 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f504109fae6 in QEventDispatcherGlib::processEvents (this=0x56982c0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f5041074262 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f5041074475 in QEventLoop::exec (this=0x7f5017723e20, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007f5040f871a4 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007f5040f89a1e in QThreadPrivate::start (arg=0x70f1680) at thread/qthread_unix.cpp:285
#8  0x00007f503f9e8a4f in start_thread () from /lib64/libpthread.so.0
#9  0x00007f503fccf82d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f5016f23710 (LWP 23376)):
#0  0x00007f503fcc66b3 in poll () from /lib64/libc.so.6
#1  0x00007f503a6affd4 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f503a6b0510 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f504109fae6 in QEventDispatcherGlib::processEvents (this=0x56d9610, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f5041074262 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f5041074475 in QEventLoop::exec (this=0x7f5016f22e20, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007f5040f871a4 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007f5040f89a1e in QThreadPrivate::start (arg=0x700bb30) at thread/qthread_unix.cpp:285
#8  0x00007f503f9e8a4f in start_thread () from /lib64/libpthread.so.0
#9  0x00007f503fccf82d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f5042a60760 (LWP 23191)):
#0  0x00007f503f9ed39c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5040f8a10b in wait (this=<value optimized out>, mutex=0x5683e90, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x5683e90, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f5040f891c0 in QThread::wait (this=<value optimized out>, time=18446744073709551615) at thread/qthread_unix.cpp:683
#4  0x00007f50410491b0 in QFileSystemWatcher::~QFileSystemWatcher (this=<value optimized out>, __in_chrg=<value optimized out>) at io/qfilesystemwatcher.cpp:440
#5  0x00007f5041049289 in QFileSystemWatcher::~QFileSystemWatcher (this=0x5683480, __in_chrg=<value optimized out>) at io/qfilesystemwatcher.cpp:456
#6  0x00007f50410873c4 in QObjectPrivate::deleteChildren (this=0x5683c30) at kernel/qobject.cpp:1949
#7  0x00007f504108c072 in QObject::~QObject (this=0x56807c0, __in_chrg=<value optimized out>) at kernel/qobject.cpp:945
#8  0x00007f5038b37cf9 in Solid::Backends::Fstab::FstabWatcher::~FstabWatcher (this=0x56807c0, __in_chrg=<value optimized out>)
    at /usr/src/debug/kdelibs-4.5.95/solid/solid/backends/fstab/fstabwatcher.cpp:51
#9  0x00007f503fc344e1 in __run_exit_handlers () from /lib64/libc.so.6
#10 0x00007f503fc34535 in exit () from /lib64/libc.so.6
#11 0x00007f504049f478 in ?? () from /usr/lib64/libQtGui.so.4
#12 0x00007f50417a3e88 in KApplication::xioErrhandler (this=0x7fffc84412b0, dpy=0x688c90) at /usr/src/debug/kdelibs-4.5.95/kdeui/kernel/kapplication.cpp:417
#13 0x00007f503c350a3e in _XIOError () from /usr/lib64/libX11.so.6
#14 0x00007f503c3575a5 in ?? () from /usr/lib64/libX11.so.6
#15 0x00007f503c35790c in _XEventsQueued () from /usr/lib64/libX11.so.6
#16 0x00007f503c3407ef in XEventsQueued () from /usr/lib64/libX11.so.6
#17 0x00007f50404d7d4c in ?? () from /usr/lib64/libQtGui.so.4
#18 0x00007f503a6af718 in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#19 0x00007f503a6afff2 in ?? () from /usr/lib64/libglib-2.0.so.0
#20 0x00007f503a6b0510 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#21 0x00007f504109fa8f in QEventDispatcherGlib::processEvents (this=0x61dae0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#22 0x00007f50404d7eae in ?? () from /usr/lib64/libQtGui.so.4
#23 0x00007f5041074262 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#24 0x00007f5041074475 in QEventLoop::exec (this=0x7fffc8440f70, flags=...) at kernel/qeventloop.cpp:201
#25 0x00007f50410788db in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#26 0x000000000040b8db in _start ()

Possible duplicates by query: bug 257140, bug 232687, bug 209814.

Reported using DrKonqi
Comment 1 unix1 2011-01-14 07:07:09 UTC
I reproduced the crash without having to enter "if " - so it seems like a more generic crash and not specific to that keyword.
Comment 2 Milian Wolff 2011-01-14 10:42:03 UTC
commit d5f65c1f80d1e58e9a981a5a849438b68c57a07d
branch 1.2
Author: Milian Wolff <mail@milianw.de>
Date:   Fri Jan 14 10:40:36 2011 +0100

    prevent crash in ExpressionVisitor::visitEncapsVar when class is currentClass and hence internalContext is not yet set
    
    BUG: 263095

diff --git a/duchain/expressionvisitor.cpp b/duchain/expressionvisitor.cpp
index a122db3..85c17a4 100644
--- a/duchain/expressionvisitor.cpp
+++ b/duchain/expressionvisitor.cpp
@@ -483,10 +483,20 @@ void ExpressionVisitor::visitEncapsVar(EncapsVarAst *node)
             DUChainReadLocker lock(DUChain::lock());
             if ( StructureType::Ptr structType = dec->type<StructureType>() ) {
                 if ( ClassDeclaration* cdec = dynamic_cast<ClassDeclaration*>(structType->declaration(m_currentContext->topContext())) ) {
-                    foreach( Declaration* pdec, cdec->internalContext()->findDeclarations(identifierForNode(node->propertyIdentifier)) ) {
-                        if ( !pdec->isFunctionDeclaration() ) {
-                            foundDec = pdec;
-                            break;
+                    ///TODO: share code with visitVariableProperty
+                    DUContext* ctx = cdec->internalContext();
+                    if (!ctx && m_currentContext->parentContext()) {
+                        if (m_currentContext->parentContext()->localScopeIdentifier() == cdec->qualifiedIdentifier()) {
+                            //class is currentClass (internalContext is not yet set)
+                            ctx = m_currentContext->parentContext();
+                        }
+                    }
+                    if (ctx) {
+                        foreach( Declaration* pdec, ctx->findDeclarations(identifierForNode(node->propertyIdentifier)) ) {
+                            if ( !pdec->isFunctionDeclaration() ) {
+                                foundDec = pdec;
+                                break;
+                            }
                         }
                     }
                 }