Bug 348406

Summary: Kate crash opening text files via sftp
Product: [Applications] kate Reporter: Phil Turmel <philip>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: christoph, philip
Priority: NOR Keywords: drkonqi
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Phil Turmel 2015-05-29 16:30:37 UTC
Application: kate (3.14.6)
KDE Platform Version: 4.14.6 (Compiled from sources)
Qt Version: 4.8.6
Operating System: Linux 3.19.2 x86_64
Distribution: "Gentoo Base System release 2.2"

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

Opening an /etc/hosts file on a remote server via sftp.  The host is reachable via ssh and can be browsed with konqueror using the same sftp:// url.  Other files on that server open successfully.

Using nano within the server to add a blank line made the file openable.  Using kate to remove the blank line then saving and closing, made kate crash again on open.  ???  Some weird content clash?

I am saving a copy of the un-openable hosts file for later testing.  The copy as "hosts.1" also cannot be opened by kate, even when moved to a local filesystem.

The crash can be reproduced every time.

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

Thread 3 (Thread 0x7f88fb407700 (LWP 13869)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f890a51d85b in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f890a81af00 <QTWTF::pageheap_memory>) at /var/tmp/portage/dev-qt/qtscript-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x00007f890a51d899 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at /var/tmp/portage/dev-qt/qtscript-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x00007f89148f03a4 in start_thread (arg=0x7f88fb407700) at pthread_create.c:310
#4  0x00007f89136a386d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f8878ac1700 (LWP 13871)):
#0  0x00007f891369ac8d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f89107a3c24 in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7f8874003410, timeout=-1, context=0x7f88740009a0) at /var/tmp/portage/dev-libs/glib-2.42.2/work/glib-2.42.2/glib/gmain.c:4076
#2  g_main_context_iterate (context=context@entry=0x7f88740009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.42.2/work/glib-2.42.2/glib/gmain.c:3776
#3  0x00007f89107a3d2c in g_main_context_iteration (context=0x7f88740009a0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.42.2/work/glib-2.42.2/glib/gmain.c:3842
#4  0x00007f8914cabbee in QEventDispatcherGlib::processEvents (this=0x7f88740008c0, flags=...) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qeventdispatcher_glib.cpp:452
#5  0x00007f8914c7db3f in QEventLoop::processEvents (this=this@entry=0x7f8878ac0e20, flags=...) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qeventloop.cpp:149
#6  0x00007f8914c7de35 in QEventLoop::exec (this=this@entry=0x7f8878ac0e20, flags=...) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qeventloop.cpp:204
#7  0x00007f8914b7bc6f in QThread::exec (this=this@entry=0x1983f10) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/thread/qthread.cpp:538
#8  0x00007f8914c5f463 in QInotifyFileSystemWatcherEngine::run (this=0x1983f10) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/io/qfilesystemwatcher_inotify.cpp:265
#9  0x00007f8914b7e34f in QThreadPrivate::start (arg=0x1983f10) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/thread/qthread_unix.cpp:349
#10 0x00007f89148f03a4 in start_thread (arg=0x7f8878ac1700) at pthread_create.c:310
#11 0x00007f89136a386d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f891601e780 (LWP 13868)):
[KCrash Handler]
#6  d_func (this=0x0) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kdecore/sycoca/ksycocaentry.h:154
#7  KSycocaEntry::name (this=0x0) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kdecore/sycoca/ksycocaentry.cpp:159
#8  0x00007f88fec5413f in TextLoader (proberType=<optimized out>, filename=..., this=0x7ffd10533100) at /var/tmp/portage/kde-base/katepart-4.14.3/work/katepart-4.14.3/part/buffer/katetextloader.h:72
#9  Kate::TextBuffer::load (this=0x1460360, filename=..., encodingErrors=@0x1460428: false, tooLongLinesWrapped=@0x1460429: false, enforceTextCodec=false) at /var/tmp/portage/kde-base/katepart-4.14.3/work/katepart-4.14.3/part/buffer/katetextbuffer.cpp:529
#10 0x00007f88fecc596e in KateBuffer::openFile (this=0x1460360, m_file=..., enforceTextCodec=enforceTextCodec@entry=false) at /var/tmp/portage/kde-base/katepart-4.14.3/work/katepart-4.14.3/part/document/katebuffer.cpp:214
#11 0x00007f88fecbaea2 in KateDocument::openFile (this=0x145fb10) at /var/tmp/portage/kde-base/katepart-4.14.3/work/katepart-4.14.3/part/document/katedocument.cpp:1970
#12 0x00007f890c8c2533 in KParts::ReadOnlyPartPrivate::_k_slotJobFinished (this=0x145fd90, job=0x1e08120) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kparts/part.cpp:694
#13 0x00007f8914c92cea in QMetaObject::activate (sender=sender@entry=0x1e08120, m=m@entry=0x7f89154a46a0 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffd10533570) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qobject.cpp:3567
#14 0x00007f8915116122 in KJob::result (this=this@entry=0x1e08120, _t1=_t1@entry=0x1e08120) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6_build/kdecore/kjob.moc:207
#15 0x00007f8915116160 in KJob::emitResult (this=this@entry=0x1e08120) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kdecore/jobs/kjob.cpp:318
#16 0x00007f890dd2f70f in KIO::FileCopyJob::slotResult (this=0x1e08120, job=0x1bb3070) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kio/kio/job.cpp:2470
#17 0x00007f8914c92cea in QMetaObject::activate (sender=sender@entry=0x1bb3070, m=m@entry=0x7f89154a46a0 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffd105336e0) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qobject.cpp:3567
#18 0x00007f8915116122 in KJob::result (this=this@entry=0x1bb3070, _t1=_t1@entry=0x1bb3070) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6_build/kdecore/kjob.moc:207
#19 0x00007f8915116160 in KJob::emitResult (this=this@entry=0x1bb3070) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kdecore/jobs/kjob.cpp:318
#20 0x00007f890dd2baba in KIO::SimpleJob::slotFinished (this=0x1bb3070) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kio/kio/job.cpp:496
#21 0x00007f8914c92cea in QMetaObject::activate (sender=0x1874b70, m=m@entry=0x7f890e0cebe0 <KIO::SlaveInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x0) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qobject.cpp:3567
#22 0x00007f890ddc9243 in KIO::SlaveInterface::finished (this=<optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6_build/kio/slaveinterface.moc:184
#23 0x00007f890ddca756 in KIO::SlaveInterface::dispatch (this=<optimized out>, _cmd=104, rawdata=...) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kio/kio/slaveinterface.cpp:176
#24 0x00007f890ddc827e in KIO::SlaveInterface::dispatch (this=0x1874b70) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kio/kio/slaveinterface.cpp:92
#25 0x00007f890ddbcf86 in KIO::Slave::gotInput (this=0x1874b70) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kio/kio/slave.cpp:344
#26 0x00007f8914c92cea in QMetaObject::activate (sender=0x1d2f9c0, m=m@entry=0x7f890e0c8100 <KIO::Connection::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qobject.cpp:3567
#27 0x00007f890dcf9590 in KIO::Connection::readyRead (this=<optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6_build/kio/connection.moc:105
#28 0x00007f890dcf9c81 in KIO::ConnectionPrivate::dequeue (this=0x1bb3250) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kio/kio/connection.cpp:82
#29 0x00007f8914c9708e in QObject::event (this=0x1d2f9c0, e=<optimized out>) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qobject.cpp:1222
#30 0x00007f8913e2a6cc in QApplicationPrivate::notify_helper (this=this@entry=0x11db4c0, receiver=receiver@entry=0x1d2f9c0, e=e@entry=0x1bc0380) at /var/tmp/portage/dev-qt/qtgui-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/gui/kernel/qapplication.cpp:4565
#31 0x00007f8913e30c0d in QApplication::notify (this=this@entry=0x7ffd10534460, receiver=receiver@entry=0x1d2f9c0, e=e@entry=0x1bc0380) at /var/tmp/portage/dev-qt/qtgui-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/gui/kernel/qapplication.cpp:4351
#32 0x00007f8915a304ba in KApplication::notify (this=0x7ffd10534460, receiver=0x1d2f9c0, event=0x1bc0380) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kdeui/kernel/kapplication.cpp:311
#33 0x00007f8914c7ef7d in QCoreApplication::notifyInternal (this=0x7ffd10534460, receiver=receiver@entry=0x1d2f9c0, event=event@entry=0x1bc0380) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcoreapplication.cpp:953
#34 0x00007f8914c8209d in sendEvent (event=0x1bc0380, receiver=0x1d2f9c0) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcoreapplication.h:231
#35 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x111d2b0) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcoreapplication.cpp:1577
#36 0x00007f8914c82543 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcoreapplication.cpp:1470
#37 0x00007f8914cac40e in sendPostedEvents () at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcoreapplication.h:236
#38 postEventSourceDispatch (s=0x11d84e0) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qeventdispatcher_glib.cpp:300
#39 0x00007f89107a3a44 in g_main_dispatch (context=0x11db680) at /var/tmp/portage/dev-libs/glib-2.42.2/work/glib-2.42.2/glib/gmain.c:3111
#40 g_main_context_dispatch (context=context@entry=0x11db680) at /var/tmp/portage/dev-libs/glib-2.42.2/work/glib-2.42.2/glib/gmain.c:3710
#41 0x00007f89107a3c88 in g_main_context_iterate (context=context@entry=0x11db680, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.42.2/work/glib-2.42.2/glib/gmain.c:3781
#42 0x00007f89107a3d2c in g_main_context_iteration (context=0x11db680, may_block=1) at /var/tmp/portage/dev-libs/glib-2.42.2/work/glib-2.42.2/glib/gmain.c:3842
#43 0x00007f8914cabbce in QEventDispatcherGlib::processEvents (this=0x111f830, flags=...) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qeventdispatcher_glib.cpp:450
#44 0x00007f8913ec6ef6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at /var/tmp/portage/dev-qt/qtgui-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#45 0x00007f8914c7db3f in QEventLoop::processEvents (this=this@entry=0x7ffd10534220, flags=...) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qeventloop.cpp:149
#46 0x00007f8914c7de35 in QEventLoop::exec (this=this@entry=0x7ffd10534220, flags=...) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qeventloop.cpp:204
#47 0x00007f8914c830d9 in QCoreApplication::exec () at /var/tmp/portage/dev-qt/qtcore-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcoreapplication.cpp:1225
#48 0x00007f8913e28e9c in QApplication::exec () at /var/tmp/portage/dev-qt/qtgui-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/gui/kernel/qapplication.cpp:3823
#49 0x00007f890438cd25 in kdemain (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/kde-base/kate-4.14.3/work/kate-4.14.3/kate/app/katemain.cpp:381
#50 0x0000000000408095 in launch (argc=argc@entry=1, _name=_name@entry=0x11c2da8 "kate", args=args@entry=0x11c2dad "\001", cwd=cwd@entry=0x0, envc=envc@entry=1, envs=<optimized out>, envs@entry=0x11c2db5 "DISPLAY=:0", reset_env=false, tty=tty@entry=0x0, avoid_loops=false, startup_id_str=startup_id_str@entry=0x40a886 "0") at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kinit/kinit.cpp:726
#51 0x0000000000408f2b in handle_launcher_request (sock=7, who=<optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kinit/kinit.cpp:1218
#52 0x0000000000409596 in handle_requests (waitForPid=waitForPid@entry=0) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kinit/kinit.cpp:1411
#53 0x00000000004052dd in main (argc=2, argv=0x7ffd10534da8, envp=0x7ffd10534dc0) at /var/tmp/portage/kde-base/kdelibs-4.14.6-r1/work/kdelibs-4.14.6/kinit/kinit.cpp:1899

Possible duplicates by query: bug 344826, bug 342286, bug 341680.

Reported using DrKonqi
Comment 2 Phil Turmel 2015-10-11 01:57:28 UTC
Created attachment 94943 [details]
New crash information added by DrKonqi

kate (3.14.12) on KDE Platform 4.14.12 using Qt 4.8.7

- What I was doing when the application crashed:
Opening a text file on a local ntfs mount.  The file has the following contents:

00000000  36 51 58 2d 43 56 49 20  40 20 43 6f 72 76 75 73  |6QX-CVI @ Corvus|
00000010  0a 47 4d 43 2d 4e 42 57  20 40 20 49 67 6e 37 35  |.GMC-NBW @ Ign75|
00000020  31 20 56 4d 0a 50 47 4d  2d 32 4b 51 20 40 20 49  |1 VM.PGM-2KQ @ I|
00000030  67 6e 37 36 31 20 56 4d  0a                       |gn761 VM.|
00000039

Kate also crashes with a segfault on empty files.

-- Backtrace (Reduced):
#7  KSycocaEntry::name (this=0x0) at /var/tmp/portage/kde-base/kdelibs-4.14.12/work/kdelibs-4.14.12/kdecore/sycoca/ksycocaentry.cpp:159
#8  0x00007f28206cc13f in Kate::TextLoader::TextLoader (proberType=<optimized out>, filename=..., this=0x7fffc5b58aa0) at /var/tmp/portage/kde-base/katepart-4.14.3/work/katepart-4.14.3/part/buffer/katetextloader.h:72
#9  Kate::TextBuffer::load (this=0x13cf820, filename=..., encodingErrors=@0x13cf8e8: false, tooLongLinesWrapped=@0x13cf8e9: false, enforceTextCodec=false) at /var/tmp/portage/kde-base/katepart-4.14.3/work/katepart-4.14.3/part/buffer/katetextbuffer.cpp:529
#10 0x00007f282073d96e in KateBuffer::openFile (this=0x13cf820, m_file=..., enforceTextCodec=enforceTextCodec@entry=false) at /var/tmp/portage/kde-base/katepart-4.14.3/work/katepart-4.14.3/part/document/katebuffer.cpp:214
#11 0x00007f2820732ea2 in KateDocument::openFile (this=0x13cefd0) at /var/tmp/portage/kde-base/katepart-4.14.3/work/katepart-4.14.3/part/document/katedocument.cpp:1970
Comment 3 Christoph Cullmann 2015-10-11 06:35:03 UTC
Yes, that is a dupe, KService pointer is broken here.

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