Bug 308595 - Crash when using "Close All" multiple times
Summary: Crash when using "Close All" multiple times
Status: RESOLVED DUPLICATE of bug 315649
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-18 10:39 UTC by Christoph Feck
Modified: 2013-03-20 21:03 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2012-10-18 10:39:15 UTC
Application: kate (3.9.80)
KDE Platform Version: 4.9.80 (Compiled from sources)
Qt Version: 4.8.3
Operating System: Linux 3.4.13-2-desktop i686
Distribution: "openSUSE 12.2 (i586)"

-- Information about the crash:
- What I was doing when the application crashed:

Kate crashes when using "Close All" multiple times (even when no documents are loaded). Probably introduced with the activities feature.

The crash can be reproduced some of the time.

-- Backtrace:
Application: Kate (kdeinit4), signal: Segmentation fault
Using host libthread_db library "/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0xb54c59c0 (LWP 4547))]

Thread 3 (Thread 0xb005eb40 (LWP 4550)):
#0  0xb77bf424 in __kernel_vsyscall ()
#1  0xb5dcc90b in poll () from /lib/libc.so.6
#2  0xb571023b in g_poll () from /usr/lib/libglib-2.0.so.0
#3  0xb5701af0 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0xb5701c51 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0xb6cd032f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb6c9d04c in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb6c9d341 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0xb6b88a5c in QThread::exec() () from /usr/lib/libQtCore.so.4
#9  0xb6c7b59d in ?? () from /usr/lib/libQtCore.so.4
#10 0xb6b8be68 in ?? () from /usr/lib/libQtCore.so.4
#11 0xb6b09e32 in start_thread () from /lib/libpthread.so.0
#12 0xb5dd78ee in clone () from /lib/libc.so.6

Thread 2 (Thread 0xaf614b40 (LWP 4551)):
#0  0xb77bf424 in __kernel_vsyscall ()
#1  0xb6b0da4c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb2c8320d in ?? () from /usr/lib/libQtScript.so.4
#3  0xb2c8323f in ?? () from /usr/lib/libQtScript.so.4
#4  0xb6b09e32 in start_thread () from /lib/libpthread.so.0
#5  0xb5dd78ee in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb54c59c0 (LWP 4547)):
[KCrash Handler]
#7  0xb6c53572 in QUrl::operator==(QUrl const&) const () from /usr/lib/libQtCore.so.4
#8  0xb186b598 in KActivities::ResourceInstance::setUri (this=0xa0fe0c8, newUri=...) at /local/git/KDE/libs/kactivities/src/lib/core/resourceinstance.cpp:135
#9  0xb18bba71 in KateViewManager::createView (this=0x9f7c170, doc=0xa140cd8) at /local/git/KDE/base/kate/kate/app/kateviewmanager.cpp:417
#10 0xb18bc336 in KateViewManager::activateView (this=0x9f7c170, d=0xa140cd8) at /local/git/KDE/base/kate/kate/app/kateviewmanager.cpp:610
#11 0xb18a8fdf in KateDocManager::closeAllDocuments (this=0x9d59d98, closeUrl=false) at /local/git/KDE/base/kate/kate/app/katedocmanager.cpp:393
#12 0xb18b128e in KateMainWindow::slotDocumentCloseAll (this=0x9edb958) at /local/git/KDE/base/kate/kate/app/katemainwindow.cpp:387
#13 0xb18ad2ee in KateMainWindow::qt_static_metacall (_o=0x9edb958, _c=QMetaObject::InvokeMetaMethod, _id=27, _a=0xbfe03068) at /local/build/KDE/base/kate/kate/app/katemainwindow.moc:192
#14 0xb6cb6872 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#15 0xb6167a7d in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#16 0xb6167d1c in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#17 0xb6619b95 in ?? () from /usr/lib/libQtGui.so.4
#18 0xb6620c96 in ?? () from /usr/lib/libQtGui.so.4
#19 0xb6621bf5 in QMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#20 0xb75dc394 in KMenu::mouseReleaseEvent (this=0x9d092c8, e=0xbfe03924) at /local/git/KDE/libs/kdelibs/kdeui/widgets/kmenu.cpp:464
#21 0xb61c8172 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#22 0xb66220ec in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4
#23 0xb616eadc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#24 0xb6173fc9 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#25 0xb74f5d66 in KApplication::notify (this=0xbfe040d8, receiver=0x9d092c8, event=0xbfe03924) at /local/git/KDE/libs/kdelibs/kdeui/kernel/kapplication.cpp:311
#26 0xb6c9e57e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#27 0xb616f93f in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#28 0xb61f7eef in ?? () from /usr/lib/libQtGui.so.4
#29 0xb61f6b09 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#30 0xb6220754 in ?? () from /usr/lib/libQtGui.so.4
#31 0xb57017d3 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#32 0xb5701b70 in ?? () from /usr/lib/libglib-2.0.so.0
#33 0xb5701c51 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#34 0xb6cd0311 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#35 0xb622033a in ?? () from /usr/lib/libQtGui.so.4
#36 0xb6c9d04c in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#37 0xb6c9d341 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#38 0xb6ca25fa in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#39 0xb616c954 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#40 0xb4c6fce3 in kdemain (argc=2, argv=0x9b84408) at /local/git/KDE/base/kate/kate/app/katemain.cpp:377
#41 0x0804de1d in launch (argc=2, _name=0x9b846ac "/local/kde4/bin/kate", args=0x9b846c4 "\001", cwd=0x0, envc=1, envs=0x9b846d3 "", reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x9b846d7 "duo;1350556378;996414;4495_TIME138637180") at /local/git/KDE/libs/kdelibs/kinit/kinit.cpp:726
#42 0x0804ee76 in handle_launcher_request (sock=8, who=0x8053924 "launcher") at /local/git/KDE/libs/kdelibs/kinit/kinit.cpp:1218
#43 0x0804f5f0 in handle_requests (waitForPid=0) at /local/git/KDE/libs/kdelibs/kinit/kinit.cpp:1411
#44 0x08050fb6 in main (argc=4, argv=0xbfe04cf4, envp=0xbfe04d08) at /local/git/KDE/libs/kdelibs/kinit/kinit.cpp:1899

Reported using DrKonqi
Comment 1 Christoph Feck 2012-10-18 10:44:52 UTC
It's worse. Simply opening then closing a document can crash kate.
Comment 2 Ivan Čukić 2012-10-18 10:52:08 UTC
Since I can not reproduce this - can you try to add
kDebug() << doc->url();
Above line 417 in kateviewmanager.cpp

There is a possibility that QUrl object is somehow invalidated before.
Comment 3 Christoph Feck 2012-10-18 11:01:24 UTC
It says KUrl("") in both cases (when it crashes, and when it doesn't crash)
Comment 4 Ivan Čukić 2012-10-18 18:48:37 UTC
Ok, the next step:
kDebug() << doc->url();
kDebug() << m_activityResources[view]->uri();
kDebug() << QUrl(doc->url());
kDebug() << QUrl(doc->url()) == m_activityResources[view]->uri();

BTW, is any other app crashing (dolphin, okular, gwenview - they are all patched)?
Comment 5 Ivan Čukić 2012-10-21 08:42:39 UTC
ping
Comment 6 Christoph Feck 2012-10-24 21:48:35 UTC
I can no longer reproduce the crash with today's build of KDE. Assuming it got fixed with kate/kactivities updates.
Comment 7 Dominik Haumann 2013-02-20 11:17:16 UTC
*** Bug 311944 has been marked as a duplicate of this bug. ***
Comment 8 Dominik Haumann 2013-02-22 21:36:21 UTC
*** Bug 315649 has been marked as a duplicate of this bug. ***
Comment 9 Dominik Haumann 2013-02-23 08:28:31 UTC
*** Bug 315664 has been marked as a duplicate of this bug. ***
Comment 10 Dominik Haumann 2013-02-23 08:30:05 UTC
Ivan: Where there any changes with respect to this after the 4.10.0 release?
It aways goes through KActivities::ResourceInstance::setUri().

And the bugs came from Ubuntu, openSUSE, Gentoo, so this is a real issue.
Comment 11 Dominik Haumann 2013-03-20 21:03:18 UTC

*** This bug has been marked as a duplicate of bug 315649 ***