Bug 157678 - Kate crashed when adding newline to end of document
Summary: Kate crashed when adding newline to end of document
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 175494 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-11 19:38 UTC by Oliver Putz
Modified: 2009-04-22 16:12 UTC (History)
3 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 Oliver Putz 2008-02-11 19:38:51 UTC
Version:           3.0.61 (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

Kate crashed today in the following situation: I had several files opened in kate and wrote some C code (C highlighting and Indention activated). When I scrolled down in one of the files in order to add a newline at the end of the document, kate crashed as soon as I hit the enter button. I use kdelibs r772899

The backtrace that I got was:

Application: Kate (kate), signal SIGABRT
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb5f556d0 (LWP 8596)]
[KCrash handler]
#6  0xffffe410 in __kernel_vsyscall ()
#7  0xb61be1f1 in *__GI_raise (sig=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#8  0xb61bf9b8 in *__GI_abort () at abort.c:88
#9  0xb6db3265 in qt_message_output (msgType=QtFatalMsg, 
    buf=0xbfa20d7c "ASSERT: \"smartGroup\" in file /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/smart/katesmartmanager.cpp, line 176")
    at global/qglobal.cpp:2160
#10 0xb6db332a in qFatal (msg=0xb6eba87c "ASSERT: \"%s\" in file %s, line %d")
    at global/qglobal.cpp:2392
#11 0xb6db3555 in qt_assert (assertion=0xb4a208d8 "smartGroup", 
    file=0xb4a2068c "/var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/smart/katesmartmanager.cpp", line=176) at global/qglobal.cpp:1917
#12 0xb4976b81 in KateSmartManager::groupForLine (this=0x83dce70, line=315)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/smart/katesmartmanager.cpp:176
#13 0xb4972486 in KateSmartCursor::setPositionInternal (this=0x87edf54, 
    pos=@0xbfa22e2c, internal=true)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/smart/katesmartcursor.cpp:137
#14 0xb4972756 in KateSmartCursor::setLineInternal (this=0x87edf54, 
    newLine=315, internal=true)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/smart/katesmartcursor.cpp:230
#15 0xb497293d in KateSmartCursor::translate (this=0x87edf54, edit=@0x84cc4d8)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/smart/katesmartcursor.cpp:217
#16 0xb4977f9c in KateSmartGroup::translateChanged (this=0x89d5080, 
    edit=@0x84cc4d8)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/smart/katesmartmanager.cpp:308
#17 0xb49784b8 in KateSmartManager::slotTextChanged (this=0x83dce70, 
    edit=0x84cc4d8)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/smart/katesmartmanager.cpp:238
#18 0xb49786e4 in KateSmartManager::qt_metacall (this=0x83dce70, 
    _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0xbfa2348c)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kate/katesmartmanager.moc:72
#19 0xb6e991f4 in QMetaObject::activate (sender=0x8332108, 
    from_signal_index=4, to_signal_index=4, argv=<value optimized out>)
    at kernel/qobject.cpp:3081
#20 0xb6e99d94 in QMetaObject::activate (sender=0x8332108, m=0xb4a32884, 
    local_signal_index=0, argv=0xbfa2348c) at kernel/qobject.cpp:3140
#21 0xb49483d1 in KateEditHistory::editDone (this=0x8332108, _t1=0x84cc4d8)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/kate/kateedit.moc:75
#22 0xb493fe40 in KateEditHistory::doEdit (this=0x8332108, edit=0x84cc4d8)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/document/kateedit.h:171
#23 0xb49300f8 in KateDocument::editWrapLine (this=0x841bed0, line=313, 
    col=6, newLine=true, newLineAdded=0x0)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/document/katedocument.cpp:1422
#24 0xb4931539 in KateDocument::newLine (this=0x841bed0, v=0x845da78)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/document/katedocument.cpp:4090
#25 0xb49b6ee1 in KateViewInternal::doReturn (this=0x87edf00)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/view/kateviewinternal.cpp:729
#26 0xb49b8e7c in KateViewInternal::keyPressEvent (this=0x87edf00, 
    e=0xbfa23b54)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/view/kateviewinternal.cpp:2153
#27 0xb49b6c25 in KateViewInternal::eventFilter (this=0x87edf00, 
    obj=0x87edf00, e=0xbfa23b54)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kate/view/kateviewinternal.cpp:2088
#28 0xb6526d9b in QApplicationPrivate::notify_helper (this=0x8058c70, 
    receiver=0x87edf00, e=0xbfa23b54) at kernel/qapplication.cpp:3548
#29 0xb652903a in QApplication::notify (this=0xbfa24614, receiver=0x87edf00, 
    e=0xbfa23b54) at kernel/qapplication.cpp:3169
#30 0xb7442763 in KApplication::notify (this=0xbfa24614, receiver=0x87edf00, 
    event=0xbfa23b54)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kdeui/kernel/kapplication.cpp:311
#31 0xb6e85d7b in QCoreApplication::notifyInternal (this=0xbfa24614, 
    receiver=0x87edf00, event=0xbfa23b54) at kernel/qcoreapplication.cpp:530
#32 0xb657f48e in qt_sendSpontaneousEvent (receiver=0x87edf00, event=0x6)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:203
#33 0xb65ad91b in QKeyMapper::sendKeyEvent (keyWidget=0x87edf00, grab=false, 
    type=QEvent::KeyPress, code=16777220, modifiers=@0xbfa23e54, 
    text=@0xbfa23e2c, autorepeat=false, count=1, nativeScanCode=36, 
    nativeVirtualKey=65293, nativeModifiers=0)
    at kernel/qkeymapper_x11.cpp:1599
#34 0xb65af81b in QKeyMapperPrivate::translateKeyEvent (this=0x8072c38, 
    keyWidget=0x87edf00, event=0xbfa24158, grab=false)
    at kernel/qkeymapper_x11.cpp:1579
#35 0xb658aeef in QApplication::x11ProcessEvent (this=0xbfa24614, 
    event=0xbfa24158) at kernel/qapplication_x11.cpp:2928
#36 0xb65b0c45 in QEventDispatcherX11::processEvents (this=0x8058d90, 
    flags=@0xbfa24244) at kernel/qeventdispatcher_x11.cpp:125
#37 0xb6e85191 in QEventLoop::processEvents (this=0xbfa242b0, 
    flags=@0xbfa24278) at kernel/qeventloop.cpp:140
#38 0xb6e8529a in QEventLoop::exec (this=0xbfa242b0, flags=@0xbfa242b8)
    at kernel/qeventloop.cpp:186
#39 0xb6e87626 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:759
#40 0xb6526487 in QApplication::exec () at kernel/qapplication.cpp:3053
#41 0xb7f36588 in kdemain (argc=2, argv=0xbfa24b94)
    at /var/tmp/portage/kde-base/kdesdk-9999.4/work/kdesdk-9999.4/kate/app/katemain.cpp:256
#42 0x08048842 in main (argc=)
    at /var/tmp/portage/kde-base/kdesdk-9999.4/work/kdesdk_build/kate/app/kate_dummy.cpp:3
#43 0xb61aafdc in __libc_start_main (main=0x8048820 <main>, argc=2, 
    ubp_av=0xbfa24b94, init=0x8048870 <__libc_csu_init>, 
    fini=0x8048860 <__libc_csu_fini>, rtld_fini=0xb7f49100 <_dl_fini>, 
    stack_end=0xbfa24b8c) at libc-start.c:229
#44 0x08048791 in _start ()
#0  0xffffe410 in __kernel_vsyscall ()
Comment 1 Oliver Putz 2008-02-11 19:44:06 UTC
Not sure if it is of any interest, but I just saw that the last line of the document I edited was a comment, so I guess as soon as I hit enter to add the newline, kate tried to enter a newline that was an empty comment ("//").
Comment 2 Christoph Cullmann 2008-08-18 23:19:33 UTC
Can't reproduce, sorry. reopen if you have file where it can be reproduced :/
Comment 3 Christophe Marin 2008-11-18 15:27:51 UTC
*** Bug 175494 has been marked as a duplicate of this bug. ***
Comment 4 Dominik Haumann 2008-12-15 12:37:31 UTC
Cannot reproduce. Anyone else?
Comment 5 Oliver Putz 2008-12-15 14:22:02 UTC
Hm, regrettably I was never able to reproduce it in the first place...
Closing for now and I reopen if I stumble over it again some day?
Comment 6 Will Angenent 2009-02-18 11:28:02 UTC
I had the same crash and backtrace twice in a row just now, doing the same operation:
* start kate
* ctrl-end to go the the end of the document
* move cursor up and select a block using shift, arrows & cut to clipboard
* ctrl-end to go to the end again
* press enter

Unfortunately, I couldn't manage to reproduce a third time.

This is on an ordinary text file, no highlighting or indentation or anything using version 3.1.4 on kubuntu with static word wrap turned off.
Comment 7 Christoph Cullmann 2009-04-22 16:12:27 UTC
Hmm, can't reproduce with /trunk :/