Bug 235422 - Crash on closing kdevelop with running debug session
Summary: Crash on closing kdevelop with running debug session
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: CPP Debugger (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 230479 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-26 11:13 UTC by Gunther Piez
Modified: 2010-05-29 11:16 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 Gunther Piez 2010-04-26 11:13:16 UTC
Application: kdevelop (3.10.2 (using KDevPlatform 0.10.2))
KDE Platform Version: 4.4.2 (KDE 4.4.2) (Compiled from sources)
Qt Version: 4.6.2
Operating System: Linux 2.6.33.2 x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
I closed kdevelop, while a debug session was still running in it.

 -- Backtrace:
Application: KDevelop (kdevelop.bin), signal: Segmentation fault
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.2200.4-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Current thread is 1 (Thread 0x7f15aa453760 (LWP 17910))]

Thread 3 (Thread 0x7f159430c710 (LWP 17912)):
#0  pthread_cond_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
#1  0x00007f15a6be3a88 in QWaitConditionPrivate::wait (this=<value optimized out>, mutex=0xafc970, time=200000) at thread/qwaitcondition_unix.cpp:85
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0xafc970, time=200000) at thread/qwaitcondition_unix.cpp:159
#3  0x00007f15a36b609e in KDevelop::DUChainPrivate::CleanupThread::run (this=0xafc950) at /home/gpiez/src/kdevplatform/language/duchain/duchain.cpp:286
#4  0x00007f15a6be29aa in QThreadPrivate::start (arg=0xafc950) at thread/qthread_unix.cpp:248
#5  0x00007f15a6953b24 in start_thread () from /lib/libpthread.so.0
#6  0x00007f15a4ed3f4d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f1588dac710 (LWP 18000)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f15a428568b in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f15a456e220) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2304
#2  0x00007f15a42856d9 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0x7f15a457c2ec) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1438
#3  0x00007f15a6953b24 in start_thread () from /lib/libpthread.so.0
#4  0x00007f15a4ed3f4d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f15aa453760 (LWP 17910)):
[KCrash Handler]
#5  0x00007f15a2d58f39 in KDevelop::IVariableController::variableCollection (this=<value optimized out>) at /home/gpiez/src/kdevplatform/debugger/interfaces/ivariablecontroller.cpp:41
#6  0x00007f15a2d58fe8 in KDevelop::IVariableController::handleEvent (this=0x14ea350, event=<value optimized out>) at /home/gpiez/src/kdevplatform/debugger/interfaces/ivariablecontroller.cpp:88
#7  0x00007f158dc804b8 in GDBDebugger::VariableController::handleEvent (this=0x14ea350, event=KDevelop::IDebugSession::program_state_changed)
    at /home/gpiez/src/kdevelop/debuggers/gdb/variablecontroller.cpp:242
#8  0x00007f15a2d552df in KDevelop::IDebugSession::raiseEvent (this=0x3881e80, e=KDevelop::IDebugSession::thread_or_frame_changed)
    at /home/gpiez/src/kdevplatform/debugger/interfaces/idebugsession.cpp:75
#9  0x00007f158dc74618 in GDBDebugger::DebugSession::raiseEvent (this=0x3881e80, e=KDevelop::IDebugSession::program_state_changed) at /home/gpiez/src/kdevelop/debuggers/gdb/debugsession.cpp:1255
#10 0x00007f15a2d6c4c9 in KDevelop::FrameStackModel::setCurrentFrame (this=0x3ab5d40, frame=0) at /home/gpiez/src/kdevplatform/debugger/framestack/framestackmodel.cpp:282
#11 0x00007f15a2d6c9bc in KDevelop::FrameStackModel::stateChanged (this=0x14ea350, state=<value optimized out>) at /home/gpiez/src/kdevplatform/debugger/framestack/framestackmodel.cpp:311
#12 0x00007f15a2d6c9ff in KDevelop::FrameStackModel::qt_metacall (this=0x3ab5d40, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff18ffe1f0)
    at /home/gpiez/src/kdevplatform/build/debugger/framestackmodel.moc:73
#13 0x00007f15a6d12791 in QMetaObject::activate (sender=0x3881e80, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3285
#14 0x00007f15a2d553be in KDevelop::IDebugSession::stateChanged (this=0x14ea350, _t1=KDevelop::IDebugSession::PausedState) at /home/gpiez/src/kdevplatform/build/debugger/idebugsession.moc:143
#15 0x00007f158dc74ed2 in GDBDebugger::DebugSession::setSessionState (this=0x3881e80, state=KDevelop::IDebugSession::PausedState) at /home/gpiez/src/kdevelop/debuggers/gdb/debugsession.cpp:132
#16 0x00007f158dc7527a in GDBDebugger::DebugSession::_gdbStateChanged (this=0x3881e80, oldState=) at /home/gpiez/src/kdevelop/debuggers/gdb/debugsession.cpp:216
#17 0x00007f158dc75a52 in GDBDebugger::DebugSession::setStateOff (this=0x3881e80, stateOff=) at /home/gpiez/src/kdevelop/debuggers/gdb/debugsession.cpp:1325
#18 0x00007f158dc79ccf in GDBDebugger::DebugSession::slotProgramStopped (this=0x3881e80, r=...) at /home/gpiez/src/kdevelop/debuggers/gdb/debugsession.cpp:668
#19 0x00007f158dc7a916 in GDBDebugger::DebugSession::qt_metacall (this=0x3881e80, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff18ffe910)
    at /home/gpiez/src/kdevelop/build/debuggers/gdb/debugsession.moc:205
#20 0x00007f15a6d12791 in QMetaObject::activate (sender=0x481bf60, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3285
#21 0x00007f158dc57095 in GDBDebugger::GDB::programStopped (this=0x14ea350, _t1=<value optimized out>) at /home/gpiez/src/kdevelop/build/debuggers/gdb/moc_gdb.cpp:138
#22 0x00007f158dc57ea2 in GDBDebugger::GDB::processLine (this=0x481bf60, line=...) at /home/gpiez/src/kdevelop/debuggers/gdb/gdb.cpp:254
#23 0x00007f158dc584c5 in GDBDebugger::GDB::readyReadStandardOutput (this=0x481bf60) at /home/gpiez/src/kdevelop/debuggers/gdb/gdb.cpp:175
#24 0x00007f158dc5726c in GDBDebugger::GDB::qt_metacall (this=0x481bf60, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff18ffec60)
    at /home/gpiez/src/kdevelop/build/debuggers/gdb/moc_gdb.cpp:111
#25 0x00007f15a6d12791 in QMetaObject::activate (sender=0x23ce630, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3285
#26 0x00007f15a6c8c0f0 in QProcessPrivate::_q_canReadStandardOutput (this=0x4825d00) at io/qprocess.cpp:887
#27 0x00007f15a6c8c549 in QProcess::qt_metacall (this=0x23ce630, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff18ffee70) at .moc/debug-shared/moc_qprocess.cpp:107
#28 0x00007f15a9ec6568 in KProcess::qt_metacall (this=0x14ea350, _c=QMetaObject::ReadProperty, _id=6492992, _a=0x1)
    at /var/tmp/portage/kde-base/kdelibs-4.4.2/work/kdelibs-4.4.2_build/kdecore/kprocess.moc:69
#29 0x00007f15a6d12791 in QMetaObject::activate (sender=0x3f723a0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3285
#30 0x00007f15a6d6fefe in QSocketNotifier::activated (this=0x14ea350, _t1=55) at .moc/debug-shared/moc_qsocketnotifier.cpp:89
#31 0x00007f15a6d1d933 in QSocketNotifier::event (this=0x3f723a0, e=0x7fff18fff520) at kernel/qsocketnotifier.cpp:317
#32 0x00007f15a5d27450 in QApplicationPrivate::notify_helper (this=0x675ce0, receiver=0x3f723a0, e=0x7fff18fff520) at kernel/qapplication.cpp:4300
#33 0x00007f15a5d27771 in QApplication::notify (this=0x7fff18fff9d0, receiver=<value optimized out>, e=0x7fff18fff520) at kernel/qapplication.cpp:4183
#34 0x00007f15a74e4c96 in KApplication::notify (this=0x7fff18fff9d0, receiver=0x3f723a0, event=0x7fff18fff520)
    at /var/tmp/portage/kde-base/kdelibs-4.4.2/work/kdelibs-4.4.2/kdeui/kernel/kapplication.cpp:302
#35 0x00007f15a6cfb9ab in QCoreApplication::notifyInternal (this=0x7fff18fff9d0, receiver=0x3f723a0, event=0x7fff18fff520) at kernel/qcoreapplication.cpp:704
#36 0x00007f15a6d2e67a in QCoreApplication::sendEvent (source=0x6799f0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#37 socketNotifierSourceDispatch (source=0x6799f0) at kernel/qeventdispatcher_glib.cpp:110
#38 0x00007f15a02f7e9d in g_main_dispatch (context=0x678920) at gmain.c:1960
#39 IA__g_main_context_dispatch (context=0x678920) at gmain.c:2513
#40 0x00007f15a02fb858 in g_main_context_iterate (context=0x678920, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2591
#41 0x00007f15a02fb980 in IA__g_main_context_iteration (context=0x678920, may_block=1) at gmain.c:2654
#42 0x00007f15a6d2e323 in QEventDispatcherGlib::processEvents (this=0x675c40, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#43 0x00007f15a5de801e in QGuiEventDispatcherGlib::processEvents (this=0x14ea350, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#44 0x00007f15a6cfa4b2 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#45 0x00007f15a6cfa885 in QEventLoop::exec (this=0x7fff18fff780, flags=) at kernel/qeventloop.cpp:201
#46 0x00007f15a6cfcaab in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#47 0x0000000000407b9b in main (argc=<value optimized out>, argv=<value optimized out>) at /home/gpiez/src/kdevelop/app/main_internal.cpp:232

This bug may be a duplicate of or related to bug 230479.

Possible duplicates by query: bug 230479.

Reported using DrKonqi
Comment 1 Andreas Pakulat 2010-04-26 11:32:05 UTC
*** Bug 230479 has been marked as a duplicate of this bug. ***
Comment 2 Niko Sams 2010-05-29 11:16:13 UTC
commit 87d6a7409b34c2b85356118514222786d3f863e1
Author: Niko Sams <niko.sams@gmail.com>
Date:   Sat May 29 11:11:06 2010 +0200

    Fix crash when closing kdevelop with running debug session
    
    BUG: 235422

diff --git a/debugger/interfaces/ivariablecontroller.cpp b/debugger/interfaces/ivariablecontroller.cpp
index 6c007f1..b15a50d 100644
--- a/debugger/interfaces/ivariablecontroller.cpp
+++ b/debugger/interfaces/ivariablecontroller.cpp
@@ -38,6 +38,7 @@ IVariableController::IVariableController(IDebugSession* parent)
 
 VariableCollection* IVariableController::variableCollection()
 {
+    if (!ICore::self()) return 0;
     return ICore::self()->debugController()->variableCollection();
 }
 
@@ -80,6 +81,8 @@ void IVariableController::updateIfFrameOrThreadChanged()
 
 void IVariableController::handleEvent(IDebugSession::event_t event)
 {
+    if (!variableCollection()) return;
+
     switch (event) {
     case IDebugSession::program_state_changed:
     case IDebugSession::thread_or_frame_changed: