Bug 157737 - Crash when modifying (remote) file before file gets fully loaded
Summary: Crash when modifying (remote) file before file gets fully loaded
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-12 18:52 UTC by Oliver Putz
Modified: 2008-06-23 19:30 UTC (History)
0 users

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 Oliver Putz 2008-02-12 18:52:38 UTC
Version:           4.00.61 (KDE 4.0.61 >= 20080207) (using 4.00.61 (KDE 4.0.61 >= 20080207), Gentoo)
Compiler:          i686-pc-linux-gnu-gcc
OS:                Linux (i686) release 2.6.23-gentoo-r6

Steps to reproduce:

1) Open a sftp connection to some (remote) machine [I used sftp://root@localhost]
2) Copy some text content into your klipper (e.g. CTRL+C on some text from some textfile)
3) Go to some directory that has textfiles in it
4) Click on file and choose "edit with KWrite"
5) While KWrite still is loading the file and the KWrite window is empty, paste the content from klipper via CTRL-V to the file and save it
6) See KWrite (kdelibs r772899) crash

I assume that the crash has something to do with the fact that I modify the file before it actually gets fully loaded. Furthermore it looks as if Kate is actually the culprit

Backtrace:

Application: KWrite (kwrite), signal SIGABRT
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb65326d0 (LWP 9864)]
[KCrash handler]
#6  0xffffe410 in __kernel_vsyscall ()
#7  0xb675e1f1 in *__GI_raise (sig=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#8  0xb675f9b8 in *__GI_abort () at abort.c:88
#9  0xb7325265 in qt_message_output (msgType=QtFatalMsg, 
    buf=0xbfa2502c "ASSERT: \"m_textLine\" in file /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/render/katelinelayout.cpp, line 68")
    at global/qglobal.cpp:2160
#10 0xb732532a in qFatal (msg=0xb742c87c "ASSERT: \"%s\" in file %s, line %d")
    at global/qglobal.cpp:2392
#11 0xb7325555 in qt_assert (assertion=0xb4ffd2ed "m_textLine", 
    file=0xb4ffd32c "/var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/render/katelinelayout.cpp", line=68) at global/qglobal.cpp:1917
#12 0xb4f4e24d in KateLineLayout::textLine (this=0x8320320)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/render/katelinelayout.cpp:68
#13 0xb4f4e2cd in KateLineLayout::isValid (this=0x8320320)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/render/katelinelayout.cpp:120
#14 0xb4f4ce69 in KateTextLayout::isValid (this=0x828f278)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/render/katetextlayout.cpp:90
#15 0xb4f4da5d in KateTextLayout::setDirty (this=0x828f278, dirty=true)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/render/katetextlayout.cpp:44
#16 0xb4f90276 in KateViewInternal::tagAll (this=0x818df50)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/view/kateviewinternal.cpp:2009
#17 0xb4f81ea3 in KateView::tagAll (this=0x818d360)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/view/kateview.cpp:1352
#18 0xb4ef9f35 in KateDocument::tagAll (this=0x818a908)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/document/katedocument.cpp:4982
#19 0xb4efbf9b in KateDocument::makeAttribs (this=0x818a908, 
    needInvalidate=false)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/document/katedocument.cpp:3913
#20 0xb4f04e68 in KateDocument::bufferHlChanged (this=0x818a908)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/document/katedocument.cpp:3076
#21 0xb4f1f22e in KateBuffer::setHighlight (this=0x818aa28, hlMode=91)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/document/katebuffer.cpp:693
#22 0xb4f04fb7 in KateDocument::updateFileType (this=0x818a908, 
    newType=@0xbfa27458, user=false)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/document/katedocument.cpp:5890
#23 0xb4f06d5d in KateDocument::openFile (this=0x818a908)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/document/katedocument.cpp:3406
#24 0xb7da909c in KParts::ReadOnlyPartPrivate::_k_slotJobFinished (
    this=0x8112258, job=0x826ac28)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kparts/part.cpp:631
#25 0xb7daa075 in KParts::ReadOnlyPart::qt_metacall (this=0x818a908, 
    _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0xbfa27b0c)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kparts/part.moc:161
#26 0xb7daa17a in KParts::ReadWritePart::qt_metacall (this=0x818a908, 
    _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0xbfa27b0c)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kparts/part.moc:267
#27 0xb7b5010a in KTextEditor::Document::qt_metacall (this=0x818a908, 
    _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0xbfa27b0c)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/interfaces/ktexteditor/document.moc:85
#28 0xb4f1201a in KateDocument::qt_metacall (this=0x818a908, 
    _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0xbfa27b0c)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kate/katedocument.moc:222
#29 0xb740b1f4 in QMetaObject::activate (sender=0x826ac28, 
    from_signal_index=7, to_signal_index=7, argv=<value optimized out>)
    at kernel/qobject.cpp:3081
#30 0xb740bd94 in QMetaObject::activate (sender=0x826ac28, m=0xb7fa83a8, 
    local_signal_index=3, argv=0xbfa27b0c) at kernel/qobject.cpp:3140
#31 0xb7ea6044 in KJob::result (this=0x826ac28, _t1=0x826ac28)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kdecore/kjob.moc:185
#32 0xb7ea6582 in KJob::emitResult (this=0x826ac28)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kdecore/jobs/kjob.cpp:290
#33 0xb7c1c09c in KIO::FileCopyJob::slotResult (this=0x826ac28, job=0x825b568)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kio/kio/job.cpp:2158
#34 0xb7c1ce28 in KIO::FileCopyJob::qt_metacall (this=0x826ac28, 
    _c=QMetaObject::InvokeMetaMethod, _id=32, _a=0xbfa280cc)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kio/jobclasses.moc:657
#35 0xb740b1f4 in QMetaObject::activate (sender=0x825b568, 
    from_signal_index=7, to_signal_index=7, argv=<value optimized out>)
    at kernel/qobject.cpp:3081
#36 0xb740bd94 in QMetaObject::activate (sender=0x825b568, m=0xb7fa83a8, 
    local_signal_index=3, argv=0xbfa280cc) at kernel/qobject.cpp:3140
#37 0xb7ea6044 in KJob::result (this=0x825b568, _t1=0x825b568)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kdecore/kjob.moc:185
#38 0xb7ea6582 in KJob::emitResult (this=0x825b568)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kdecore/jobs/kjob.cpp:290
#39 0xb7c16298 in KIO::SimpleJob::slotFinished (this=0x825b568)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kio/kio/job.cpp:491
#40 0xb7c15b5c in KIO::SimpleJob::qt_metacall (this=0x825b568, 
    _c=QMetaObject::InvokeMetaMethod, _id=32, _a=0xbfa28674)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kio/jobclasses.moc:155
#41 0xb7c15c9a in KIO::DirectCopyJob::qt_metacall (this=0x825b568, 
    _c=QMetaObject::InvokeMetaMethod, _id=32, _a=0xbfa28674)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kio/job_p.moc:141
#42 0xb740b1f4 in QMetaObject::activate (sender=0x8251c28, 
    from_signal_index=8, to_signal_index=8, argv=<value optimized out>)
    at kernel/qobject.cpp:3081
#43 0xb740bd94 in QMetaObject::activate (sender=0x8251c28, m=0xb7d88024, 
    local_signal_index=4, argv=0x0) at kernel/qobject.cpp:3140
#44 0xb7cbeb56 in KIO::SlaveInterface::finished (this=0x8251c28)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kio/slaveinterface.moc:160
#45 0xb7cc071a in KIO::SlaveInterface::dispatch (this=0x8251c28, _cmd=104, 
    rawdata=@0xbfa28854)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kio/kio/slaveinterface.cpp:176
#46 0xb7cc1376 in KIO::SlaveInterface::dispatch (this=0x8251c28)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kio/kio/slaveinterface.cpp:90
#47 0xb7cb39e7 in KIO::Slave::gotInput (this=0x8251c28)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kio/kio/slave.cpp:319
#48 0xb7cb4f3d in KIO::Slave::qt_metacall (this=0x8251c28, 
    _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbfa28d74)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kio/slave.moc:74
#49 0xb740b1f4 in QMetaObject::activate (sender=0x828a678, 
    from_signal_index=4, to_signal_index=4, argv=<value optimized out>)
    at kernel/qobject.cpp:3081
#50 0xb740bd94 in QMetaObject::activate (sender=0x828a678, m=0xb7d84f20, 
    local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3140
#51 0xb7beeb03 in KIO::Connection::readyRead (this=0x828a678)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kio/connection.moc:83
#52 0xb7bef986 in KIO::ConnectionPrivate::dequeue (this=0x8268058)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kio/kio/connection.cpp:82
#53 0xb7bf0735 in KIO::Connection::qt_metacall (this=0x828a678, 
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x83292c8)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kio/connection.moc:71
#54 0xb74062f9 in QMetaCallEvent::placeMetaCall (this=0x8112468, 
    object=0x828a678) at kernel/qobject.cpp:536
#55 0xb7409017 in QObject::event (this=0x828a678, e=0x2688)
    at kernel/qobject.cpp:1122
#56 0xb6a98e8a in QApplicationPrivate::notify_helper (this=0x8057ad0, 
    receiver=0x828a678, e=0x8112468) at kernel/qapplication.cpp:3556
#57 0xb6a9a77a in QApplication::notify (this=0xbfa297b8, receiver=0x828a678, 
    e=0x8112468) at kernel/qapplication.cpp:3115
#58 0xb79da763 in KApplication::notify (this=0xbfa297b8, receiver=0x828a678, 
    event=0x8112468)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kdeui/kernel/kapplication.cpp:311
#59 0xb73f7d7b in QCoreApplication::notifyInternal (this=0xbfa297b8, 
    receiver=0x828a678, event=0x8112468) at kernel/qcoreapplication.cpp:530
#60 0xb73f921a in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, 
    event_type=0, data=0x804ce50) at kernel/qcoreapplication.h:200
#61 0xb73f956d in QCoreApplication::sendPostedEvents (receiver=0x0, 
    event_type=0) at kernel/qcoreapplication.cpp:1001
#62 0xb6b22aee in QEventDispatcherX11::processEvents (this=0x80575b0, 
    flags=@0xbfa29474)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:205
#63 0xb73f7191 in QEventLoop::processEvents (this=0xbfa294e0, 
    flags=@0xbfa294a8) at kernel/qeventloop.cpp:140
#64 0xb73f729a in QEventLoop::exec (this=0xbfa294e0, flags=@0xbfa294e8)
    at kernel/qeventloop.cpp:186
#65 0xb73f9626 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:759
#66 0xb6a98487 in QApplication::exec () at kernel/qapplication.cpp:3053
#67 0xb7fbcb85 in kdemain (argc=2, argv=0xbfa29b84)
    at /var/tmp/portage/kde-base/kdebase-9999.4/work/kdebase-9999.4/apps/kwrite/kwritemain.cpp:784
#68 0x080487c2 in main (argc=)
    at /var/tmp/portage/kde-base/kdebase-9999.4/work/kdebase_build/apps/kwrite/kwrite_dummy.cpp:3
#69 0xb674afdc in __libc_start_main (main=0x80487a0 <main>, argc=2, 
    ubp_av=0xbfa29b84, init=0x80487f0 <__libc_csu_init>, 
    fini=0x80487e0 <__libc_csu_fini>, rtld_fini=0xb7fd3100 <_dl_fini>, 
    stack_end=0xbfa29b7c) at libc-start.c:229
#70 0x08048711 in _start ()
#0  0xffffe410 in __kernel_vsyscall ()
Comment 1 Dominik Haumann 2008-03-02 14:53:48 UTC
Related: #158336, #157931
Comment 2 Oliver Putz 2008-06-23 19:30:36 UTC
I cannot reproduce this crash any longer, so I'll close it.