Bug 146958 - crash stepping through c++ in debugger
Summary: crash stepping through c++ in debugger
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: CPP Debugger (show other bugs)
Version: 3.4.1
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 148645 152790 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-19 13:30 UTC by Rob L
Modified: 2008-11-11 08:25 UTC (History)
4 users (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 Rob L 2007-06-19 13:30:35 UTC
Version:           3.4.1 (using KDE KDE 3.5.1)
Installed from:    SuSE RPMs
OS:                Linux

See stack trace below.  I've only seen this once so far so probably can't replicate it.

System configuration startup check disabled.

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1239996224 (LWP 4953)]
[New Thread -1268073568 (LWP 5024)]
[New Thread -1254499424 (LWP 5012)]
[KCrash handler]
#6  0xb49ad197 in GDBDebugger::VarItem::handleSpecialTypes ()
   from /opt/kde3/lib/kde3/libkdevdebugger.so
#7  0xb49ada23 in GDBDebugger::VarItem::updateValue ()
   from /opt/kde3/lib/kde3/libkdevdebugger.so
#8  0xb49afe36 in GDBDebugger::VariableTree::handleVarUpdate ()
   from /opt/kde3/lib/kde3/libkdevdebugger.so
#9  0xb499dcb9 in GDBDebugger::GDBCommand::invokeHandler ()
   from /opt/kde3/lib/kde3/libkdevdebugger.so
#10 0xb499b21c in GDBDebugger::GDBController::processMICommandResponse ()
   from /opt/kde3/lib/kde3/libkdevdebugger.so
#11 0xb499b6a6 in GDBDebugger::GDBController::slotDbgStdout ()
   from /opt/kde3/lib/kde3/libkdevdebugger.so
#12 0xb4995db3 in GDBDebugger::GDBController::qt_invoke ()
   from /opt/kde3/lib/kde3/libkdevdebugger.so
#13 0xb7139e9d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#14 0xb76c21fe in KProcess::receivedStdout ()
   from /opt/kde3/lib/libkdecore.so.4
#15 0xb76c22d8 in KProcess::childOutput () from /opt/kde3/lib/libkdecore.so.4
#16 0xb76c2309 in KProcess::slotChildOutput ()
   from /opt/kde3/lib/libkdecore.so.4
#17 0xb76c236a in KProcess::qt_invoke () from /opt/kde3/lib/libkdecore.so.4
#18 0xb7139e9d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#19 0xb713aa02 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#20 0xb7472170 in QSocketNotifier::activated ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#21 0xb71580d0 in QSocketNotifier::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0xb70daf37 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#23 0xb70dbd01 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#24 0xb77838e3 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#25 0xb70cfb74 in QEventLoop::activateSocketNotifiers ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#26 0xb708a644 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#27 0xb70f1d68 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#28 0xb70f1bfe in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#29 0xb70daaef in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#30 0x0804dee5 in main ()
Comment 1 Rob L 2007-07-11 12:41:27 UTC
Had a repeat running kdev in gdb, not sure if the extra info helps:

#0  0xb61586cc in memcpy () from /lib/libc.so.6
#1  0xb6b0114d in QString::operator+= () from /usr/lib/qt3/lib/libqt-mt.so.3
#2  0xb7fa67b9 in kdbgstream::operator<< (this=0xbfa1b834, string=@0x94aca38)
    at /opt/kde3/include/kdebug.h:218
#3  0xb47b5c01 in GDBDebugger::VarItem::handleSpecialTypes (this=0x94ac9d0)
    at kdevelop/languages/cpp/debugger/variablewidget.cpp:1702
#4  0xb47b6426 in GDBDebugger::VarItem::updateValue (this=0x94ac9d0)
    at kdevelop/kdevelop/languages/cpp/debugger/variablewidget.cpp:1583

frame 3
p *this
$11 = {<> = {<No data fields>}, <GDBDebugger::TrimmableItem> = {<> = {<No data fields>}, <No data fields>}, expression_ = {d = 0x9e4d7c0}, highlight_ = false,
  controller_ = 0x0, varobjName_ = {d = 0x39}, originalValueType_ = {
    d = 0x94eb928}, oldSpecialRepresentationSet_ = 120,
  oldSpecialRepresentation_ = {d = 0x200072}, format_ = 6815860,
  numChildren_ = 2097253, childrenFetched_ = 80, currentAddress_ = {
    d = 0x74006f}, lastObtainedAddress_ = {d = 0x6e0055},
  updateUnconditionally_ = 105, frozen_ = false, initialCreation_ = 116,
  baseClassMember_ = false, alive_ = 32}
printqstring originalValueType_
Cannot access memory at address 0x39
p originalValueType_.length()
$14 = 155896368
 p originalValueType_.left(10)

Program received signal SIGSEGV, Segmentation fault. (ie. gdb crashed)
Comment 2 Andreas Pakulat 2007-12-02 00:50:52 UTC
*** Bug 148645 has been marked as a duplicate of this bug. ***
Comment 3 Andreas Pakulat 2007-12-02 01:39:58 UTC
*** Bug 152790 has been marked as a duplicate of this bug. ***
Comment 4 Andreas Pakulat 2008-07-06 21:48:03 UTC
Just going through the bugreport list I'm seeing a lot backtraces from you ending in QString::operator+=() and I'm wondering wether this might actually be a problem with your Qt. The places where these operators are called don't really have any uninitialized qstrings and this is really suspicious.
Comment 5 Rob L 2008-07-07 11:01:35 UTC
I have the standard qt3-3.3.5-58.29 installed as part of SLES10.  Unfortunately I am unable to upgrade to something more recent at the moment.  I haven't noticed similar problems with any other application though.
Comment 6 Amilcar do Carmo Lucas 2008-07-07 14:43:56 UTC
Please update to KDevelop 3.5.2.
Binary packages (rpm) for SLES10 are available at the download page at www.kdevelop.org

You have no excuses not to update KDevelop.
Comment 7 Rob L 2008-07-07 14:51:54 UTC
I am using kdevelop3-3.5.2-34.1 and update this whenever possible.  I haven't seen this particular crash for a while but Bug 145563 still crashes on a regular basis (every few days).
Comment 8 leon pollak 2008-07-07 15:08:14 UTC
I confirm this crash to happen each day once or twice.
I am not able to trace the cause, but it is definitely connected to the debugger stepping in C++.
BTW, as I do pure embedded development, I have nothing in common with qt and Co.
Hope this helps. 
Comment 9 Rob L 2008-07-07 15:41:16 UTC
Hi Leon, could you tell us what distribution/OS you are using and what Qt it has installed (eg. rpm -q qt3)?  Kdevelop uses Qt even if you are not developing with it (in fact I'm developing with Qt 4.4.0)
Comment 10 leon pollak 2008-07-07 15:52:33 UTC
I have qt-3.3.8b-2.fc8 - obviously, it is fedora 8 :-)
No need to say that it is kdevelop 3.5.2 (last binary).

I have this problem for more then a year. First it was much worse - each 10-15min.  Then I was able to follow the cause - closing the source text window where the program counter resides.

The latest versions have it in a constant low rate and therefore it is difficult to determine where...
Comment 11 Sebastien Calvi 2008-10-20 17:22:50 UTC
Hello,

I'm using:

Version: 3.4.1 (using KDE KDE 3.5.9) Installed from: ubuntu hardi heron
GNU gdb 6.8-debian

I've had this crash a few times now (5-7 times in the past month, since i started to work with Kdevelop)

here is the backtrace:

(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb5ef16c0 (LWP 30081)]
[New Thread 0xb467bb90 (LWP 31335)]
[New Thread 0xb5222b90 (LWP 31315)]
[KCrash handler]
#6  0xb479e3f1 in GDBDebugger::VarItem::handleSpecialTypes ()
   from /usr/lib/kde3/libkdevdebugger.so
#7  0xb479eca3 in GDBDebugger::VarItem::updateValue ()
   from /usr/lib/kde3/libkdevdebugger.so
#8  0xb47a0dda in GDBDebugger::VariableTree::handleVarUpdate ()
   from /usr/lib/kde3/libkdevdebugger.so
#9  0xb478cebf in GDBDebugger::GDBCommand::invokeHandler ()
   from /usr/lib/kde3/libkdevdebugger.so
#10 0xb478839e in GDBDebugger::GDBController::processMICommandResponse ()
   from /usr/lib/kde3/libkdevdebugger.so
#11 0xb4788957 in GDBDebugger::GDBController::slotDbgStdout ()
   from /usr/lib/kde3/libkdevdebugger.so
#12 0xb4784e12 in GDBDebugger::GDBController::qt_invoke ()
   from /usr/lib/kde3/libkdevdebugger.so
#13 0xb717d704 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#14 0xb7773a23 in KProcess::receivedStdout () from /usr/lib/libkdecore.so.4
#15 0xb7773b18 in KProcess::childOutput () from /usr/lib/libkdecore.so.4
#16 0xb7773b49 in KProcess::slotChildOutput () from /usr/lib/libkdecore.so.4
#17 0xb77757e2 in KProcess::qt_invoke () from /usr/lib/libkdecore.so.4
#18 0xb717d704 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#19 0xb717e051 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#20 0xb750db99 in QSocketNotifier::activated () from /usr/lib/libqt-mt.so.3
#21 0xb719f766 in QSocketNotifier::event () from /usr/lib/libqt-mt.so.3
#22 0xb7111c36 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#23 0xb7113a5f in QApplication::notify () from /usr/lib/libqt-mt.so.3
#24 0xb784b672 in KApplication::notify () from /usr/lib/libkdecore.so.4
#25 0xb70a228d in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#26 0xb7103b4a in QEventLoop::activateSocketNotifiers ()
   from /usr/lib/libqt-mt.so.3
#27 0xb70b7630 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#28 0xb712cf90 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#29 0xb712cc8e in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#30 0xb71137df in QApplication::exec () from /usr/lib/libqt-mt.so.3
#31 0x0804e644 in ?? ()
#32 0xb7c39450 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#33 0x0804da21 in ?? ()

Program received signal SIGSEGV, Segmentation fault. (ie. gdb crashed) 




An other thing I debug a lot using step over qnd step into and often, very often gdb "quit" while my application is still running... I mainly debug libraries that I compiled with the following options:
-Wall -O -ggdb3
Same options for the applicaion that I run through Kdevelop.
Comment 12 Amilcar do Carmo Lucas 2008-11-08 17:32:37 UTC
Sebastien, please update to KDevelop 3.5.3-2 and retest.
Comment 13 Sebastien Calvi 2008-11-10 23:21:28 UTC
(In reply to comment #12)
> Sebastien, please update to KDevelop 3.5.3-2 and retest.
> 

Okay, now with the last version the problem is gone.... thanks!