Bug 271063 - kate crash when missing a lot of opening files while restarting
Summary: kate crash when missing a lot of opening files while restarting
Status: RESOLVED DUPLICATE of bug 356965
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: VHI crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-16 00:20 UTC by Patrick Yau
Modified: 2016-04-05 19:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Yau 2011-04-16 00:20:24 UTC
Application: kate (3.6.2)
KDE Platform Version: 4.6.2 (4.6.2)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-28-generic i686
Distribution: Ubuntu 10.10

-- Information about the crash:
- What I was doing when the application crashed:
due to umount of a volume, kate is missing a lot of opened files
restart is launched while kate is in this state
kate gives 20 error dialogs for reload or ignore for 20 the missing files (ignore is checked all the time)
kate crashed.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault
[Current thread is 1 (Thread 0xb7762710 (LWP 1713))]

Thread 4 (Thread 0xb55bdb70 (LWP 1939)):
#0  0x0097de36 in clock_gettime (clock_id=9969652, tp=0xb55bcf90) at ../sysdeps/unix/clock_gettime.c:100
#1  0x0078350b in do_gettime () at tools/qelapsedtimer_unix.cpp:105
#2  qt_gettime () at tools/qelapsedtimer_unix.cpp:119
#3  0x0085a6e5 in QTimerInfoList::updateCurrentTime (this=0xb4c01a34) at kernel/qeventdispatcher_unix.cpp:339
#4  0x0085a72a in QTimerInfoList::timerWait (this=0xb4c01a34, tm=...) at kernel/qeventdispatcher_unix.cpp:442
#5  0x008587a8 in timerSourcePrepareHelper (src=<value optimized out>, timeout=0xb55bd0bc) at kernel/qeventdispatcher_glib.cpp:136
#6  0x0085883d in timerSourcePrepare (source=0x0, timeout=0x981ff4) at kernel/qeventdispatcher_glib.cpp:169
#7  0x046eae6a in g_main_context_prepare () from /lib/libglib-2.0.so.0
#8  0x046eb279 in ?? () from /lib/libglib-2.0.so.0
#9  0x046eb848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#10 0x0085859f in QEventDispatcherGlib::processEvents (this=0xb4c00468, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#11 0x00828609 in QEventLoop::processEvents (this=0xb55bd290, flags=) at kernel/qeventloop.cpp:149
#12 0x00828a8a in QEventLoop::exec (this=0xb55bd290, flags=...) at kernel/qeventloop.cpp:201
#13 0x00724b7e in QThread::exec (this=0x9de8118) at thread/qthread.cpp:490
#14 0x0080735b in QInotifyFileSystemWatcherEngine::run (this=0x9de8118) at io/qfilesystemwatcher_inotify.cpp:248
#15 0x00727df9 in QThreadPrivate::start (arg=0x9de8118) at thread/qthread_unix.cpp:266
#16 0x00512cc9 in start_thread (arg=0xb55bdb70) at pthread_create.c:304
#17 0x0063969e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xb4b56b70 (LWP 1940)):
#0  0x009c7416 in __kernel_vsyscall ()
#1  0x005174dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x00646d9d in __pthread_cond_wait (cond=0x1e03290, mutex=0x1e03278) at forward.c:139
#3  0x01cff877 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x1dfe1a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#4  0x01cff8c1 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0x1dfe1a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#5  0x00512cc9 in start_thread (arg=0xb4b56b70) at pthread_create.c:304
#6  0x0063969e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xb2de5b70 (LWP 2065)):
#0  0x0097de36 in clock_gettime (clock_id=9969652, tp=0xb2de4f90) at ../sysdeps/unix/clock_gettime.c:100
#1  0x0078350b in do_gettime () at tools/qelapsedtimer_unix.cpp:105
#2  qt_gettime () at tools/qelapsedtimer_unix.cpp:119
#3  0x0085a6e5 in QTimerInfoList::updateCurrentTime (this=0xa4073b4) at kernel/qeventdispatcher_unix.cpp:339
#4  0x0085a72a in QTimerInfoList::timerWait (this=0xa4073b4, tm=...) at kernel/qeventdispatcher_unix.cpp:442
#5  0x008587a8 in timerSourcePrepareHelper (src=<value optimized out>, timeout=0xb2de50bc) at kernel/qeventdispatcher_glib.cpp:136
#6  0x0085883d in timerSourcePrepare (source=0x0, timeout=0x981ff4) at kernel/qeventdispatcher_glib.cpp:169
#7  0x046eae6a in g_main_context_prepare () from /lib/libglib-2.0.so.0
#8  0x046eb279 in ?? () from /lib/libglib-2.0.so.0
#9  0x046eb848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#10 0x0085859f in QEventDispatcherGlib::processEvents (this=0x9db25c0, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#11 0x00828609 in QEventLoop::processEvents (this=0xb2de5290, flags=) at kernel/qeventloop.cpp:149
#12 0x00828a8a in QEventLoop::exec (this=0xb2de5290, flags=...) at kernel/qeventloop.cpp:201
#13 0x00724b7e in QThread::exec (this=0xa32c8a8) at thread/qthread.cpp:490
#14 0x0080735b in QInotifyFileSystemWatcherEngine::run (this=0xa32c8a8) at io/qfilesystemwatcher_inotify.cpp:248
#15 0x00727df9 in QThreadPrivate::start (arg=0xa32c8a8) at thread/qthread_unix.cpp:266
#16 0x00512cc9 in start_thread (arg=0xb2de5b70) at pthread_create.c:304
#17 0x0063969e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb7762710 (LWP 1713)):
[KCrash Handler]
#7  ref (this=0x9a62950, doc=0x9b38d60) at /usr/include/qt4/QtCore/qatomic_i386.h:120
#8  QString (this=0x9a62950, doc=0x9b38d60) at /usr/include/qt4/QtCore/qstring.h:728
#9  KateMainWindow::updateCaption (this=0x9a62950, doc=0x9b38d60) at ../../../kate/app/katemainwindow.cpp:925
#10 0x003ed71e in KateMainWindow::slotWindowActivated (this=0x9a62950) at ../../../kate/app/katemainwindow.cpp:552
#11 0x003f26bb in KateMainWindow::qt_metacall (this=0x9a62950, _c=QMetaObject::InvokeMetaMethod, _id=60, _a=0xbf95c18c) at ./katemainwindow.moc:187
#12 0x0082f8ca in QMetaObject::metacall (object=0x9a62950, cl=133140468, idx=60, argv=0xbf95c18c) at kernel/qmetaobject.cpp:237
#13 0x008426ad in QMetaObject::activate (sender=0x9c91838, m=0x42c5c4, local_signal_index=1, argv=0x40001) at kernel/qobject.cpp:3280
#14 0x003f55f7 in KateViewManager::viewChanged (this=0x9c91838) at ./kateviewmanager.moc:164
#15 0x003f7dc9 in KateViewManager::activateView (this=0x9c91838, view=0x9f426b0) at ../../../kate/app/kateviewmanager.cpp:469
#16 0x003fa385 in KateViewManager::qt_metacall (this=0x9c91838, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0xbf95c328) at ./kateviewmanager.moc:126
#17 0x0082f8ca in QMetaObject::metacall (object=0x9c91838, cl=133140468, idx=33, argv=0xbf95c328) at kernel/qmetaobject.cpp:237
#18 0x008426ad in QMetaObject::activate (sender=0x9f426b0, m=0x34ff5f0, local_signal_index=0, argv=0x40001) at kernel/qobject.cpp:3280
#19 0x034e47c3 in KTextEditor::View::focusIn (this=0x9f426b0, _t1=0x9f426b0) at ./view.moc:125
#20 0x0217ed5a in KateView::slotGotFocus (this=0x9f426b0) at ../../kate/view/kateview.cpp:1012
#21 0x021937e8 in KateViewInternal::focusInEvent (this=0x9f46418) at ../../kate/view/kateviewinternal.cpp:3024
#22 0x00b51f01 in QWidget::event (this=0x9f46418, event=0xbf95c8d0) at kernel/qwidget.cpp:8296
#23 0x00af3fdc in QApplicationPrivate::notify_helper (this=0x98efd08, receiver=0x9f46418, e=0xbf95c8d0) at kernel/qapplication.cpp:4396
#24 0x00afa0e9 in QApplication::notify (this=0xbf95ce6c, receiver=0x9f46418, e=0xbf95c8d0) at kernel/qapplication.cpp:4361
#25 0x07d1282a in KApplication::notify (this=0xbf95ce6c, receiver=0x9f46418, event=0xbf95c8d0) at ../../kdeui/kernel/kapplication.cpp:311
#26 0x00829b3b in QCoreApplication::notifyInternal (this=0xbf95ce6c, receiver=0x9f46418, event=0xbf95c8d0) at kernel/qcoreapplication.cpp:732
#27 0x00b026ce in QCoreApplication::sendEvent (receiver=0x9f46418, event=0x226fe01) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#28 0x00af84c6 in QApplicationPrivate::setFocusWidget (focus=0x9f46418, reason=Qt::TabFocusReason) at kernel/qapplication.cpp:2189
#29 0x00b4cd30 in QWidget::setFocus (this=0x9f46418, reason=Qt::TabFocusReason) at kernel/qwidget.cpp:6283
#30 0x00b4cfb7 in QWidget::focusNextPrevChild (this=0x9a62950, next=<value optimized out>) at kernel/qwidget.cpp:6433
#31 0x00b4cf54 in QWidget::focusNextPrevChild (this=0x9a860d8, next=true) at kernel/qwidget.cpp:6425
#32 0x00b4cf54 in QWidget::focusNextPrevChild (this=0x9c75a90, next=true) at kernel/qwidget.cpp:6425
#33 0x00b4cf54 in QWidget::focusNextPrevChild (this=0x9c75ca0, next=true) at kernel/qwidget.cpp:6425
#34 0x00b50b12 in QWidgetPrivate::hide_helper (this=0x9c75cb8) at kernel/qwidget.cpp:7466
#35 0x00b58040 in QWidget::setVisible (this=0x9c75ca0, visible=false) at kernel/qwidget.cpp:7626
#36 0x00413de6 in hide (this=0x9c75030, widget=0x9da9368) at /usr/include/qt4/QtGui/qwidget.h:491
#37 KateMDI::Sidebar::removeWidget (this=0x9c75030, widget=0x9da9368) at ../../../kate/app/katemdi.cpp:353
#38 0x00419fd6 in KateMDI::MainWindow::toolViewDeleted (this=0x9a62950, widget=0x9da9368) at ../../../kate/app/katemdi.cpp:753
#39 0x0041a135 in KateMDI::ToolView::~ToolView (this=0x9da9368, __in_chrg=<value optimized out>) at ../../../kate/app/katemdi.cpp:230
#40 0x08fc1289 in KateFileTreePluginView::~KateFileTreePluginView (this=0x9dba828, __in_chrg=<value optimized out>) at ../../../../kate/plugins/filetree/katefiletreeplugin.cpp:217
#41 0x003f4728 in KatePluginManager::disablePluginGUI (this=0x9ac1038, item=0x9b84a68, win=0x9a62950) at ../../../kate/app/katepluginmanager.cpp:240
#42 0x003f479f in KatePluginManager::disablePluginGUI (this=0x9ac1038, item=0x9b84a68) at ../../../kate/app/katepluginmanager.cpp:252
#43 0x003f47d9 in KatePluginManager::unloadPlugin (this=0x9ac1038, item=0x9b84a68) at ../../../kate/app/katepluginmanager.cpp:190
#44 0x003f484e in KatePluginManager::unloadAllPlugins (this=0x9ac1038) at ../../../kate/app/katepluginmanager.cpp:156
#45 0x003f503a in KatePluginManager::~KatePluginManager (this=0x9ac1038, __in_chrg=<value optimized out>) at ../../../kate/app/katepluginmanager.cpp:55
#46 0x003d7327 in KateApp::~KateApp (this=0xbf95ce6c, __in_chrg=<value optimized out>) at ../../../kate/app/kateapp.cpp:91
#47 0x0098c3ce in kdemain (argc=3, argv=0xbf95d514) at ../../../kate/app/katemain.cpp:377
#48 0x0804859b in main (argc=3, argv=0xbf95d514) at kate_dummy.cpp:3

Reported using DrKonqi
Comment 1 Dominik Haumann 2011-04-16 13:53:48 UTC
katemainwindow.cpp line 925 :
QString sessName = KateApp::self()->sessionManager()->activeSession()->sessionName();

not straight forward what's going wrong...
Comment 2 Dominik Haumann 2012-03-22 21:56:35 UTC
Patrick, can you still reproduce?
Comment 3 Christoph Cullmann 2012-07-06 08:27:18 UTC
Can't reproduce, sorry.
Comment 4 Dominik Haumann 2016-04-05 19:33:09 UTC
This is finally fixed in the upcoming KDE Applications 16.04 release.

This is what happened: Since the QList<KateMainWindow *> m_mainWindows; is the last member variable, this list is destroyed first in ~KateApp. Only then is the pluginmanager deleted, which unfortunately calls certain functions in its destructor that finally query the mainWindows. As result, already freed memory is read, which results in a crash.

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