Bug 291468 - Crash while completing a locally defined enum
Summary: Crash while completing a locally defined enum
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: VHI crash
Target Milestone: 4.2.3
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-13 18:03 UTC by Aleix Pol
Modified: 2012-01-22 13:53 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleix Pol 2012-01-13 18:03:15 UTC
Application: kdevelop (4.3.60)
KDE Platform Version: 4.7.97 (4.8 RC2 (4.7.97) (Compiled from sources)
Qt Version: 4.8.0
Operating System: Linux 3.1.7-1-ARCH i686

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

enum A { Bb };
A x;

switch(x) { case B|: }

When I complete with the cursor at |, KDevelop crashes.

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Aborted
[Current thread is 1 (Thread 0xb1ff7740 (LWP 9587))]

Thread 10 (Thread 0xaf0afb40 (LWP 9589)):
#0  0xb77de424 in __kernel_vsyscall ()
#1  0xb62a6cf3 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb631f02f in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0xb4dedd3f in KDevelop::DUChainPrivate::CleanupThread::run (this=0x9600990) at /home/kde-devel/kdevplatform/language/duchain/duchain.cpp:282
#4  0xb631eb30 in ?? () from /usr/lib/libQtCore.so.4
#5  0xb62a2d4c in start_thread () from /lib/libpthread.so.0
#6  0xb555303e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 9 (Thread 0xad9dab40 (LWP 9590)):
#0  0xb77de424 in __kernel_vsyscall ()
#1  0xb554c151 in select () from /lib/libc.so.6
#2  0xb640c014 in ?? () from /usr/lib/libQtCore.so.4
#3  0xb631eb30 in ?? () from /usr/lib/libQtCore.so.4
#4  0xb62a2d4c in start_thread () from /lib/libpthread.so.0
#5  0xb555303e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 8 (Thread 0xabfceb40 (LWP 9592)):
[KCrash Handler]
#7  0xb77de424 in __kernel_vsyscall ()
#8  0xb549802f in raise () from /lib/libc.so.6
#9  0xb54999b5 in abort () from /lib/libc.so.6
#10 0xb631359a in qt_message_output(QtMsgType, char const*) () from /usr/lib/libQtCore.so.4
#11 0xb631379b in ?? () from /usr/lib/libQtCore.so.4
#12 0xb63138b8 in qFatal(char const*, ...) () from /usr/lib/libQtCore.so.4
#13 0xb6313945 in qt_assert(char const*, char const*, int) () from /usr/lib/libQtCore.so.4
#14 0xb4e3d412 in KDevelop::Declaration::qualifiedIdentifier (this=0xa32c28d0) at /home/kde-devel/kdevplatform/language/duchain/declaration.cpp:341
#15 0xb4e7ba52 in KDevelop::DeclarationId::qualifiedIdentifier (this=0xa0c9bf30) at /home/kde-devel/kdevplatform/language/duchain/declarationid.cpp:202
#16 0xb4ebb63b in KDevelop::IdentifiedType::qualifiedIdentifier (this=0xab637d4c) at /home/kde-devel/kdevplatform/language/duchain/types/identifiedtype.cpp:54
#17 0xb4ec4403 in KDevelop::EnumerationType::toString (this=0xab637d40) at /home/kde-devel/kdevplatform/language/duchain/types/enumerationtype.cpp:69
#18 0xac21c7be in Cpp::CodeCompletionContext::caseAccessCompletionItems (this=0xab63e4a8) at /home/kde-devel/kdevelop/languages/cpp/codecompletion/context.cpp:1384
#19 0xac2207b4 in Cpp::CodeCompletionContext::completionItems (this=0xab63e4a8, shouldAbort=@0x977e850, fullCompletion=true) at /home/kde-devel/kdevelop/languages/cpp/codecompletion/context.cpp:1794
#20 0xac220aad in Cpp::CodeCompletionContext::completionItems (this=0xab601150, shouldAbort=@0x977e850, fullCompletion=true) at /home/kde-devel/kdevelop/languages/cpp/codecompletion/context.cpp:1829
#21 0xb4efc703 in KDevelop::CodeCompletionWorker::computeCompletions (this=0x977e840, context=..., position=..., followingText=..., contextRange=..., contextText=...) at /home/kde-devel/kdevplatform/language/codecompletion/codecompletionworker.cpp:166
#22 0xac213c81 in Cpp::CodeCompletionWorker::computeCompletions (this=0x977e840, context=..., position=..., followingText=..., _contextRange=..., _contextText=...) at /home/kde-devel/kdevelop/languages/cpp/codecompletion/worker.cpp:91
#23 0xb4efc33d in KDevelop::CodeCompletionWorker::computeCompletions (this=0x977e840, context=..., position=..., view=0x99b59d0) at /home/kde-devel/kdevplatform/language/codecompletion/codecompletionworker.cpp:128
#24 0xb4efcb05 in KDevelop::CodeCompletionWorker::qt_static_metacall (_o=0x977e840, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x9b7d3b8) at /home/kde-devel/build-kdevplatform/language/codecompletionworker.moc:61
#25 0xb6443921 in QMetaCallEvent::placeMetaCall(QObject*) () from /usr/lib/libQtCore.so.4
#26 0xb644c99b in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#27 0xb590d914 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#28 0xb5912d43 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#29 0xb68209a2 in KApplication::notify (this=0xbfaccd98, receiver=0x977e840, event=0xa6b0330) at /home/kde-devel/src/kdelibs/kdeui/kernel/kapplication.cpp:311
#30 0xb6431b7e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#31 0xb64357f8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#32 0xb6466f0f in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#33 0xb643070d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#34 0xb64309a9 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#35 0xb631b69c in QThread::exec() () from /usr/lib/libQtCore.so.4
#36 0xb4f01547 in KDevelop::CompletionWorkerThread::run (this=0x977e6e0) at /home/kde-devel/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84
#37 0xb631eb30 in ?? () from /usr/lib/libQtCore.so.4
#38 0xb62a2d4c in start_thread () from /lib/libpthread.so.0
#39 0xb555303e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 7 (Thread 0xab5ffb40 (LWP 9593)):
#0  0xb77de424 in __kernel_vsyscall ()
#1  0xb554c151 in select () from /lib/libc.so.6
#2  0xb646118a in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib/libQtCore.so.4
#3  0xb646580b in QEventDispatcherUNIX::select(int, fd_set*, fd_set*, fd_set*, timeval*) () from /usr/lib/libQtCore.so.4
#4  0xb6466ae5 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib/libQtCore.so.4
#5  0xb6466f84 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb643070d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb64309a9 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0xb631b69c in QThread::exec() () from /usr/lib/libQtCore.so.4
#9  0xb4f01547 in KDevelop::CompletionWorkerThread::run (this=0x977ec40) at /home/kde-devel/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84
#10 0xb631eb30 in ?? () from /usr/lib/libQtCore.so.4
#11 0xb62a2d4c in start_thread () from /lib/libpthread.so.0
#12 0xb555303e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 6 (Thread 0xaa3ffb40 (LWP 9598)):
#0  0xb77de424 in __kernel_vsyscall ()
#1  0xb62a694b in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb52bcb39 in ?? () from /usr/lib/libQtScript.so.4
#3  0xb52bcb7f in ?? () from /usr/lib/libQtScript.so.4
#4  0xb62a2d4c in start_thread () from /lib/libpthread.so.0
#5  0xb555303e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 5 (Thread 0xa8affb40 (LWP 9606)):
#0  0xb77de424 in __kernel_vsyscall ()
#1  0xb62a694b in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb399a1a3 in ?? () from /usr/lib/libQtWebKit.so.4
#3  0xb399a2bf in ?? () from /usr/lib/libQtWebKit.so.4
#4  0xb62a2d4c in start_thread () from /lib/libpthread.so.0
#5  0xb555303e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 4 (Thread 0xa947eb40 (LWP 9607)):
#0  0xb77de424 in __kernel_vsyscall ()
#1  0xb554c151 in select () from /lib/libc.so.6
#2  0xb646106a in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib/libQtCore.so.4
#3  0xb646580b in QEventDispatcherUNIX::select(int, fd_set*, fd_set*, fd_set*, timeval*) () from /usr/lib/libQtCore.so.4
#4  0xb6466ae5 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib/libQtCore.so.4
#5  0xb6466f84 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb643070d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb64309a9 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0xb631b69c in QThread::exec() () from /usr/lib/libQtCore.so.4
#9  0xb631b78b in QThread::run() () from /usr/lib/libQtCore.so.4
#10 0xb631eb30 in ?? () from /usr/lib/libQtCore.so.4
#11 0xb62a2d4c in start_thread () from /lib/libpthread.so.0
#12 0xb555303e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 3 (Thread 0xa4545b40 (LWP 10019)):
#0  0xb77de424 in __kernel_vsyscall ()
#1  0xb62a694b in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb631f0a0 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0xb6f76be0 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x94c3108, th=0x9a1a3e0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0xb6f7acfc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x944ac28, th=0x9a1a3e0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:80
#5  0xb6f76b5f in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x94c3108, th=0x9a1a3e0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:356
#6  0xb6f7aca2 in ThreadWeaver::WorkingHardState::applyForWork (this=0x944ac28, th=0x9a1a3e0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:71
#7  0xb6f76b38 in ThreadWeaver::WeaverImpl::applyForWork (this=0x94c3108, th=0x9a1a3e0, previous=0x0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#8  0xb6f7acc8 in ThreadWeaver::WorkingHardState::applyForWork (this=0x944ac28, th=0x9a1a3e0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:74
#9  0xb6f76b38 in ThreadWeaver::WeaverImpl::applyForWork (this=0x94c3108, th=0x9a1a3e0, previous=0x0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#10 0xb6f7acc8 in ThreadWeaver::WorkingHardState::applyForWork (this=0x944ac28, th=0x9a1a3e0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:74
#11 0xb6f76b38 in ThreadWeaver::WeaverImpl::applyForWork (this=0x94c3108, th=0x9a1a3e0, previous=0xa58e810) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#12 0xb6f786a7 in ThreadWeaver::ThreadRunHelper::run (this=0xa45452a4, parent=0x94c3108, th=0x9a1a3e0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Thread.cpp:87
#13 0xb6f7895d in ThreadWeaver::Thread::run (this=0x9a1a3e0) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Thread.cpp:142
#14 0xb631eb30 in ?? () from /usr/lib/libQtCore.so.4
#15 0xb62a2d4c in start_thread () from /lib/libpthread.so.0
#16 0xb555303e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 2 (Thread 0xa3d44b40 (LWP 10020)):
#0  0xb77de424 in __kernel_vsyscall ()
#1  0xb62a694b in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb631f0a0 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0xb6f76be0 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x94c3108, th=0xa4c02d70) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0xb6f7acfc in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x944ac28, th=0xa4c02d70) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:80
#5  0xb6f76b5f in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x94c3108, th=0xa4c02d70) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:356
#6  0xb6f7aca2 in ThreadWeaver::WorkingHardState::applyForWork (this=0x944ac28, th=0xa4c02d70) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:71
#7  0xb6f76b38 in ThreadWeaver::WeaverImpl::applyForWork (this=0x94c3108, th=0xa4c02d70, previous=0xa719e10) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#8  0xb6f786a7 in ThreadWeaver::ThreadRunHelper::run (this=0xa3d442a4, parent=0x94c3108, th=0xa4c02d70) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Thread.cpp:87
#9  0xb6f7895d in ThreadWeaver::Thread::run (this=0xa4c02d70) at /home/kde-devel/src/kdelibs/threadweaver/Weaver/Thread.cpp:142
#10 0xb631eb30 in ?? () from /usr/lib/libQtCore.so.4
#11 0xb62a2d4c in start_thread () from /lib/libpthread.so.0
#12 0xb555303e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 1 (Thread 0xb1ff7740 (LWP 9587)):
#0  0xb77de424 in __kernel_vsyscall ()
#1  0xb5548800 in poll () from /lib/libc.so.6
#2  0xb28ef3e0 in ?? () from /usr/lib/libxcb.so.1
#3  0xb28ef9ec in ?? () from /usr/lib/libxcb.so.1
#4  0xb28efaa1 in xcb_writev () from /usr/lib/libxcb.so.1
#5  0xb4bbd0d0 in _XSend () from /usr/lib/libX11.so.6
#6  0xb4bbd6da in _XReply () from /usr/lib/libX11.so.6
#7  0xb4bb8ec6 in XSync () from /usr/lib/libX11.so.6
#8  0xb5b3650e in QRasterWindowSurface::syncX() () from /usr/lib/libQtGui.so.4
#9  0xb5b36a2e in QRasterWindowSurface::beginPaint(QRegion const&) () from /usr/lib/libQtGui.so.4
#10 0xb5b509c1 in ?? () from /usr/lib/libQtGui.so.4
#11 0xb5b56d13 in ?? () from /usr/lib/libQtGui.so.4
#12 0xb595914b in QWidgetPrivate::syncBackingStore() () from /usr/lib/libQtGui.so.4
#13 0xb5968247 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#14 0xb5d9d5ac in QMainWindow::event(QEvent*) () from /usr/lib/libQtGui.so.4
#15 0xb6902454 in KMainWindow::event (this=0x930dde0, ev=0xa99a550) at /home/kde-devel/src/kdelibs/kdeui/widgets/kmainwindow.cpp:1084
#16 0xb694a457 in KXmlGuiWindow::event (this=0x930dde0, ev=0xa99a550) at /home/kde-devel/src/kdelibs/kdeui/xmlgui/kxmlguiwindow.cpp:126
#17 0xb590d914 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#18 0xb5912dea in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#19 0xb68209a2 in KApplication::notify (this=0xbfaccd98, receiver=0x930dde0, event=0xa99a550) at /home/kde-devel/src/kdelibs/kdeui/kernel/kapplication.cpp:311
#20 0xb6431b7e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#21 0xb64357f8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#22 0xb6435b2c in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/libQtCore.so.4
#23 0xb59c20bd in ?? () from /usr/lib/libQtGui.so.4
#24 0xb643070d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#25 0xb64309a9 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#26 0xb6435bda in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#27 0xb590b774 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#28 0x08052f3b in main (argc=1, argv=0xbfacd6a4) at /home/kde-devel/kdevelop/app/main.cpp:479

Reported using DrKonqi
Comment 1 Milian Wolff 2012-01-14 20:12:47 UTC
indeed, I get this:

ASSERT: "DUChain::lock()->currentThreadHasReadLock() || DUChain::lock()->currentThreadHasWriteLock()" in file /home/milian/projects/kde4/kdevplatform/language/duchain/declaration.cpp, line 341

I'll look into it
Comment 2 Milian Wolff 2012-01-14 20:43:47 UTC
Git commit ec88f4a54b41e9676ed5ad020f4598293512a3ed by Milian Wolff.
Committed on 14/01/2012 at 21:42.
Pushed by mwolff into branch '4.3'.

properly lock DUChain before accessing it

M  +2    -0    languages/cpp/codecompletion/context.cpp

http://commits.kde.org/kdevelop/ec88f4a54b41e9676ed5ad020f4598293512a3ed
Comment 3 Milian Wolff 2012-01-22 13:53:27 UTC
*** Bug 292169 has been marked as a duplicate of this bug. ***