Bug 271376

Summary: Crash when exiting KDevelop during debugging
Product: [Applications] kdevelop Reporter: Dima Ryazanov <dima>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: crash CC: valir
Priority: HI    
Version: 4.2.0   
Target Milestone: 4.2.0   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: New crash information added by DrKonqi

Description Dima Ryazanov 2011-04-20 21:26:14 UTC
Application: kdevelop (4.2.0)
KDE Platform Version: 4.6.1 (4.6.1)
Qt Version: 4.7.0
Operating System: Linux 2.6.39-rc2 x86_64
Distribution: Ubuntu 10.10

-- Information about the crash:
I was debugging an app, then closed KDevelop without stopping the debugger. KDevelop was doing something for a while, then crashed.

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

Thread 9 (Thread 0x7f8940b81700 (LWP 29899)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:212
#1  0x00007f8956e7ada2 in wait (this=<value optimized out>, mutex=0x1f8cf70, time=1000) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x1f8cf70, time=1000) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f895344001b in KDevelop::DUChainPrivate::CleanupThread::run (this=0x1f8cf50) at ../../language/duchain/duchain.cpp:286
#4  0x00007f8956e7a27e in QThreadPrivate::start (arg=0x1f8cf50) at thread/qthread_unix.cpp:266
#5  0x00007f8954f04971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#6  0x00007f8955b7a92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f8935d7f700 (LWP 29903)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f8956e7ae3b in wait (this=<value optimized out>, mutex=0xe53350, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0xe53350, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f894eca9d64 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x28289c0, th=0x2864aa0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f894ecacf6b in ThreadWeaver::WorkingHardState::applyForWork (this=0x2834310, th=0x2864aa0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f894ecab4df in ThreadWeaver::ThreadRunHelper::run (this=0x7f8935d7ee00, parent=0x28289c0, th=0x2864aa0) at ../../../threadweaver/Weaver/Thread.cpp:87
#6  0x00007f894ecaba38 in ThreadWeaver::Thread::run (this=0x2864aa0) at ../../../threadweaver/Weaver/Thread.cpp:142
#7  0x00007f8956e7a27e in QThreadPrivate::start (arg=0x2864aa0) at thread/qthread_unix.cpp:266
#8  0x00007f8954f04971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#9  0x00007f8955b7a92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f892f261700 (LWP 29925)):
#0  0x00007f8955b6e203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f8950f53009 in g_main_context_poll (context=0x2ae0920, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at /build/buildd/glib2.0-2.26.1/glib/gmain.c:3093
#2  g_main_context_iterate (context=0x2ae0920, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at /build/buildd/glib2.0-2.26.1/glib/gmain.c:2775
#3  0x00007f8950f5345c in g_main_context_iteration (context=0x2ae0920, may_block=1) at /build/buildd/glib2.0-2.26.1/glib/gmain.c:2843
#4  0x00007f8956f9a1e6 in QEventDispatcherGlib::processEvents (this=0x2ae0310, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#5  0x00007f8956f6ca02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#6  0x00007f8956f6cdec in QEventLoop::exec (this=0x7f892f260db0, flags=) at kernel/qeventloop.cpp:201
#7  0x00007f8956e772fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#8  0x00007f8956f4c5f8 in QInotifyFileSystemWatcherEngine::run (this=0x2adf860) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007f8956e7a27e in QThreadPrivate::start (arg=0x2adf860) at thread/qthread_unix.cpp:266
#10 0x00007f8954f04971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#11 0x00007f8955b7a92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f8929f94700 (LWP 29984)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f8941246334 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f8941551160) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x00007f8941246369 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0x7f894155f234) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x00007f8954f04971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#4  0x00007f8955b7a92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f8928e29700 (LWP 30003)):
#0  0x00007f8955b6e203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f8950f53009 in g_main_context_poll (context=0x3b15420, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at /build/buildd/glib2.0-2.26.1/glib/gmain.c:3093
#2  g_main_context_iterate (context=0x3b15420, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at /build/buildd/glib2.0-2.26.1/glib/gmain.c:2775
#3  0x00007f8950f5345c in g_main_context_iteration (context=0x3b15420, may_block=1) at /build/buildd/glib2.0-2.26.1/glib/gmain.c:2843
#4  0x00007f8956f9a1e6 in QEventDispatcherGlib::processEvents (this=0x3b14c70, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#5  0x00007f8956f6ca02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#6  0x00007f8956f6cdec in QEventLoop::exec (this=0x7f8928e28db0, flags=) at kernel/qeventloop.cpp:201
#7  0x00007f8956e772fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#8  0x00007f8956f4c5f8 in QInotifyFileSystemWatcherEngine::run (this=0x3b19ab0) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007f8956e7a27e in QThreadPrivate::start (arg=0x3b19ab0) at thread/qthread_unix.cpp:266
#10 0x00007f8954f04971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#11 0x00007f8955b7a92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f892854d700 (LWP 30021)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f894e4d320e in WTF::TCMalloc_PageHeap::scavengerThread (this=<value optimized out>) at wtf/FastMalloc.cpp:2378
#2  0x00007f894e4d3329 in WTF::TCMalloc_PageHeap::runScavengerThread (context=0x7f894ec8af14) at wtf/FastMalloc.cpp:1497
#3  0x00007f8954f04971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#4  0x00007f8955b7a92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f89269ab700 (LWP 30025)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f8956e7ae3b in wait (this=<value optimized out>, mutex=0x1050d50, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x1050d50, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f894eca9d64 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x1034150, th=0x374faa0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f894ecacf6b in ThreadWeaver::WorkingHardState::applyForWork (this=0x10565c0, th=0x374faa0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f894ecacf84 in ThreadWeaver::WorkingHardState::applyForWork (this=0x10565c0, th=0x374faa0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007f894ecab4df in ThreadWeaver::ThreadRunHelper::run (this=0x7f89269aae00, parent=0x1034150, th=0x374faa0) at ../../../threadweaver/Weaver/Thread.cpp:87
#7  0x00007f894ecaba38 in ThreadWeaver::Thread::run (this=0x374faa0) at ../../../threadweaver/Weaver/Thread.cpp:142
#8  0x00007f8956e7a27e in QThreadPrivate::start (arg=0x374faa0) at thread/qthread_unix.cpp:266
#9  0x00007f8954f04971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#10 0x00007f8955b7a92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f89261aa700 (LWP 30026)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f8956e7ae3b in wait (this=<value optimized out>, mutex=0x1050d50, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x1050d50, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f894eca9d64 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x1034150, th=0x7f893ca73c70) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f894ecacf6b in ThreadWeaver::WorkingHardState::applyForWork (this=0x10565c0, th=0x7f893ca73c70) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f894ecab4df in ThreadWeaver::ThreadRunHelper::run (this=0x7f89261a9e00, parent=0x1034150, th=0x7f893ca73c70) at ../../../threadweaver/Weaver/Thread.cpp:87
#6  0x00007f894ecaba38 in ThreadWeaver::Thread::run (this=0x7f893ca73c70) at ../../../threadweaver/Weaver/Thread.cpp:142
#7  0x00007f8956e7a27e in QThreadPrivate::start (arg=0x7f893ca73c70) at thread/qthread_unix.cpp:266
#8  0x00007f8954f04971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#9  0x00007f8955b7a92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f89589f0760 (LWP 29898)):
[KCrash Handler]
#6  Sublime::Area::toolViews (this=0x0) at ../../sublime/area.cpp:269
#7  0x00007f8957e6ab8e in KDevelop::UiController::findToolView (this=0xd871b0, name=..., factory=0x0, flags=KDevelop::IUiController::Raise) at ../../shell/uicontroller.cpp:246
#8  0x00007f8957eb9cd8 in KDevelop::DebugController::debuggerStateChanged (this=<value optimized out>, state=<value optimized out>) at ../../shell/debugcontroller.cpp:375
#9  0x00007f8957e3fa7b in KDevelop::DebugController::qt_metacall (this=0x106c810, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff9550f5a0) at moc_debugcontroller.cpp:113
#10 0x00007f8956f85b27 in QMetaObject::activate (sender=0xa136ff0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x2) at kernel/qobject.cpp:3280
#11 0x00007f8952cec43e in KDevelop::IDebugSession::stateChanged (this=0x0, _t1=KDevelop::IDebugSession::EndedState) at ./idebugsession.moc:146
#12 0x00007f89342f0623 in ?? () from /usr/lib/kde4/kdevgdb.so
#13 0x00007f89342f2a89 in ?? () from /usr/lib/kde4/kdevgdb.so
#14 0x00007f89342f3129 in ?? () from /usr/lib/kde4/kdevgdb.so
#15 0x00007f89342f3195 in ?? () from /usr/lib/kde4/kdevgdb.so
#16 0x00007f89342fae9d in ?? () from /usr/lib/kde4/kdevgdb.so
#17 0x00007f8956f85b27 in QMetaObject::activate (sender=0x8ebe050, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x2) at kernel/qobject.cpp:3280
#18 0x00007f8956f8acff in QSingleShotTimer::timerEvent (this=0x8ebe050) at kernel/qtimer.cpp:308
#19 0x00007f8956f7f8f9 in QObject::event (this=0x8ebe050, e=0x7fff9550f3b0) at kernel/qobject.cpp:1183
#20 0x00007f89562d4fdc in QApplicationPrivate::notify_helper (this=0xc956f0, receiver=0x8ebe050, e=0x7fff95510160) at kernel/qapplication.cpp:4396
#21 0x00007f89562daaed in QApplication::notify (this=0x7fff955106c0, receiver=0x8ebe050, e=0x7fff95510160) at kernel/qapplication.cpp:4277
#22 0x00007f895777c2c6 in KApplication::notify (this=0x7fff955106c0, receiver=0x8ebe050, event=0x7fff95510160) at ../../kdeui/kernel/kapplication.cpp:311
#23 0x0000000000404c89 in _start ()

Reported using DrKonqi
Comment 1 Milian Wolff 2011-04-22 14:36:06 UTC
is this reproducible?
Comment 2 Dima Ryazanov 2011-04-22 19:34:07 UTC
No, I haven't been able to reproduce it again.
Comment 3 Valentin Rusu 2011-08-02 22:57:39 UTC
Created attachment 62489 [details]
New crash information added by DrKonqi

kdevelop (4.2.60) on KDE Platform 4.7.40 (4.7.40 (KDE 4.8 >= 20110623) using Qt 4.7.4

- What I was doing when the application crashed:

I Forgot to stop the debugger before quitting ;-)

-- Backtrace (Reduced):
#6  0x00007f35a1bbca76 in Sublime::Area::toolViews (this=0x0) at /vrac2/kdesrc/4/trunk/extragear/kdevelop/kdevplatform/sublime/area.cpp:269
#7  0x00007f35a3119cc2 in KDevelop::UiController::findToolView (this=0x81d4f0, name=..., factory=0x0, flags=KDevelop::IUiController::Raise) at /vrac2/kdesrc/4/trunk/extragear/kdevelop/kdevplatform/shell/uicontroller.cpp:245
#8  0x00007f35a3178722 in KDevelop::DebugController::debuggerStateChanged (this=0xaeaa10, state=KDevelop::IDebugSession::EndedState) at /vrac2/kdesrc/4/trunk/extragear/kdevelop/kdevplatform/shell/debugcontroller.cpp:392
#9  0x00007f35a30e667f in KDevelop::DebugController::qt_metacall (this=0xaeaa10, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0x7fff196dd450) at /vrac2/kdesrc/4/build/extragear/kdevelop/kdevplatform/shell/moc_debugcontroller.cpp:113
[...]
#12 0x00007f35a195b51e in KDevelop::IDebugSession::stateChanged (this=0x5fc58b0, _t1=KDevelop::IDebugSession::EndedState) at /vrac2/kdesrc/4/build/extragear/kdevelop/kdevplatform/debugger/idebugsession.moc:146
Comment 4 Aleix Pol 2012-01-18 02:24:36 UTC
Git commit b9c4e5347130af68ea8af5c46b49b9e71b6310e0 by Aleix Pol.
Committed on 18/01/2012 at 03:23.
Pushed by apol into branch '1.3'.

findToolView should return 0 if there's no active area.

M  +1    -1    shell/uicontroller.cpp

http://commits.kde.org/kdevplatform/b9c4e5347130af68ea8af5c46b49b9e71b6310e0
Comment 5 Aleix Pol 2012-01-18 02:24:36 UTC
Git commit 575303fb1ebe65dbacfd8f61eb97c7fc9c2b39d6 by Aleix Pol.
Committed on 18/01/2012 at 03:23.
Pushed by apol into branch 'master'.

findToolView should return 0 if there's no active area.

M  +1    -1    shell/uicontroller.cpp

http://commits.kde.org/kdevplatform/575303fb1ebe65dbacfd8f61eb97c7fc9c2b39d6