Bug 317080

Summary: Kate may crash if documents will be closed and a deleted document is next
Product: [Applications] kate Reporter: uran238
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description uran238 2013-03-20 14:45:22 UTC
Application: kate (3.10.1)
KDE Platform Version: 4.10.1 (Compiled from sources)
Qt Version: 4.8.4
Operating System: Linux 3.8.2 x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
Some documents opened in kate were deleted, but still open in kate. The document currently viewed was iirc not deleted and was closed by me, then kate crashed.

The crash can be reproduced sometimes.

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

Thread 3 (Thread 0x7f6ed297a700 (LWP 3773)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:164
#1  0x00007f6edf5251af in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f6edf7f1630 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x00007f6edf525204 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x00007f6ef021bd36 in start_thread (arg=0x7f6ed297a700) at pthread_create.c:308
#4  0x00007f6eef19e9fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:114

Thread 2 (Thread 0x7f6e4fd79700 (LWP 6479)):
#0  0x00007f6eef195d5d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f6eebf00ccc in g_main_context_poll (n_fds=1, fds=0x7f6e48002bb0, timeout=-1, context=0x7f6e480009a0, priority=<optimized out>) at gmain.c:3584
#2  g_main_context_iterate (context=context@entry=0x7f6e480009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3285
#3  0x00007f6eebf00de4 in g_main_context_iteration (context=0x7f6e480009a0, may_block=1) at gmain.c:3351
#4  0x00007f6ef056658d in QEventDispatcherGlib::processEvents (this=0x7f6e480008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00007f6ef0546101 in QEventLoop::processEvents (this=this@entry=0x7f6e4fd78dc0, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f6ef05462e4 in QEventLoop::exec (this=0x7f6e4fd78dc0, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007f6ef04a64cf in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#8  0x00007f6ef0533649 in QInotifyFileSystemWatcherEngine::run (this=0x54f0c00) at io/qfilesystemwatcher_inotify.cpp:256
#9  0x00007f6ef04a836f in QThreadPrivate::start (arg=0x54f0c00) at thread/qthread_unix.cpp:338
#10 0x00007f6ef021bd36 in start_thread (arg=0x7f6e4fd79700) at pthread_create.c:308
#11 0x00007f6eef19e9fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:114

Thread 1 (Thread 0x7f6ef178a780 (LWP 3641)):
[KCrash Handler]
#6  QWidget::isWindow (this=this@entry=0x7e45740) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:943
#7  0x00007f6eef96a632 in QWidget::isAncestorOf (this=0x7394750, child=0x7e45740) at kernel/qwidget.cpp:8273
#8  0x00007f6eef963779 in QStackedLayout::setCurrentIndex (this=0x353ef30, index=8) at kernel/qstackedlayout.cpp:317
#9  0x00007f6ed8210bee in KateViewSpace::showView (this=this@entry=0x34d46f0, document=0x4ea53e0) at /var/tmp/portage/kde-base/kate-4.10.1/work/kate-4.10.1/kate/app/kateviewspace.cpp:177
#10 0x00007f6ed8211578 in KateViewSpace::showView (this=this@entry=0x34d46f0, view=<optimized out>) at /var/tmp/portage/kde-base/kate-4.10.1/work/kate-4.10.1/kate/app/kateviewspace.h:113
#11 0x00007f6ed8210fd8 in KateViewSpace::removeView (this=0x34d46f0, v=0x56edd90) at /var/tmp/portage/kde-base/kate-4.10.1/work/kate-4.10.1/kate/app/kateviewspace.cpp:161
#12 0x00007f6ed820ceca in KateViewManager::deleteView (this=this@entry=0x34c0990, view=0x7e45740, view@entry=0x56edd90, delViewSpace=delViewSpace@entry=true) at /var/tmp/portage/kde-base/kate-4.10.1/work/kate-4.10.1/kate/app/kateviewmanager.cpp:432
#13 0x00007f6ed820d1d7 in KateViewManager::closeViews (this=0x34c0990, doc=0x65d1cc0) at /var/tmp/portage/kde-base/kate-4.10.1/work/kate-4.10.1/kate/app/kateviewmanager.cpp:671
#14 0x00007f6ed8202676 in KateDocManager::closeDocument (this=0x2243030, doc=0x7e45740, closeUrl=true) at /var/tmp/portage/kde-base/kate-4.10.1/work/kate-4.10.1/kate/app/katedocmanager.cpp:301
#15 0x00007f6ed820b8b8 in KateViewManager::slotDocumentClose (this=<optimized out>, document=0x65d1cc0) at /var/tmp/portage/kde-base/kate-4.10.1/work/kate-4.10.1/kate/app/kateviewmanager.cpp:272
#16 0x00007f6ef0555aca in QMetaObject::activate (sender=0x354aaf0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff0438d290) at kernel/qobject.cpp:3539
#17 0x00007f6eef93a20d in QAction::triggered (this=this@entry=0x354aaf0, _t1=false) at .moc/release-shared/moc_qaction.cpp:277
#18 0x00007f6eef93a3d1 in QAction::activate (this=0x354aaf0, event=<optimized out>) at kernel/qaction.cpp:1257
#19 0x00007f6eefbcb7fe in QAbstractButtonPrivate::click (this=this@entry=0x3579b30) at widgets/qabstractbutton.cpp:530
#20 0x00007f6eefbcba01 in QAbstractButton::mouseReleaseEvent (this=0x3560b70, e=0x7fff0438da10) at widgets/qabstractbutton.cpp:1123
#21 0x00007f6eefc52b74 in QToolButton::mouseReleaseEvent (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:718
#22 0x00007f6eef977667 in QWidget::event (this=0x3560b70, event=0x7fff0438da10) at kernel/qwidget.cpp:8375
#23 0x00007f6eef93f837 in QApplicationPrivate::notify_helper (this=this@entry=0x20b3ed0, receiver=receiver@entry=0x3560b70, e=e@entry=0x7fff0438da10) at kernel/qapplication.cpp:4562
#24 0x00007f6eef9434fe in QApplication::notify (this=<optimized out>, receiver=0x3560b70, e=0x7fff0438da10) at kernel/qapplication.cpp:4105
#25 0x00007f6ef11e8bdf in KApplication::notify (this=0x7fff0438e758, receiver=0x3560b70, event=0x7fff0438da10) at /var/tmp/portage/kde-base/kdelibs-4.10.1/work/kdelibs-4.10.1/kdeui/kernel/kapplication.cpp:311
#26 0x00007f6ef0546efa in QCoreApplication::notifyInternal (this=0x7fff0438e758, receiver=0x3560b70, event=<optimized out>) at kernel/qcoreapplication.cpp:946
#27 0x00007f6eef940378 in QApplicationPrivate::sendMouseEvent (receiver=0x3560b70, event=0x7fff0438da10, alienWidget=0x3560b70, nativeWidget=0x3586af0, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3171
#28 0x00007f6eef99786c in QETWidget::translateMouseEvent (this=this@entry=0x3586af0, event=event@entry=0x7fff0438e110) at kernel/qapplication_x11.cpp:4516
#29 0x00007f6eef996e5b in QApplication::x11ProcessEvent (this=0x7fff0438e758, event=0x7fff0438e110) at kernel/qapplication_x11.cpp:3639
#30 0x00007f6eef9b4814 in x11EventSourceDispatch (s=s@entry=0x20b28a0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#31 0x00007f6eebf009dc in g_main_dispatch (context=0x20b47d0) at gmain.c:2715
#32 g_main_context_dispatch (context=context@entry=0x20b47d0) at gmain.c:3219
#33 0x00007f6eebf00d34 in g_main_context_iterate (context=context@entry=0x20b47d0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3290
#34 0x00007f6eebf00de4 in g_main_context_iteration (context=0x20b47d0, may_block=1) at gmain.c:3351
#35 0x00007f6ef056658d in QEventDispatcherGlib::processEvents (this=0x20b4060, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#36 0x00007f6eef9b45a3 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#37 0x00007f6ef0546101 in QEventLoop::processEvents (this=this@entry=0x7fff0438e4d0, flags=...) at kernel/qeventloop.cpp:149
#38 0x00007f6ef05462e4 in QEventLoop::exec (this=0x7fff0438e4d0, flags=...) at kernel/qeventloop.cpp:204
#39 0x00007f6ef054933a in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#40 0x00007f6ed8445687 in kdemain (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/kde-base/kate-4.10.1/work/kate-4.10.1/kate/app/katemain.cpp:380
#41 0x0000000000407edb in launch (argc=argc@entry=5, _name=_name@entry=0x206b788 "/usr/bin/kate", args=<optimized out>, args@entry=0x206b796 "-session", cwd=cwd@entry=0x0, envc=envc@entry=0, envs=<optimized out>, envs@entry=0x206b7ec "", reset_env=false, tty=tty@entry=0x0, avoid_loops=false, startup_id_str=startup_id_str@entry=0x409a11 "0") at /var/tmp/portage/kde-base/kdelibs-4.10.1/work/kdelibs-4.10.1/kinit/kinit.cpp:726
#42 0x0000000000408599 in handle_launcher_request (sock=7, who=<optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.10.1/work/kdelibs-4.10.1/kinit/kinit.cpp:1218
#43 0x0000000000408ccb in handle_requests (waitForPid=waitForPid@entry=0) at /var/tmp/portage/kde-base/kdelibs-4.10.1/work/kdelibs-4.10.1/kinit/kinit.cpp:1411
#44 0x0000000000406425 in main (argc=2, argv=0x7fff0438f178, envp=0x7fff0438f190) at /var/tmp/portage/kde-base/kdelibs-4.10.1/work/kdelibs-4.10.1/kinit/kinit.cpp:1899

Reported using DrKonqi
Comment 1 Dominik Haumann 2013-03-23 15:48:18 UTC

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