Summary: | KDevelop crashes after pressing interrupt and gdb complains about missing source file | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Andreas Roth <aroth> |
Component: | CPP Debugger | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | niko.sams |
Priority: | VHI | Keywords: | drkonqi |
Version: | 4.5.60 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevplatform/02522dae26a5a8df25c8c323a765d68c27bde17f | Version Fixed In: | |
Sentry Crash Report: |
Description
Andreas Roth
2013-10-22 10:51:21 UTC
I using the daily packages from my PPA (https://launchpad.net/~aroth/+archive/ppa). kdevelop 4:4.5.60~0.1~git20131022+r16781-0daily7~ubuntu13.04.1 kdevplatform7-libs 1.5.60~0.1~git20131021+r7082-0daily7~ubuntu13.04.1 I installed the source of libc (apt-get source libc6) and moved/copied the eglibc-2.17 directory to /build/buildd. Afterwards the message box does not appear anymore and kdevelop does not crash. It seems like kdevelop is trying to open the source file for the location where the current thread is running. Crash is inside Okteta plugin. Curious why KDevelop decides to open that file with the Okteta plugin, expect the problem still outside of Okteta ;) Andreas, to make sure, could you please also add the debug info for the Okteta (libs), so the backtrace into the Okteta sources has some more info, and then reproduce it once more and add the backtrace here again? Here the crash dump as requested (I post only the backtrace of the crashing thead): Thread 1 (Thread 0x7ffd694097c0 (LWP 3838)): [KCrash Handler] #6 0x00007ffcbb79916b in Kasten2::ByteArrayView::init (this=this@entry=0x7702c20) at ../../../kasten/gui/view/bytearrayview.cpp:107 #7 0x00007ffcbb799448 in Kasten2::ByteArrayView::ByteArrayView (this=0x7702c20, document=0x0, synchronizer=0x768edc0) at ../../../kasten/gui/view/bytearrayview.cpp:45 #8 0x00007ffcbbbe39f5 in KDevelop::OktetaView::OktetaView (this=0x4a6f650, document=<optimized out>, viewProfileSynchronizer=0x768edc0) at ../../../utils/okteta/oktetaview.cpp:39 #9 0x00007ffcbbbe31ce in KDevelop::OktetaDocument::newView (this=0x61f8d40, document=<optimized out>) at ../../../utils/okteta/oktetadocument.cpp:271 #10 0x00007ffd67c09685 in Sublime::Document::createView (this=this@entry=0x61f8d40) at ../../sublime/document.cpp:79 #11 0x00007ffd688d0b42 in KDevelop::DocumentControllerPrivate::openDocumentInternal (this=this@entry=0x12df3d0, doc=doc@entry=0x61f8d60, range=..., activationParams=..., buddy=buddy@entry=0x0) at ../../shell/documentcontroller.cpp:385 #12 0x00007ffd688d1d1c in KDevelop::DocumentControllerPrivate::openDocumentInternal (this=0x12df3d0, inputUrl=..., prefName=..., range=..., encoding=..., activationParams=..., buddy=buddy@entry=0x0) at ../../shell/documentcontroller.cpp:326 #13 0x00007ffd688ce938 in KDevelop::DocumentController::openDocument (this=0x12dce50, inputUrl=..., range=..., activationParams=..., encoding=..., buddy=0x0) at ../../shell/documentcontroller.cpp:722 #14 0x00007ffd68b6f52c in KDevelop::IDocumentController::openDocument (this=0x12dce50, url=..., cursor=..., activationParams=..., encoding=...) at ../../interfaces/idocumentcontroller.cpp:33 #15 0x00007ffd6890515a in KDevelop::DebugController::showStepInSource (this=<optimized out>, url=..., lineNum=80) at ../../shell/debugcontroller.cpp:354 #16 0x00007ffd66fcd0ef in QMetaObject::activate (sender=sender@entry=0x76d7e40, m=m@entry=0x7ffd62cd1e40 <KDevelop::IDebugSession::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff7197d370) at kernel/qobject.cpp:3539 #17 0x00007ffd62aae61b in KDevelop::IDebugSession::showStepInSource (this=this@entry=0x76d7e40, _t1=..., _t2=_t2@entry=80, _t3=...) at ./idebugsession.moc:167 #18 0x00007ffd62aaea54 in KDevelop::IDebugSession::setCurrentPosition (this=this@entry=0x76d7e40, url=..., line=line@entry=80, addr=...) at ../../debugger/interfaces/idebugsession.cpp:110 #19 0x00007ffcb9ce98a3 in GDBDebugger::DebugSession::slotProgramStopped (this=0x76d7e40, r=...) at ../../../debuggers/gdb/debugsession.cpp:769 #20 0x00007ffcb9cef84e in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>, _c=<optimized out>) at ./debugsession.moc:169 #21 GDBDebugger::DebugSession::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./debugsession.moc:128 #22 0x00007ffd66fcd0ef in QMetaObject::activate (sender=sender@entry=0x8078830, m=m@entry=0x7ffcb9f353e0 <GDBDebugger::GDB::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7fff7197d950) at kernel/qobject.cpp:3539 #23 0x00007ffcb9cba8b5 in GDBDebugger::GDB::programStopped (this=this@entry=0x8078830, _t1=...) at moc_gdb.cpp:152 #24 0x00007ffcb9cbc6cf in GDBDebugger::GDB::processLine (this=this@entry=0x8078830, line=...) at ../../../debuggers/gdb/gdb.cpp:268 #25 0x00007ffcb9cbd00f in GDBDebugger::GDB::readyReadStandardOutput (this=0x8078830) at ../../../debuggers/gdb/gdb.cpp:189 #26 0x00007ffd66fcd0ef in QMetaObject::activate (sender=sender@entry=0x2be3620, m=m@entry=0x7ffd6730f880 <QProcess::staticMetaObject>, local_signal_index=local_signal_index@entry=5, argv=argv@entry=0x0) at kernel/qobject.cpp:3539 #27 0x00007ffd66f4e493 in QProcess::readyReadStandardOutput (this=this@entry=0x2be3620) at .moc/release-shared/moc_qprocess.cpp:176 #28 0x00007ffd66f51c58 in QProcessPrivate::_q_canReadStandardOutput (this=0x80780d0) at io/qprocess.cpp:915 #29 0x00007ffd66f5234e in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>, _c=<optimized out>) at .moc/release-shared/moc_qprocess.cpp:84 #30 QProcess::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/release-shared/moc_qprocess.cpp:69 #31 0x00007ffd66fcd0ef in QMetaObject::activate (sender=sender@entry=0x8076bd0, m=m@entry=0x7ffd67313980 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff7197de60) at kernel/qobject.cpp:3539 #32 0x00007ffd67018d2e in QSocketNotifier::activated (this=this@entry=0x8076bd0, _t1=70) at .moc/release-shared/moc_qsocketnotifier.cpp:103 #33 0x00007ffd66fd5b0b in QSocketNotifier::event (this=0x8076bd0, e=0x7fff7197e480) at kernel/qsocketnotifier.cpp:317 #34 0x00007ffd6635b8ec in QApplicationPrivate::notify_helper (this=this@entry=0xaa1700, receiver=receiver@entry=0x8076bd0, e=e@entry=0x7fff7197e480) at kernel/qapplication.cpp:4567 #35 0x00007ffd6635e25b in QApplication::notify (this=this@entry=0x7fff7197ebd0, receiver=receiver@entry=0x8076bd0, e=e@entry=0x7fff7197e480) at kernel/qapplication.cpp:4428 #36 0x00007ffd677c09b6 in KApplication::notify (this=0x7fff7197ebd0, receiver=0x8076bd0, event=0x7fff7197e480) at ../../kdeui/kernel/kapplication.cpp:311 #37 0x00007ffd66fb863e in QCoreApplication::notifyInternal (this=0x7fff7197ebd0, receiver=0x8076bd0, event=event@entry=0x7fff7197e480) at kernel/qcoreapplication.cpp:946 #38 0x00007ffd66fe75c8 in sendEvent (event=0x7fff7197e480, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231 #39 socketNotifierSourceDispatch (source=0xaa1940) at kernel/qeventdispatcher_glib.cpp:110 #40 0x00007ffd5ff38f05 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #41 0x00007ffd5ff39248 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #42 0x00007ffd5ff39304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #43 0x00007ffd66fe7016 in QEventDispatcherGlib::processEvents (this=0x9f2d80, flags=...) at kernel/qeventdispatcher_glib.cpp:424 #44 0x00007ffd6640113e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #45 0x00007ffd66fb738f in QEventLoop::processEvents (this=this@entry=0x7fff7197e6c0, flags=...) at kernel/qeventloop.cpp:149 #46 0x00007ffd66fb7618 in QEventLoop::exec (this=this@entry=0x7fff7197e6c0, flags=...) at kernel/qeventloop.cpp:204 #47 0x00007ffd66fbccf6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218 #48 0x00007ffd66359ffc in QApplication::exec () at kernel/qapplication.cpp:3828 #49 0x000000000040fbb0 in main (argc=<optimized out>, argv=<optimized out>) at ../../app/main.cpp:566 Easily crashes kdevelop. > #7 0x00007ffcbb799448 in Kasten2::ByteArrayView::ByteArrayView (this=0x7702c20, document=0x0, synchronizer=0x768edc0) at ../../../kasten/gui/view/bytearrayview.cpp:45
Called with "document=0x0", which is probably the cause for the crash.
Andreas, thanks for the new backtrace. Sadly I cannot reproduce this myself, interrupting any program in a debug run does not trigger any message box for me, everything works as expected. Possibly because I do not have any project where something like /build/buildd/eglibc-2.17/sysdeps/unix/syscall-template.S is used? Seems for some reason the file behind the url passed to OktetaDocument constructor (and then Sublime::UrlDocument) cannot be loaded. Sadly this is not catched at all in OktetaDocument::newView(), thus the crash. Three questions to the KDevelop developers, Milian especially, as you seem able to reproduce this crash: 1. why is it tried at all to create a Okteta document and view in that situation? 2. what maybe special about the url in this case which may result in a failed load? 3. what should be returned in the overwritten Sublime::Document::newView(Document *doc) in a case of no document loaded, is 0 okay? (not specified in the API dox) (Passing back to KDevelop, as some unexpected stuff seems to happen also in its code before reaching Okteta's one) I can reproduce it even simpler: Ctrl + O -> enter some invalid URL (or non-existing file) there -> accept -> boom. This could actually be related to https://git.reviewboard.kde.org/r/112078/ ... So maybe a KDevelop bug after all? Git commit 481a60099dd4b13f18ddca2e82ecd4605c8629e3 by Milian Wolff. Committed on 04/11/2013 at 22:44. Pushed by mwolff into branch 'master'. Don't crash in Okteta when opening non-existing file. We now enforce a text/plain mimetype for non-existing files. This then triggers the creation of a katepart editor view which gracefully handles the case of non-existing files. M +14 -8 shell/documentcontroller.cpp http://commits.kde.org/kdevplatform/481a60099dd4b13f18ddca2e82ecd4605c8629e3 Git commit b3ef48be33b00b3bd323320d6d3d446e6160b8ed by Milian Wolff. Committed on 04/11/2013 at 22:53. Pushed by mwolff into branch 'master'. Don't set KDEVPLATFORM_JSONTESTS_LIBRARIES when QJson was not found. M +2 -0 KDevPlatformConfig.cmake.in http://commits.kde.org/kdevplatform/b3ef48be33b00b3bd323320d6d3d446e6160b8ed Git commit 5965eed3f5b87ccaa3207c0bcca2ac1872b13806 by Milian Wolff. Committed on 04/11/2013 at 22:44. Pushed by mwolff into branch '1.6'. backport: Don't crash in Okteta when opening non-existing file. We now enforce a text/plain mimetype for non-existing files. This then triggers the creation of a katepart editor view which gracefully handles the case of non-existing files. M +14 -8 shell/documentcontroller.cpp http://commits.kde.org/kdevplatform/5965eed3f5b87ccaa3207c0bcca2ac1872b13806 Git commit 02522dae26a5a8df25c8c323a765d68c27bde17f by Milian Wolff. Committed on 04/11/2013 at 22:53. Pushed by mwolff into branch '1.6'. backport: Don't set KDEVPLATFORM_JSONTESTS_LIBRARIES when QJson was not found. M +2 -0 KDevPlatformConfig.cmake.in http://commits.kde.org/kdevplatform/02522dae26a5a8df25c8c323a765d68c27bde17f |