Bug 177546

Summary: crash on editing find-string (assert in kateviewinternal.cpp:1266)
Product: [Applications] kate Reporter: Daniel Franke <franke.daniel>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: andresbajotierra, will.angenent
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Daniel Franke 2008-12-12 00:38:37 UTC
Version:            (using KDE 4.1.3)
Compiler:          gcc-4.3.2 
OS:                Linux
Installed from:    Gentoo Packages

While editing the find string (POS1 and removed the leading characters, IIRC), the following assert was triggered:

Application: Kate (kate), signal SIGABRT
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb5e738e0 (LWP 4815)]
[KCrash handler]
#6  0xb80d2424 in __kernel_vsyscall ()
#7  0xb618ec20 in raise () from /lib/libc.so.6
#8  0xb6190478 in abort () from /lib/libc.so.6
#9  0xb64e7fbd in qt_message_output (msgType=QtFatalMsg, 
    buf=0xbf8e9590 "ASSERT: \"thisLine.virtualLine() == virtualCursor.line()\" in file /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp, line 1266") at global/qglobal.cpp:2108
#10 0xb64e8086 in qFatal (msg=0xb6644f9c "ASSERT: \"%s\" in file %s, line %d")
    at global/qglobal.cpp:2309
#11 0xb64e8405 in qt_assert (
    assertion=0xb497bda4 "thisLine.virtualLine() == virtualCursor.line()", 
    file=0xb497bcac "/var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp", line=1266) at global/qglobal.cpp:1878
#12 0xb490d229 in KateViewInternal::viewLineOffset (this=0xc057ed8, 
    virtualCursor=@0xc057fc0, offset=0, keepX=false)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp:1266
#13 0xb490fcd9 in KateViewInternal::makeVisible (this=0xc057ed8, 
    c=@0xc057f7c, endCol=45, force=false, center=true, calledExternally=false)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp:637
#14 0xb490ffa7 in KateViewInternal::updateCursor (this=0xc057ed8, 
    newCursor=@0xbf8eb834, force=false, center=<value optimized out>, 
    calledExternally=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp:1810
#15 0xb48fef00 in KateView::setCursorPositionInternal (this=0xbe69cf0, 
    position=@0xd141500, tabwidth=1, calledExternally=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateview.cpp:1000
#16 0xb4928e24 in KateSearchBar::selectRange (view=0xbe69cf0, 
    range=@0xc9ab128)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/utils/katesearchbar.cpp:244
#17 0xb492be3c in KateSearchBar::onIncPatternChanged (this=0xc4310a0, 
    pattern=@0xbf8ebab4, invokedByUserAction=true)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/utils/katesearchbar.cpp:406
#18 0xb492c7f0 in KateSearchBar::qt_metacall (this=0xc4310a0, 
    _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0xbf8eba6c)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs_build/kate/katesearchbar.moc:136
#19 0xb6607f39 in QMetaObject::activate (sender=0xb65a3c0, 
    from_signal_index=<value optimized out>, to_signal_index=27, 
    argv=0xbf8eba6c) at kernel/qobject.cpp:3028
#20 0xb6609ee2 in QMetaObject::activate (sender=0xb65a3c0, m=0xb7006f84, 
    local_signal_index=0, argv=0xbf8eba6c) at kernel/qobject.cpp:3098
#21 0xb6bcb1e3 in QLineEdit::textChanged (this=0xb65a3c0, _t1=@0xbf8ebab4)
    at .moc/debug-shared/moc_qlineedit.cpp:208
#22 0xb6bd1f26 in QLineEditPrivate::finishChange (this=0xacc2bc8, 
    validateFromState=51, update=false, edited=true)
    at widgets/qlineedit.cpp:2883
#23 0xb6bd2b3c in QLineEdit::del (this=0xb65a3c0) at widgets/qlineedit.cpp:958
#24 0xb6bd44d3 in QLineEdit::keyPressEvent (this=0xb65a3c0, event=0xbf8ec00c)
    at widgets/qlineedit.cpp:2048
#25 0xb6856ffe in QWidget::event (this=0xb65a3c0, event=0xbf8ec00c)
    at kernel/qwidget.cpp:7204
#26 0xb6bd2377 in QLineEdit::event (this=0xb65a3c0, e=0xbf8ec00c)
    at widgets/qlineedit.cpp:1636
#27 0xb67f894c in QApplicationPrivate::notify_helper (this=0x9a91338, 
    receiver=0xb65a3c0, e=0xbf8ec00c) at kernel/qapplication.cpp:3809
#28 0xb6800ae0 in QApplication::notify (this=0xbf8ecad4, receiver=0xb65a3c0, 
    e=0xbf8ec00c) at kernel/qapplication.cpp:3453
#29 0xb75bb6b1 in KApplication::notify (this=0xbf8ecad4, receiver=0xb65a3c0, 
    event=0xbf8ec00c)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kdeui/kernel/kapplication.cpp:311
#30 0xb65efebf in QCoreApplication::notifyInternal (this=0xbf8ecad4, 
    receiver=0xb65a3c0, event=0xbf8ec00c) at kernel/qcoreapplication.cpp:593
#31 0xb685ff4e in qt_sendSpontaneousEvent (receiver=0xb65a3c0, event=0x6)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#32 0xb6893973 in QKeyMapper::sendKeyEvent (keyWidget=0xb65a3c0, grab=false, 
    type=QEvent::KeyPress, code=16777223, modifiers={i = -1081163060}, 
    text=@0xbf8ec2f8, autorepeat=<value optimized out>, count=1, 
    nativeScanCode=107, nativeVirtualKey=65535, nativeModifiers=16)
    at kernel/qkeymapper_x11.cpp:1658
#33 0xb6895a83 in QKeyMapperPrivate::translateKeyEvent (this=0x9aac468, 
    keyWidget=0xb65a3c0, event=0xbf8ec748, grab=false)
    at kernel/qkeymapper_x11.cpp:1629
#34 0xb686ea5b in QApplication::x11ProcessEvent (this=0xbf8ecad4, 
    event=0xbf8ec748) at kernel/qapplication_x11.cpp:3059
#35 0xb68972f8 in QEventDispatcherX11::processEvents (this=0x9a91628, flags=
      {i = -1081161752}) at kernel/qeventdispatcher_x11.cpp:134
#36 0xb65ee82a in QEventLoop::processEvents (this=0xbf8ec860, flags=
      {i = -1081161688}) at kernel/qeventloop.cpp:149
#37 0xb65ee9ea in QEventLoop::exec (this=0xbf8ec860, flags={i = -1081161624})
    at kernel/qeventloop.cpp:200
#38 0xb65f1155 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:851
#39 0xb67f8677 in QApplication::exec () at kernel/qapplication.cpp:3337
#40 0xb80cd1d1 in kdemain (argc=3, argv=0xbf8ed054)
    at /var/tmp/portage/kde-base/kate-4.1.3/work/kate-4.1.3/kate/app/katemain.cpp:252
#41 0x080488f2 in main (argc=)
    at /var/tmp/portage/kde-base/kate-4.1.3/work/kate_build/kate/app/kate_dummy.cpp:3
#0  0xb80d2424 in __kernel_vsyscall ()
Comment 1 Dario Andres 2008-12-12 01:22:38 UTC
The backtrace and the assert look similar to the ones in bug 157754
Comment 2 Daniel Franke 2008-12-12 02:17:58 UTC
> The backtrace and the assert look similar to the ones in bug 157754
Hmm, yes, I think code folding was involved here as well. Probably a dupe then?!
Comment 3 Dario Andres 2008-12-13 14:50:41 UTC
Probably :) But bug 157754 is old and there wasn't any news on it since April 2008. So I will wait a little more time before marking as duplicate
Comment 4 Will Angenent 2009-01-14 15:54:27 UTC
I've had this crash just now. Not sure if this is relevant, but I had the code folding border turned off. It was a perl script I was editing. I don't know if code folding does its thing in the background anyways.
Comment 5 Dario Andres 2009-01-16 12:01:57 UTC
@Will: do you think it is the same crash? Do you have a backtrace to check if they are related? Thanks :)

Marking this as duplicate of bug 157754

*** This bug has been marked as a duplicate of bug 157754 ***
Comment 6 Will Angenent 2009-01-16 12:17:20 UTC
Sorry, no I no longer have the backtrace. I didn't post it because it was similar or identical to the one above. Bad me for not saving it. Sorry!