Bug 315649 - kate crashes when switching sessions using quick open
Summary: kate crashes when switching sessions using quick open
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: sessions (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 308595 311944 315664 316513 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-22 20:09 UTC by eseifert
Modified: 2013-04-03 20:30 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.2


Attachments
kcrash information (6.20 KB, application/octet-stream)
2013-02-22 20:10 UTC, eseifert
Details
New crash information added by DrKonqi (7.02 KB, text/plain)
2013-03-19 16:27 UTC, Richard Llom
Details
Kate Valgrind Trace (19.76 KB, application/octet-stream)
2013-03-19 19:00 UTC, Richard Llom
Details
Kate Valgrind Trace, 2nd try (127.67 KB, text/plain)
2013-03-20 11:17 UTC, Richard Llom
Details
New crash information added by DrKonqi (7.13 KB, text/plain)
2013-04-03 09:21 UTC, bastian löher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eseifert 2013-02-22 20:09:03 UTC
When I switch saved sessions using the "Quick Open Session" menu several times kate application crashes.

Reproducible: Always

Steps to Reproduce:
1. Open kate
2. Quick open different sessions using "Session > Quick Open Session" for a while
3. Repeat step 2 several times.
Actual Results:  
kate crashes with a segmentation fault

Expected Results:  
kate should load session without crash

Tested with KDE SC 4.10.0 on an amd64 Gentoo system
kernel 3.8.0, glibc 2.15, gcc 4.6.3, qt-core 4.8.4
Comment 1 eseifert 2013-02-22 20:10:39 UTC
Created attachment 77515 [details]
kcrash information

Added kcrash log file
Comment 2 Dominik Haumann 2013-02-22 21:28:54 UTC
Please always paste the backtrace:

Thread 1 (Thread 0x7f9b33fa3780 (LWP 4871)):
[KCrash Handler]
#6  0x00007f9b34eda683 in lockInline (this=0x1cba9d8) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:187
#7  relock (this=<optimized out>) at ../../include/QtCore/private/../../../src/corelib/thread/qorderedmutexlocker_p.h:82
#8  QOrderedMutexLocker (this=<optimized out>, m1=<optimized out>, m2=<optimized out>) at ../../include/QtCore/private/../../../src/corelib/thread/qorderedmutexlocker_p.h:72
#9  QOrderedMutexLocker (m2=<optimized out>, m1=0x1cba9d8, this=<optimized out>) at io/qurl.cpp:6130
#10 QUrl::operator== (this=0x1cba950, url=...) at io/qurl.cpp:6134
#11 0x00007f9b343dbb21 in KActivities::ResourceInstance::setUri (this=0x1f461b0, newUri=...) at /var/tmp/portage/kde-base/kactivities-4.10.0/work/kactivities-4.10.0/src/lib/core/resourceinstance.cpp:135
#12 0x00007f9b352cca2b in createView (doc=<optimized out>, this=0x2de2fd0) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/kateviewmanager.cpp:418
#13 KateViewManager::createView (this=0x2de2fd0, doc=<optimized out>) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/kateviewmanager.cpp:387
#14 0x00007f9b352d1e84 in KateViewSpace::restoreConfig (this=0x3937570, viewMan=0x2de2fd0, config=0x1d58570, groupname=...) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/kateviewspace.cpp:256
#15 0x00007f9b352cf1d4 in KateViewManager::restoreSplitter (this=0x2de2fd0, configBase=0x1d58570, group=..., parent=0x2de2fd0, viewConfGrp=...) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/kateviewmanager.cpp:972
#16 0x00007f9b352cfc83 in KateViewManager::restoreViewConfiguration (this=0x2de2fd0, config=...) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/kateviewmanager.cpp:853
#17 0x00007f9b352bf2aa in KateMainWindow::readProperties (this=0x2d8a1b0, config=...) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/katemainwindow.cpp:911
#18 0x00007f9b352dd92e in KateSessionManager::activateSession (this=0x2d727f0, session=..., closeLast=<optimized out>, saveLast=<optimized out>, loadNew=<optimized out>) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/katesession.cpp:343
#19 0x00007f9b352de03d in KateSessionsAction::openSession (this=<optimized out>, action=<optimized out>) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/katesession.cpp:1006
#20 0x00007f9b34f3cd56 in QObject::event (this=0x2e5aa40, e=<optimized out>) at kernel/qobject.cpp:1194
Comment 3 Dominik Haumann 2013-02-22 21:36:21 UTC
It happens for me in 4.10.0 as well, but if I run Kate from master, it does not crash.
So I assume this got fixed. but please let us know, if the problem persists with DKE 4.10.1.

*** This bug has been marked as a duplicate of bug 308595 ***
Comment 4 eseifert 2013-02-23 13:35:48 UTC
I'm commenting here as I can't reproduce bug 308595 using repeated "close all" with my system.

As suggested in bug 308595 I added some debugging information to kate/app/kateviewmanager.cpp:

#ifdef KActivities_FOUND
  if (!m_activityResources.contains(view)) {
    m_activityResources[view] = new KActivities::ResourceInstance(view->window()->winId(), view);
  }
  kDebug() << "doc->url(): " << doc->url();
  kDebug() << "m_activityResources[view]->uri(): " << m_activityResources[view]->uri();
  kDebug() << "QUrl(doc->url()): " << QUrl(doc->url());
  kDebug() << "QUrl(doc->url()) == m_activityResources[view]->uri(): " << (QUrl(doc->url()) == m_activityResources[view]->uri());
  m_activityResources[view]->setUri(doc->url());
#endif

The debug outputs works fine for some time. after switching sessions about four times kate crashes at the second kDebug line: m_activityResources[view]->uri()

Thread 1 (Thread 0x7f857c2c7780 (LWP 15248)):
[KCrash Handler]
#6  0x000000000230ee10 in ?? ()
#7  0x00007f857c32f2b4 in KateViewManager::createView (this=0x29e22b0, doc=0x2b6e0a0) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/kateviewmanager.cpp:419
#8  0x00007f857c334634 in KateViewSpace::restoreConfig (this=0x29a6eb0, viewMan=0x29e22b0, config=0x307bc40, groupname=...) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/kateviewspace.cpp:256
#9  0x00007f857c331854 in KateViewManager::restoreSplitter (this=0x29e22b0, configBase=0x307bc40, group=..., parent=0x29e22b0, viewConfGrp=...) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/kateviewmanager.cpp:976
#10 0x00007f857c332303 in KateViewManager::restoreViewConfiguration (this=0x29e22b0, config=...) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/kateviewmanager.cpp:857
#11 0x00007f857c32145a in KateMainWindow::readProperties (this=0x22cc1f0, config=...) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/katemainwindow.cpp:911
#12 0x00007f857c3400de in KateSessionManager::activateSession (this=0x2101530, session=..., closeLast=<optimized out>, saveLast=<optimized out>, loadNew=<optimized out>) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/katesession.cpp:343
#13 0x00007f857c3407ed in KateSessionsAction::openSession (this=<optimized out>, action=<optimized out>) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/katesession.cpp:1006
#14 0x0000003bf139ad56 in QObject::event (this=<optimized out>, e=<optimized out>) at kernel/qobject.cpp:1194
#15 0x0000003bf2bd5f70 in QAction::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#16 0x0000003bf3d79a2a in KAction::event(QEvent*) () from /usr/lib64/libkdeui.so.5
#17 0x0000003bf2bdc164 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#18 0x0000003bf2be0f33 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#19 0x0000003bf3e62876 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#20 0x0000003bf1381c7c in QCoreApplication::notifyInternal (this=<optimized out>, receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:946
#21 0x0000003bf138552a in sendEvent (event=<optimized out>, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#22 QCoreApplicationPrivate::sendPostedEvents (receiver=<optimized out>, event_type=<optimized out>, data=<optimized out>) at kernel/qcoreapplication.cpp:1570
#23 0x0000003bf13b0973 in sendPostedEvents () at kernel/qcoreapplication.h:236
#24 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#25 0x0000003647a4a662 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#26 0x0000003647a4a9a8 in ?? () from /usr/lib64/libglib-2.0.so.0
#27 0x0000003647a4aa64 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#28 0x0000003bf13b0d9f in QEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#29 0x0000003bf2c7efee in ?? () from /usr/lib64/qt4/libQtGui.so.4
#30 0x0000003bf13807b2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#31 0x0000003bf1380a07 in QEventLoop::exec (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:204
#32 0x0000003bf1385825 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#33 0x00007f857c57664d in kdemain (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/kde-base/kate-4.10.0/work/kate-4.10.0/kate/app/katemain.cpp:380
#34 0x0000003643a2460d in __libc_start_main () from /lib64/libc.so.6
#35 0x0000000000400791 in _start ()
Comment 5 Dominik Haumann 2013-03-11 11:11:30 UTC
*** Bug 316513 has been marked as a duplicate of this bug. ***
Comment 6 Dominik Haumann 2013-03-11 11:14:52 UTC
Ivan, this crash is still there in KDE 4.10.1. May it be that the m_activityResources hash is not correctly kept up-to-date, so it contains dangling pointers?

I'm pretty sure that https://bugs.kde.org/show_bug.cgi?id=308595 is also not fixed.
This is a real issue, given that it results in a crash...

Can someone who cat reproduce please provide a valgrind trace?
Comment 7 Richard Llom 2013-03-19 16:27:50 UTC
Created attachment 78206 [details]
New crash information added by DrKonqi

kate (3.10.1) on KDE Platform 4.10.1 using Qt 4.8.4

- What I was doing when the application crashed:
First crash appeared when using Quick Open Session once.
However, I can reproduce this with fast repeating of using Quick Open Session.

-- Backtrace (Reduced):
#7  0x00007f171a2cc0c8 in QUrl::operator==(QUrl const&) const () from /usr/lib/libQtCore.so.4
#8  0x00007f1704ccb311 in KActivities::ResourceInstance::setUri(QUrl const&) () from /usr/lib/libkactivities.so.6
#9  0x00007f170515aea8 in createView (doc=<optimized out>, this=0x17746a0) at /chakra/desktop-testing/kdesdk-kate/src/kate-4.10.1/kate/app/kateviewmanager.cpp:418
#10 KateViewManager::createView (this=0x17746a0, doc=<optimized out>) at /chakra/desktop-testing/kdesdk-kate/src/kate-4.10.1/kate/app/kateviewmanager.cpp:387
#11 0x00007f170515fa82 in KateViewSpace::restoreConfig (this=0x1c2d4b0, viewMan=0x17746a0, config=0x252dde0, groupname=...) at /chakra/desktop-testing/kdesdk-kate/src/kate-4.10.1/kate/app/kateviewspace.cpp:256
Comment 8 Richard Llom 2013-03-19 16:58:12 UTC
(In reply to comment #6)
> This is a real issue, given that it results in a crash...
> 
> Can someone who cat reproduce please provide a valgrind trace?

I could try, but I need instructions on how to do a valgrind trace.
Comment 9 Richard Llom 2013-03-19 19:00:34 UTC
Created attachment 78218 [details]
Kate Valgrind Trace

Nvm, found this: http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_with_Valgrind

Attached is a valgrind trace. However, Kate crashed here right after the session manager.
Comment 10 Milian Wolff 2013-03-20 09:35:19 UTC
Applications that use JIT, i.e. anything with JavaScript like Kate, KDevelop, QML, ... will need the --smc-check=all flag passed to valgrind. The valgrind log seems unrelated to this crash.
Comment 11 Richard Llom 2013-03-20 11:17:31 UTC
Created attachment 78236 [details]
Kate Valgrind Trace, 2nd try

Ok, here is a trace with the smc-check flag.
Took about 15 quick open sessions to crash kate, but it finally did.
Comment 12 Dominik Haumann 2013-03-20 15:49:03 UTC
This is what we wanted, thanks: Even better: can you install debug symbols so that we can look inside KActivities as well? Currently, it is missing the file and line number.

==974== Invalid read of size 8
==974==    at 0xA86B301: KActivities::ResourceInstance::setUri(QUrl const&) (in /usr/lib/libkactivities.so.6.1.0)
==974==    by 0x6639EA7: KateViewManager::createView(KTextEditor::Document*) (kateviewmanager.cpp:418)
==974==    by 0x663AE17: KateViewManager::activateView(KTextEditor::Document*) (kateviewmanager.cpp:617)
==974==    by 0x662C0FA: KateDocManager::closeAllDocuments(bool) (katedocmanager.cpp:393)
==974==    by 0x66470A4: KateSessionManager::activateSession(KSharedPtr<KateSession>, bool, bool, bool) (katesession.cpp:303)
==974==    by 0x664A0BB: KateSessionsAction::openSession(QAction*) (katesession.cpp:1006)
==974==    by 0x730336D: QObject::event(QEvent*) (qobject.cpp:1194)
==974==    by 0x55A2A6E: QAction::event(QEvent*) (qaction.cpp:1187)
==974==    by 0x69E36C6: KAction::event(QEvent*) (kaction.cpp:131)
==974==    by 0x55A9020: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4562)
==974==    by 0x55AE0F8: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4423)
==974==    by 0x6ABD6E5: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311)
==974==  Address 0x136d9280 is 16 bytes inside a block of size 32 free'd
==974==    at 0x4C295BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==974==    by 0x55E54A7: clear(QVariant::Private*) (qvariant_p.h:142)
==974==    by 0x69F8EBB: KColorSchemePrivate::init(KSharedPtr<KSharedConfig> const&, QPalette::ColorGroup, char const*, SetDefaultColors) (kconfiggroup.h:724)
==974==    by 0x69FA0F1: KColorSchemePrivate::KColorSchemePrivate(KSharedPtr<KSharedConfig> const&, QPalette::ColorGroup, char const*, SetDefaultColors) (kcolorscheme.cpp:280)
==974==    by 0x69FA94D: KColorScheme::KColorScheme(QPalette::ColorGroup, KColorScheme::ColorSet, KSharedPtr<KSharedConfig>) (kcolorscheme.cpp:450)
==974==    by 0x1AFD8506: KateFileTreeModel::data(QModelIndex const&, int) const (katefiletreemodel.cpp:466)
==974==    by 0x5B8F646: QSortFilterProxyModel::data(QModelIndex const&, int) const (qsortfilterproxymodel.cpp:1735)
==974==    by 0x5BB4556: QStyledItemDelegate::initStyleOption(QStyleOptionViewItem*, QModelIndex const&) const (qabstractitemmodel.h:402)
==974==    by 0x5BB5B69: QStyledItemDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const (qstyleditemdelegate.cpp:450)
==974==    by 0x5B48CC7: QTreeView::indexRowSizeHint(QModelIndex const&) const (qtreeview.cpp:2815)
==974==    by 0x5B48FAE: QTreeViewPrivate::itemHeight(int) const (qtreeview.cpp:3265)
==974==    by 0x5B4927D: QTreeViewPrivate::updateScrollBars() (qtreeview.cpp:3486)
==974== 
==974== Invalid read of size 8
==974==    at 0x72A348B: QUrl::operator==(QUrl const&) const (qurl.cpp:6132)
==974==    by 0xA86B310: KActivities::ResourceInstance::setUri(QUrl const&) (in /usr/lib/libkactivities.so.6.1.0)
==974==    by 0x6639EA7: KateViewManager::createView(KTextEditor::Document*) (kateviewmanager.cpp:418)
==974==    by 0x663AE17: KateViewManager::activateView(KTextEditor::Document*) (kateviewmanager.cpp:617)
==974==    by 0x662C0FA: KateDocManager::closeAllDocuments(bool) (katedocmanager.cpp:393)
==974==    by 0x66470A4: KateSessionManager::activateSession(KSharedPtr<KateSession>, bool, bool, bool) (katesession.cpp:303)
==974==    by 0x664A0BB: KateSessionsAction::openSession(QAction*) (katesession.cpp:1006)
==974==    by 0x730336D: QObject::event(QEvent*) (qobject.cpp:1194)
==974==    by 0x55A2A6E: QAction::event(QEvent*) (qaction.cpp:1187)
==974==    by 0x69E36C6: KAction::event(QEvent*) (kaction.cpp:131)
==974==    by 0x55A9020: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4562)
==974==    by 0x55AE0F8: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4423)
==974==  Address 0x28286e6e0001000f is not stack'd, malloc'd or (recently) free'd
Comment 13 Dominik Haumann 2013-03-20 16:00:57 UTC
The crash happens in line 4:
1 if (!m_activityResources.contains(view)) {
2   m_activityResources[view] = new KActivities::ResourceInstance(view->window()->winId(), view);
3 }
4 m_activityResources[view]->setUri(doc->url());

I guess, m_activityResources.contains(view) is true, therefore the if is not executed.
m_activityResources[view] then probably returns a dangling pointer to KActivities::ResourceInstance so that setting the QUrl fails.

So we need to check whether this is really what happens. Usually, the hash should NEVER contain view, since the view is just created several lines above:
  KTextEditor::View *view = (KTextEditor::View *) doc->createView (activeViewSpace()->stack);

So this code is wrong anyway, and line 1 should be an assert:
Q_ASSERT(!m_activityResources.contains(view));

Anyone who can reproduce: Can you check this?
Comment 14 Dominik Haumann 2013-03-20 18:09:17 UTC
Current master:

#7  0xb56c4204 in KActivities::ResourceInstance::setUri(QUrl const&) () from /usr/lib/libkactivities.so.6
#8  0xb76f9231 in KateViewManager::createView (this=0xb3fe890, doc=0xabba198) at /home/dh/kde/kate/kate/app/kateviewmanager.cpp:426
#9  0xb7700f26 in KateViewSpace::restoreConfig (this=0xb70fb80, viewMan=0xb3fe890, config=0xb77b950, groupname=...) at /home/dh/kde/kate/kate/app/kateviewspace.cpp:256
#10 0xb76fb462 in KateViewManager::restoreSplitter (this=0xb3fe890, configBase=0xb77b950, group=..., parent=0xb3fe890, viewConfGrp=...) at /home/dh/kde/kate/kate/app/kateviewmanager.cpp:991
#11 0xb76faa19 in KateViewManager::restoreViewConfiguration (this=0xb3fe890, config=...) at /home/dh/kde/kate/kate/app/kateviewmanager.cpp:872
#12 0xb76f0b20 in KateMainWindow::readProperties (this=0x9d498f8, config=...) at /home/dh/kde/kate/kate/app/katemainwindow.cpp:911
#13 0xb77084be in KateSessionManager::activateSession (this=0x9d34ab8, session=..., closeLast=true, saveLast=true, loadNew=true) at /home/dh/kde/kate/kate/app/katesession.cpp:343
#14 0xb770bbea in KateSessionsAction::openSession (this=0xb3f9a48, action=0x9d3ffb0) at /home/dh/kde/kate/kate/app/katesession.cpp:1006
#15 0xb7706976 in KateSessionsAction::qt_static_metacall (_o=0xb3f9a48, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x9d39d20) at /home/dh/kde/kate/build/kate/app/katesession.moc:395
Comment 15 Dominik Haumann 2013-03-20 18:27:32 UTC
==25138== Invalid read of size 4
==25138==    at 0x60CE1F6: KActivities::ResourceInstance::setUri(QUrl const&) (in /usr/lib/libkactivities.so.6.1.0)
==25138==    by 0x4085B3D: KateViewManager::activateView(KTextEditor::Document*) (kateviewmanager.cpp:625)
==25138==    by 0x4071EEA: KateDocManager::closeAllDocuments(bool) (katedocmanager.cpp:393)
==25138==    by 0x409415C: KateSessionManager::activateSession(KSharedPtr<KateSession>, bool, bool, bool) (katesession.cpp:303)
==25138==    by 0x4097BE9: KateSessionsAction::openSession(QAction*) (katesession.cpp:1006)
==25138==    by 0x4092975: KateSessionsAction::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (katesession.moc:395)
==25138==    by 0x5C213F9: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:524)
==25138==    by 0x5C2595A: QObject::event(QEvent*) (qobject.cpp:1203)
==25138==    by 0x4C2DEB4: QAction::event(QEvent*) (in /usr/lib/libQtGui.so.4.8.4)
==25138==    by 0x4798308: KAction::event(QEvent*) (in /usr/lib/libkdeui.so.5.10.1)
==25138==    by 0x4C34B9B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.8.4)
==25138==    by 0x4C3959E: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.8.4)
==25138==  Address 0xeebedf0 is 8 bytes inside a block of size 16 free'd
==25138==    at 0x402C4F7: realloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==25138==    by 0x3: ???
==25138== 
==25138== Invalid read of size 4
==25138==    at 0x5BC4672: QUrl::operator==(QUrl const&) const (qurl.cpp:6132)
==25138==    by 0x4085B3D: KateViewManager::activateView(KTextEditor::Document*) (kateviewmanager.cpp:625)
==25138==    by 0x4071EEA: KateDocManager::closeAllDocuments(bool) (katedocmanager.cpp:393)
==25138==    by 0x409415C: KateSessionManager::activateSession(KSharedPtr<KateSession>, bool, bool, bool) (katesession.cpp:303)
==25138==    by 0x4097BE9: KateSessionsAction::openSession(QAction*) (katesession.cpp:1006)
==25138==    by 0x4092975: KateSessionsAction::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (katesession.moc:395)
==25138==    by 0x5C213F9: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:524)
==25138==    by 0x5C2595A: QObject::event(QEvent*) (qobject.cpp:1203)
==25138==    by 0x4C2DEB4: QAction::event(QEvent*) (in /usr/lib/libQtGui.so.4.8.4)
==25138==    by 0x4798308: KAction::event(QEvent*) (in /usr/lib/libkdeui.so.5.10.1)
==25138==    by 0x4C34B9B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.8.4)
==25138==    by 0x4C3959E: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.8.4)
==25138==  Address 0x12001a is not stack'd, malloc'd or (recently) free'd
==25138== 
KCrash: Application 'kate' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
==25138== Invalid read of size 4
==25138==    at 0x48FE463: ??? (in /usr/lib/libkdeui.so.5.10.1)
==25138==    by 0x48FF16C: ??? (in /usr/lib/libkdeui.so.5.10.1)
==25138==    by 0x48FF60E: KCrash::defaultCrashHandler(int) (in /usr/lib/libkdeui.so.5.10.1)
==25138==    by 0x5EFD3C7: ??? (in /lib/libc-2.15.so)
==25138==    by 0x4085B3D: KateViewManager::activateView(KTextEditor::Document*) (kateviewmanager.cpp:625)
==25138==    by 0x4071EEA: KateDocManager::closeAllDocuments(bool) (katedocmanager.cpp:393)
==25138==    by 0x409415C: KateSessionManager::activateSession(KSharedPtr<KateSession>, bool, bool, bool) (katesession.cpp:303)
==25138==    by 0x4097BE9: KateSessionsAction::openSession(QAction*) (katesession.cpp:1006)
==25138==    by 0x4092975: KateSessionsAction::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (katesession.moc:395)
==25138==    by 0x5C213F9: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:524)
==25138==    by 0x5C2595A: QObject::event(QEvent*) (qobject.cpp:1203)
==25138==    by 0x4C2DEB4: QAction::event(QEvent*) (in /usr/lib/libQtGui.so.4.8.4)
==25138==  Address 0x9294dc8 is 0 bytes inside a block of size 3 alloc'd
==25138==    at 0x402C40D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==25138==    by 0x525F4743: ???
Comment 16 Christoph Cullmann 2013-03-20 20:53:37 UTC
Git commit 1ef67cfd667fcc57f46958526ac98641d524cc1d by Christoph Cullmann.
Committed on 20/03/2013 at 21:52.
Pushed by cullmann into branch 'master'.

fix activity related crash
clear hash on mass view deletion
CCMAIL: ivan.cukic@kde.org

M  +4    -0    kate/app/kateviewmanager.cpp

http://commits.kde.org/kate/1ef67cfd667fcc57f46958526ac98641d524cc1d
Comment 17 Christoph Cullmann 2013-03-20 20:54:19 UTC
Git commit a48894096d98af898f95a35e637d6669115d510b by Christoph Cullmann.
Committed on 20/03/2013 at 21:52.
Pushed by cullmann into branch 'KDE/4.10'.

fix activity related crash
clear hash on mass view deletion
CCMAIL: ivan.cukic@kde.org

M  +4    -0    kate/app/kateviewmanager.cpp

http://commits.kde.org/kate/a48894096d98af898f95a35e637d6669115d510b
Comment 18 Dominik Haumann 2013-03-20 21:01:08 UTC
*** Bug 315664 has been marked as a duplicate of this bug. ***
Comment 19 Dominik Haumann 2013-03-20 21:02:23 UTC
*** Bug 311944 has been marked as a duplicate of this bug. ***
Comment 20 Dominik Haumann 2013-03-20 21:03:18 UTC
*** Bug 308595 has been marked as a duplicate of this bug. ***
Comment 21 bastian löher 2013-04-03 09:21:04 UTC
Created attachment 78593 [details]
New crash information added by DrKonqi

kate (3.10.1) on KDE Platform 4.10.1 using Qt 4.8.3

- What I was doing when the application crashed:
Switching sessions using 'quick switch'
- Custom settings of the application:
Konsole-part is open in at least one of the sessions.

I take it that the bug was fixed already in 4.10.2, but I will check again after updating to this version.

-- Backtrace (Reduced):
#6  QMutex::lockInline (this=0x81) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:187
#7  0x00007f63b3ca68bb in relock (this=<optimized out>) at ../../include/QtCore/private/../../../src/corelib/thread/qorderedmutexlocker_p.h:82
#8  QOrderedMutexLocker (m2=<optimized out>, m1=<optimized out>, this=<optimized out>) at ../../include/QtCore/private/../../../src/corelib/thread/qorderedmutexlocker_p.h:72
#9  QUrl::operator== (this=0x50cfa10, url=...) at io/qurl.cpp:6134
#10 0x00007f63b00f38d1 in KActivities::ResourceInstance::setUri(QUrl const&) () from /usr/lib/libkactivities.so.6
Comment 22 Dominik Haumann 2013-04-03 20:30:38 UTC
Bastian, it's fixed in KDE 4.10.2. So just update. We don't need further info on this report.