Summary: | When using "fetch project", a bad subversion path crashes kdevelop | ||
---|---|---|---|
Product: | [Developer tools] kdevplatform | Reporter: | Glen Kaukola <gkaukola> |
Component: | subversion | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | alsantos123, batyiev, cfeck, marcus_gasser, msnkipa, pancho.s, pharscape, rbyshko |
Priority: | VHI | ||
Version: | git master | ||
Target Milestone: | 1.2.0 | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevplatform/69f84d44c2c158db89fe56540814688dba079fb8 | Version Fixed In: | 1.2 |
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 310978 |
Description
Glen Kaukola
2011-05-20 23:12:45 UTC
confirmed valgrind log: ==16229== Thread 1: ==16229== Invalid read of size 8 ==16229== at 0x90D23C7: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.h:125) ==16229== by 0x4F66D31: KJob::result(KJob*) (kjob.moc:194) ==16229== by 0x4F66D6F: KJob::emitResult() (kjob.cpp:312) ==16229== by 0x25C66397: SvnJobBase::internalJobFailed(ThreadWeaver::Job*) (svnjobbase.cpp:159) ==16229== by 0x25C66AE0: SvnJobBase::qt_metacall(QMetaObject::Call, int, void**) (svnjobbase.moc:99) ==16229== by 0x25C7FA73: SvnCheckoutJob::qt_metacall(QMetaObject::Call, int, void**) (svncheckoutjob.moc:64) ==16229== by 0x90D1499: QObject::event(QEvent*) (qobject.cpp:1226) ==16229== by 0x95AB9E3: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4462) ==16229== by 0x95B03A9: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4341) ==16229== by 0x88CC195: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311) ==16229== by 0x90BD49B: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:731) ==16229== by 0x90C0C24: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.h:215) ==16229== by 0x90E8252: postEventSourceDispatch(_GSource*, int (*)(void*), void*) (qcoreapplication.h:220) ==16229== by 0xF2D8BCC: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.2800.6) ==16229== by 0xF2D93A7: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.2800.6) ==16229== by 0xF2D9638: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.2800.6) ==16229== by 0x90E83EE: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_glib.cpp:422) ==16229== by 0x9652DFD: QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qguieventdispatcher_glib.cpp:204) ==16229== by 0x90BC881: QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:149) ==16229== by 0x90BCABB: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:201) ==16229== by 0x9A6A8E5: QDialog::exec() (qdialog.cpp:552) ==16229== by 0x55BB315: KDevelop::ProjectDialogProvider::askProjectConfigLocation(bool, KUrl const&) (projectcontroller.cpp:327) ==16229== by 0x55BDE89: KDevelop::ProjectController::fetchProject() (projectcontroller.cpp:679) ==16229== by 0x55BFE66: KDevelop::ProjectController::qt_metacall(QMetaObject::Call, int, void**) (projectcontroller.moc:173) ==16229== by 0x90D25F7: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3287) ==16229== Address 0x3ea63ff8 is 8 bytes inside a block of size 152 free'd ==16229== at 0x4C27FFF: operator delete(void*) (vg_replace_malloc.c:387) ==16229== by 0x25C7FC9B: SvnCheckoutJob::~SvnCheckoutJob() (svncheckoutjob.h:35) ==16229== by 0x90D14C7: QObject::event(QEvent*) (qobject.cpp:1209) ==16229== by 0x95AB9E3: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4462) ==16229== by 0x95B03A9: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4341) ==16229== by 0x88CC195: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311) ==16229== by 0x90BD49B: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:731) ==16229== by 0x90C0C24: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.h:215) ==16229== by 0x90E8252: postEventSourceDispatch(_GSource*, int (*)(void*), void*) (qcoreapplication.h:220) ==16229== by 0xF2D8BCC: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.2800.6) ==16229== by 0xF2D93A7: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.2800.6) ==16229== by 0xF2D9638: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.2800.6) ==16229== by 0x90E83EE: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_glib.cpp:422) ==16229== by 0x9652DFD: QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qguieventdispatcher_glib.cpp:204) ==16229== by 0x90BC881: QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:149) ==16229== by 0x90BCABB: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:201) ==16229== by 0x9A6A8E5: QDialog::exec() (qdialog.cpp:552) ==16229== by 0x883A779: KMessageBox::createKMessageBox(KDialog*, QIcon const&, QString const&, QStringList const&, QString const&, bool*, QFlags<KMessageBox::Option>, QString const&, QMessageBox::Icon) (kmessagebox.cpp:337) ==16229== by 0x883AF8A: KMessageBox::createKMessageBox(KDialog*, QMessageBox::Icon, QString const&, QStringList const&, QString const&, bool*, QFlags<KMessageBox::Option>, QString const&) (kmessagebox.cpp:152) ==16229== by 0x883BBC1: KMessageBox::errorListWId(unsigned long, QString const&, QStringList const&, QString const&, QFlags<KMessageBox::Option>) (kmessagebox.cpp:847) ==16229== by 0x883BD9A: KMessageBox::error(QWidget*, QString const&, QString const&, QFlags<KMessageBox::Option>) (kmessagebox.cpp:814) ==16229== by 0x55E6267: KDevelop::RunController::finished(KJob*) (runcontroller.cpp:625) ==16229== by 0x55E8449: KDevelop::RunController::qt_metacall(QMetaObject::Call, int, void**) (runcontroller.moc:94) ==16229== by 0x90D25F7: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3287) ==16229== by 0x4F66B8E: KJob::finished(KJob*) (kjob.moc:173) ==16229== The reason is that internalJobDone gets called via connection to ThreadWeaver::Job::done which gets emitted also when the job fails. The nested event loop when showing the error dialog (connected to the emitResult in internalJobFailed) triggers the deleteLater in the internalJobDone and hence leads to a crash. I'll commit something that fixes it for me but imo this code needs a rework... Git commit 69f84d44c2c158db89fe56540814688dba079fb8 by Milian Wolff. Committed on 27/05/2011 at 19:42. Pushed by mwolff into branch '1.2'. try to protect against crash triggered by nested event loops and failing svn jobs this needs some more work probably as explained in the comment BUG: 273759 M +13 -0 plugins/subversion/svnjobbase.cpp http://commits.kde.org/kdevplatform/69f84d44c2c158db89fe56540814688dba079fb8 *** Bug 273449 has been marked as a duplicate of this bug. *** *** Bug 227823 has been marked as a duplicate of this bug. *** *** Bug 269011 has been marked as a duplicate of this bug. *** Could bug 229957 be related/fixed also? *** Bug 229957 has been marked as a duplicate of this bug. *** *** Bug 275140 has been marked as a duplicate of this bug. *** *** Bug 276013 has been marked as a duplicate of this bug. *** *** Bug 275152 has been marked as a duplicate of this bug. *** |